Fixed call

This commit is contained in:
Frank 2021-12-08 16:36:10 +01:00
parent 5affe912be
commit df6845642f

View file

@ -19,9 +19,10 @@ public class WorldGenRegionMixin {
@Inject(method = "ensureCanWrite", at = @At("HEAD"), cancellable = true)
private void be_alterBlockCheck(BlockPos blockPos, CallbackInfoReturnable<Boolean> info) {
ChunkPos cPos = center.getPos();
int x = blockPos.getX() >> 4;
int z = blockPos.getZ() >> 4;
WorldGenRegion region = (WorldGenRegion) (Object) this;
info.setReturnValue(Math.abs(x - center.x) < 2 && Math.abs(z - center.z) < 2);
info.setReturnValue(Math.abs(x - cPos.x) < 2 && Math.abs(z - cPos.z) < 2);
}
}