BlockMemorial.java 文件源码

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

项目:Gravestone-mod-Extended 作者:
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;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号