Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added hoppers to block data info

  • Loading branch information...
commit 0e8508847e79844adf002e9827c641895db0feed 1 parent 382b6f3
@wizjany wizjany authored
View
4 src/main/java/com/sk89q/worldedit/blocks/BlockData.java
@@ -128,6 +128,7 @@ public static int rotate90(int type, int data) {
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 static int rotate90Reverse(int type, int data) {
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 static int flip(int type, int data, FlipDirection direction) {
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 static int cycle(int type, int data, int increment) {
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;
View
1  src/main/java/com/sk89q/worldedit/blocks/BlockType.java
@@ -627,6 +627,7 @@ public double centralTopLimit() {
usesData.add(BlockID.QUARTZ_STAIRS);
usesData.add(BlockID.ACTIVATOR_RAIL);
usesData.add(BlockID.DROPPER);
+ usesData.add(BlockID.HOPPER);
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.