private ItemStack getBlockItemStackWithoutInfo(World world, BlockPos pos) {
ItemStack itemStack = new ItemStack(Item.getItemFromBlock(this), 1);
TileEntityMemorial tileEntity = (TileEntityMemorial) world.getTileEntity(pos);
if (tileEntity != null) {
itemStack.setItemDamage(tileEntity.getGraveTypeNum());
NBTTagCompound nbt = new NBTTagCompound();
nbt.setBoolean("Mossy", tileEntity.isMossy());
if (tileEntity.getPlayerProfile() != null) {
nbt.setTag("Owner", NBTUtil.writeGameProfile(new NBTTagCompound(), tileEntity.getPlayerProfile()));
}
itemStack.setTagCompound(nbt);
}
return itemStack;
}
BlockMemorial.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:Gravestone-mod-Extended
作者:
评论列表
文章目录