Merge pull request #2476 from biscuut/patch-1

Fixed incorrect block pos world coordinates
This commit is contained in:
Leijurv 2021-02-19 10:54:47 -08:00 committed by GitHub
commit d34f37c563
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ public final class ChunkPacker {
return PathingBlockType.AVOID; return PathingBlockType.AVOID;
} }
if (x == 0 || x == 15 || z == 0 || z == 15) { if (x == 0 || x == 15 || z == 0 || z == 15) {
if (BlockLiquid.getSlopeAngle(chunk.getWorld(), new BlockPos(x + chunk.x << 4, y, z + chunk.z << 4), state.getMaterial(), state) == -1000.0F) { if (BlockLiquid.getSlopeAngle(chunk.getWorld(), new BlockPos(x + (chunk.x << 4), y, z + (chunk.z << 4)), state.getMaterial(), state) == -1000.0F) {
return PathingBlockType.WATER; return PathingBlockType.WATER;
} }
return PathingBlockType.AVOID; return PathingBlockType.AVOID;