Fix crash on Forge

This commit is contained in:
embeddedt 2023-07-28 16:17:49 -04:00
parent 23e768d629
commit 4fe3b93fb0
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -18,7 +18,8 @@ public class BlocksMixin {
return o -> {};
}
@Redirect(method = "<clinit>", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/state/BlockState;initCache()V"))
// require = 0 due to Forge removing the BLOCK_STATE_REGISTRY init here
@Redirect(method = "<clinit>", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/state/BlockState;initCache()V"), require = 0)
private static void skipCacheInit(BlockState state) {
/* no-op, our dynamic logic handles everything properly (including the 1.19.4+ fluidState, etc. caching) */
}