From fecb380d4433ff56b22e365ba7a88fe4c48d1f10 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Fri, 28 Jun 2019 22:43:32 +1000 Subject: [PATCH] aea5b68ced63511b0e0c13b3a94c5582b9d013e9 --- .../java/com/boydti/fawe/bukkit/v1_13/BukkitChunk_1_13.java | 6 +++--- .../java/com/sk89q/worldedit/world/block/BlockState.java | 2 -- .../java/com/sk89q/worldedit/world/block/BlockType.java | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/v1_13/BukkitChunk_1_13.java b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/v1_13/BukkitChunk_1_13.java index 2b94dffc9..a023fc927 100644 --- a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/v1_13/BukkitChunk_1_13.java +++ b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/v1_13/BukkitChunk_1_13.java @@ -192,11 +192,11 @@ public class BukkitChunk_1_13 extends IntFaweChunk { byte[] newBlockBytes = newBlockLight.asBytes(); byte[] blockLightBytes = blockLight.asBytes(); - System.arraycopy(blockLightBytes, 0, newBlockBytes, 0, 2048); + for (int i = 0; i < 2048; i++) newBlockBytes[i] = blockLightBytes[i]; if (skyLight != null) { byte[] newSkyBytes = newSkyLight.asBytes(); byte[] skyLightBytes = skyLight.asBytes(); - System.arraycopy(skyLightBytes, 0, newSkyBytes, 0, 2048); + for (int i = 0; i < 2048; i++) newSkyBytes[i] = skyLightBytes[i]; } // Copy counters @@ -241,7 +241,7 @@ public class BukkitChunk_1_13 extends IntFaweChunk { Object[] currArray = ((Object[]) BukkitQueue_1_13.fieldLinearBlocks.get(currentPalette)); Object[] newArray = ((Object[]) BukkitQueue_1_13.fieldLinearBlocks.get(newPalette)); BukkitQueue_1_13.fieldLinearIndex.set(newPalette, BukkitQueue_1_13.fieldLinearIndex.get(currentPalette)); - System.arraycopy(currArray, 0, newArray, 0, newArray.length); + for (int i = 0; i < newArray.length; i++) newArray[i] = currArray[i]; } BukkitQueue_1_13.fieldPalette.set(paletteBlock, newPalette); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java index 7db9875be..4fe002ee7 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java @@ -346,8 +346,6 @@ public class BlockState implements BlockStateHolder, FawePattern { return equalsFuzzy((BlockState) obj); } - private Integer hashCodeCache = null; - @Override public int hashCode() { return getOrdinal(); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockType.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockType.java index 22f7ee449..cf2f0a8dc 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockType.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockType.java @@ -280,7 +280,7 @@ public class BlockType implements FawePattern, Keyed { @Override public int hashCode() { - return this.id.hashCode(); + return settings.internalId; } @Override