private void addNBTToStack(final String nbtString, final ItemStack stack, final EntityPlayer player) {
NBTBase base;
try {
base = JsonToNBT.func_150315_a(nbtString);
if (base instanceof NBTTagCompound) {
stack.setTagCompound((NBTTagCompound) base);
} else {
player.addChatMessage(new ChatComponentText("Error: Invalid NBT type provided in JSON."));
}
} catch (final NBTException e) {
player.addChatMessage(new ChatComponentText("Error: Invalid NBT JSON data: " + e.getMessage()));
}
}
BlindBag.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:FerretShinies
作者:
评论列表
文章目录