@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 {
TileEntityIndustrialQuarry te = (TileEntityIndustrialQuarry) world.getTileEntity(blockPos);
if (te != null) {
if (stack == null || !(stack.getItem() instanceof ItemWrench)) {
FMLNetworkHandler
.openGui(player, ProjectZed.instance, TileEntityRegistry.instance().getID(TileEntityIndustrialQuarry.class), world,
blockPos.getX(), blockPos.getY(), blockPos.getZ());
player.addChatComponentMessage(ChatUtils.createComponent(false, "is done: " + te.isDone()));
}
else return false;
}
return true;
}
// player.addChatComponentMessage(ChatUtils.createComponent(false, "is done: " + te.isDone()));
}
BlockIndustrialQuarry.java 文件源码
java
阅读 17
收藏 0
点赞 0
评论 0
项目:Project-Zed
作者:
评论列表
文章目录