BlockIndustrialMetalPress.java 文件源码

java
阅读 22 收藏 0 点赞 0 评论 0

项目:Project-Zed 作者:
@Override
public boolean onBlockActivated(World world, BlockPos blockPos, IBlockState blockState, EntityPlayer player, EnumHand hand, ItemStack stack,
        EnumFacing side, float hitX, float hitY, float hitZ) {
    if (world.isRemote) return true;

    else {
        AbstractTileEntityMachine te = (AbstractTileEntityMachine) world.getTileEntity(blockPos);
        if (te != null) {
            if (stack == null || !(stack.getItem() instanceof ItemWrench))
                FMLNetworkHandler
                        .openGui(player, ProjectZed.instance, TileEntityRegistry.instance().getID(TileEntityIndustrialMetalPress.class),
                                world, blockPos.getX(), blockPos.getY(), blockPos.getZ());

            else return false;
        }

        return true;
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号