From e4709eb6dc940fc6b333a2a35db11510407a85c6 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Wed, 16 Dec 2020 12:34:54 +0000 Subject: [PATCH] idk why I did &3 half fixes #769 --- .../boydti/fawe/beta/implementation/blocks/CharSetBlocks.java | 4 ++-- .../src/main/java/com/boydti/fawe/jnbt/anvil/MCAChunk.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/blocks/CharSetBlocks.java b/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/blocks/CharSetBlocks.java index 85ba848a6..771c955d2 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/blocks/CharSetBlocks.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/blocks/CharSetBlocks.java @@ -57,7 +57,7 @@ public class CharSetBlocks extends CharBlocks implements IChunkSet { if (biomes == null) { return null; } - return biomes[(y >> 2) << 4 | (z & 3) << 2 | x & 3]; + return biomes[(y >> 2) << 4 | (z >> 2) << 2 | x >> 2]; } @Override @@ -90,7 +90,7 @@ public class CharSetBlocks extends CharBlocks implements IChunkSet { if (biomes == null) { biomes = new BiomeType[1024]; } - biomes[(y >> 2) << 4 | (z & 3) << 2 | x & 3] = biome; + biomes[(y >> 2) << 4 | (z >> 2) << 2 | x >> 2] = biome; return true; } diff --git a/worldedit-core/src/main/java/com/boydti/fawe/jnbt/anvil/MCAChunk.java b/worldedit-core/src/main/java/com/boydti/fawe/jnbt/anvil/MCAChunk.java index a4150f274..07b99a456 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/jnbt/anvil/MCAChunk.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/jnbt/anvil/MCAChunk.java @@ -481,7 +481,7 @@ public class MCAChunk implements IChunk { @Override public BiomeType getBiomeType(int x, int y, int z) { - return this.biomes[(y >> 2) << 4 | (z & 3) << 2 | x & 3]; + return this.biomes[(y >> 2) << 4 | (z >> 2) << 2 | x >> 2]; } @Override @@ -505,7 +505,7 @@ public class MCAChunk implements IChunk { @Override public boolean setBiome(int x, int y, int z, BiomeType biome) { setModified(); - biomes[(y >> 2) << 4 | (z & 3) << 2 | x & 3] = biome; + biomes[(y >> 2) << 4 | (z >> 2) << 2 | x >> 2] = biome; return true; }