From 808d32bc85147ffab9dffc09fff2804d3a7f26a1 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Wed, 10 Apr 2019 22:03:51 +1000 Subject: [PATCH] make bit mask protected TODO same for BIT_OFFSET --- .../main/java/com/boydti/fawe/bukkit/wrapper/AsyncBlock.java | 3 ++- .../main/java/com/sk89q/worldedit/world/block/BlockTypes.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncBlock.java b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncBlock.java index c23ee06d0..8a90b76f8 100644 --- a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncBlock.java +++ b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncBlock.java @@ -66,7 +66,8 @@ public class AsyncBlock implements Block { } public int getTypeId() { - return (queue.getCachedCombinedId4Data(x, y, z, BlockTypes.AIR.getInternalId()) & BlockTypes.BIT_MASK); + int id = (queue.getCachedCombinedId4Data(x, y, z, BlockTypes.AIR.getInternalId())); + return BlockTypes.getFromStateId(id).getInternalId(); } @Override diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockTypes.java b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockTypes.java index a94c2683f..382eda423 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockTypes.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockTypes.java @@ -795,7 +795,7 @@ public final class BlockTypes { */ public static final int BIT_OFFSET; // Used internally - public static final int BIT_MASK; // Used internally + protected static final int BIT_MASK; // Used internally private static final Map $REGISTRY = new HashMap<>();