Fixed call
This commit is contained in:
parent
5affe912be
commit
df6845642f
1 changed files with 2 additions and 1 deletions
|
@ -19,9 +19,10 @@ public class WorldGenRegionMixin {
|
||||||
|
|
||||||
@Inject(method = "ensureCanWrite", at = @At("HEAD"), cancellable = true)
|
@Inject(method = "ensureCanWrite", at = @At("HEAD"), cancellable = true)
|
||||||
private void be_alterBlockCheck(BlockPos blockPos, CallbackInfoReturnable<Boolean> info) {
|
private void be_alterBlockCheck(BlockPos blockPos, CallbackInfoReturnable<Boolean> info) {
|
||||||
|
ChunkPos cPos = center.getPos();
|
||||||
int x = blockPos.getX() >> 4;
|
int x = blockPos.getX() >> 4;
|
||||||
int z = blockPos.getZ() >> 4;
|
int z = blockPos.getZ() >> 4;
|
||||||
WorldGenRegion region = (WorldGenRegion) (Object) this;
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue