@EventWrapper public void onBlockPistonExtend(final BlockPistonExtendEvent event) { Map<Block, BlockState> newStates = new HashMap<>(); // Add the arm of the piston, which will extend into the adjacent block. PistonExtensionMaterial pistonExtension = new PistonExtensionMaterial(Material.PISTON_EXTENSION); pistonExtension.setFacingDirection(event.getDirection()); BlockState pistonExtensionState = event.getBlock().getRelative(event.getDirection()).getState(); pistonExtensionState.setType(pistonExtension.getItemType()); pistonExtensionState.setData(pistonExtension); newStates.put(event.getBlock(), pistonExtensionState); this.onPistonMove(event, event.getBlocks(), newStates); }
@Deprecated public PistonExtensionMaterial(int type) { }
public PistonExtensionMaterial(Material type) { }
@Deprecated public PistonExtensionMaterial(int type, byte data) { }
@Deprecated public PistonExtensionMaterial(Material type, byte data) { }
public PistonExtensionMaterial clone() { return null; }