BlockIndustrialLoader.java 文件源码

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

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

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

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


问题


面经


文章

微信
公众号

扫码关注公众号