diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/util/Commodore.java | 2 | ||||
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/util/CraftEvil.java | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java index cc877f0a..b4c1c68c 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java @@ -39,6 +39,8 @@ public class Commodore "org/bukkit/block/Block (I)Z setTypeId", "org/bukkit/block/Block (IZ)Z setTypeId", "org/bukkit/block/Block (IBZ)Z setTypeIdAndData", + "org/bukkit/block/Block (B)V setData", + "org/bukkit/block/Block (BZ)V setData", "org/bukkit/inventory/ItemStack ()I getTypeId", "org/bukkit/inventory/ItemStack (I)V setTypeId" ) ); diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftEvil.java b/src/main/java/org/bukkit/craftbukkit/util/CraftEvil.java index 14fef6f4..609606e1 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftEvil.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftEvil.java @@ -8,6 +8,7 @@ import org.bukkit.Material; import org.bukkit.World; import org.bukkit.block.Block; import org.bukkit.block.BlockState; +import org.bukkit.craftbukkit.block.CraftBlock; import org.bukkit.inventory.ItemStack; /** @@ -49,10 +50,18 @@ public class CraftEvil { public static boolean setTypeIdAndData(Block block, int type, byte data, boolean applyPhysics) { block.setType(getMaterial(type), applyPhysics); - block.setData(data); + setData(block, data); return true; } + public static void setData(Block block, byte data) { + ((CraftBlock) block).setData(data); + } + + public static void setData(Block block, byte data, boolean applyPhysics) { + ((CraftBlock) block).setData(data, applyPhysics); + } + public static int getTypeId(BlockState state) { return getId(state.getType()); } |