Skip to content

Commit cac4bba

Browse files
committed
Why do weird bitshift if we can bitmask
1 parent 4b9cf03 commit cac4bba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/java/de/bluecolored/bluemap/core/world/block/ExtendedBlock.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ public boolean isInside(int x, int z) {
184184
}
185185

186186
private void setAround(int x, int z) {
187-
this.minX = (x >> 4) << 4;
188-
this.minZ = (z >> 4) << 4;
187+
this.minX = x & 0xFFFFFFF0;
188+
this.minZ = z & 0xFFFFFFF0;
189189
this.maxX = minX + 15;
190190
this.maxZ = minZ + 15;
191191
}

0 commit comments

Comments
 (0)