diff --git a/paper-api/src/main/java/org/bukkit/material/Button.java b/paper-api/src/main/java/org/bukkit/material/Button.java index 018959180a..fd6a7db8ef 100644 --- a/paper-api/src/main/java/org/bukkit/material/Button.java +++ b/paper-api/src/main/java/org/bukkit/material/Button.java @@ -73,6 +73,9 @@ public class Button extends SimpleAttachableMaterialData implements Redstone { byte data = (byte) (getData() & 0x7); switch (data) { + case 0x0: + return BlockFace.UP; + case 0x1: return BlockFace.WEST; @@ -84,6 +87,9 @@ public class Button extends SimpleAttachableMaterialData implements Redstone { case 0x4: return BlockFace.SOUTH; + + case 0x5: + return BlockFace.DOWN; } return null; @@ -96,6 +102,10 @@ public class Button extends SimpleAttachableMaterialData implements Redstone { byte data = (byte) (getData() & 0x8); switch (face) { + case DOWN: + data |= 0x0; + break; + case EAST: data |= 0x1; break; @@ -111,6 +121,10 @@ public class Button extends SimpleAttachableMaterialData implements Redstone { case NORTH: data |= 0x4; break; + + case UP: + data |= 0x5; + break; } setData(data);