ItemSkull.java 文件源码

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

项目:ExpandedRailsMod 作者:
/**
 * Called when an ItemStack with NBT data is read to potentially that ItemStack's NBT data
 */
public boolean updateItemStackNBT(NBTTagCompound nbt)
{
    super.updateItemStackNBT(nbt);

    if (nbt.hasKey("SkullOwner", 8) && !nbt.getString("SkullOwner").isEmpty())
    {
        GameProfile gameprofile = new GameProfile((UUID)null, nbt.getString("SkullOwner"));
        gameprofile = TileEntitySkull.updateGameprofile(gameprofile);
        nbt.setTag("SkullOwner", NBTUtil.writeGameProfile(new NBTTagCompound(), gameprofile));
        return true;
    }
    else
    {
        return false;
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号