@@ -31,6 +31,7 @@ public class Button extends SimpleAttachableMaterialData implements Redstone {
|
||||
*
|
||||
* @return true if powered, otherwise false
|
||||
*/
|
||||
@Override
|
||||
public boolean isPowered() {
|
||||
return (getData() & 0x8) == 0x8;
|
||||
}
|
||||
@@ -50,6 +51,7 @@ public class Button extends SimpleAttachableMaterialData implements Redstone {
|
||||
*
|
||||
* @return BlockFace attached to
|
||||
*/
|
||||
@Override
|
||||
public BlockFace getAttachedFace() {
|
||||
byte data = (byte) (getData() & 0x7);
|
||||
|
||||
@@ -79,6 +81,7 @@ public class Button extends SimpleAttachableMaterialData implements Redstone {
|
||||
/**
|
||||
* Sets the direction this button is pointing toward
|
||||
*/
|
||||
@Override
|
||||
public void setFacingDirection(BlockFace face) {
|
||||
byte data = (byte) (getData() & 0x8);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user