/**
* NBT item loading function with support for stack sizes > 32K
*/
public static void readItemStacksFromTag(ItemStack[] items, NBTTagList tagList) {
for (int i = 0; i < tagList.tagCount(); i++) {
NBTTagCompound tag = tagList.getCompoundTagAt(i);
int b = tag.getShort("Slot");
items[b] = new ItemStack(tag);
if (tag.hasKey("Quantity")) {
items[b].setCount(((NBTPrimitive) tag.getTag("Quantity")).getInt());
}
}
}
InventoryUtils.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:CodeChickenLib
作者:
评论列表
文章目录