Ejemplo n.º 1
0
 /**
  * Sets whether this pressure plate is pressed down
  *
  * @param block to set it of
  * @param pressed whether it is pressed
  */
 public void setPressed(Block block, boolean pressed) {
   if (this.isPressed(block) != pressed) {
     block.setDataBits(0x1, pressed);
     GeneralEffects.BLOCK_PRESS.playGlobal(block.getPosition(), pressed);
   }
   block.resetDynamic();
 }
Ejemplo n.º 2
0
 @Override
 public void setToggled(Block block, boolean toggled) {
   if (this.isToggled(block) != toggled) {
     block.setDataBits(0x8, toggled);
     GeneralEffects.BLOCK_PRESS.playGlobal(block.getPosition(), toggled);
   }
   block.resetDynamic();
 }