From 0e8508847e79844adf002e9827c641895db0feed Mon Sep 17 00:00:00 2001 From: wizjany Date: Mon, 25 Mar 2013 10:24:18 -0400 Subject: [PATCH] Added hoppers to block data info --- src/main/java/com/sk89q/worldedit/blocks/BlockData.java | 4 ++++ src/main/java/com/sk89q/worldedit/blocks/BlockType.java | 1 + 2 files changed, 5 insertions(+) diff --git a/src/main/java/com/sk89q/worldedit/blocks/BlockData.java b/src/main/java/com/sk89q/worldedit/blocks/BlockData.java index f3fae8c14..1e6f81658 100644 --- a/src/main/java/com/sk89q/worldedit/blocks/BlockData.java +++ b/src/main/java/com/sk89q/worldedit/blocks/BlockData.java @@ -128,6 +128,7 @@ public final class BlockData { case BlockID.BURNING_FURNACE: case BlockID.ENDER_CHEST: case BlockID.TRAPPED_CHEST: + case BlockID.HOPPER: switch (data) { case 2: return 5; case 3: return 4; @@ -320,6 +321,7 @@ public final class BlockData { case BlockID.BURNING_FURNACE: case BlockID.ENDER_CHEST: case BlockID.TRAPPED_CHEST: + case BlockID.HOPPER: switch (data) { case 5: return 2; case 4: return 3; @@ -545,6 +547,7 @@ public final class BlockData { case BlockID.BURNING_FURNACE: case BlockID.ENDER_CHEST: case BlockID.TRAPPED_CHEST: + case BlockID.HOPPER: switch (data) { case 2: case 3: @@ -804,6 +807,7 @@ public final class BlockData { case BlockID.CHEST: case BlockID.ENDER_CHEST: case BlockID.TRAPPED_CHEST: + case BlockID.HOPPER: if (data < 2 || data > 5) return -1; return mod((data - 2 + increment), 4) + 2; diff --git a/src/main/java/com/sk89q/worldedit/blocks/BlockType.java b/src/main/java/com/sk89q/worldedit/blocks/BlockType.java index 298c279b8..8452841ca 100644 --- a/src/main/java/com/sk89q/worldedit/blocks/BlockType.java +++ b/src/main/java/com/sk89q/worldedit/blocks/BlockType.java @@ -627,6 +627,7 @@ public enum BlockType { usesData.add(BlockID.QUARTZ_STAIRS); usesData.add(BlockID.ACTIVATOR_RAIL); usesData.add(BlockID.DROPPER); + usesData.add(BlockID.HOPPER); } /**