Java 类org.bukkit.material.PistonExtensionMaterial 实例源码

项目:ProjectAres    文件:BlockTransformListener.java   
@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);
}
项目:BedrockAPI    文件:PistonExtensionMaterial.java   
@Deprecated public PistonExtensionMaterial(int type) {
}
项目:BedrockAPI    文件:PistonExtensionMaterial.java   
public PistonExtensionMaterial(Material type) {
}
项目:BedrockAPI    文件:PistonExtensionMaterial.java   
@Deprecated public PistonExtensionMaterial(int type, byte data) {
}
项目:BedrockAPI    文件:PistonExtensionMaterial.java   
@Deprecated public PistonExtensionMaterial(Material type, byte data) {
}
项目:BedrockAPI    文件:PistonExtensionMaterial.java   
public PistonExtensionMaterial clone() {
    return null;
}