本文整理汇总了Java中codechicken.lib.inventory.InventoryUtils.readItemStacksFromTag方法的典型用法代码示例。如果您正苦于以下问题:Java InventoryUtils.readItemStacksFromTag方法的具体用法?Java InventoryUtils.readItemStacksFromTag怎么用?Java InventoryUtils.readItemStacksFromTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类codechicken.lib.inventory.InventoryUtils
的用法示例。
在下文中一共展示了InventoryUtils.readItemStacksFromTag方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: sendOpenPotionWindow
import codechicken.lib.inventory.InventoryUtils; //导入方法依赖的package包/类
public static void sendOpenPotionWindow() {
ItemStack[] potionStore = new ItemStack[9];
InventoryUtils.readItemStacksFromTag(potionStore, NEIClientConfig.global.nbt.getCompoundTag("potionStore").getTagList("items", 10));
PacketCustom packet = new PacketCustom(channel, 24);
for (ItemStack stack : potionStore)
packet.writeItemStack(stack);
packet.sendToServer();
}
示例2: loadFromTag
import codechicken.lib.inventory.InventoryUtils; //导入方法依赖的package包/类
public void loadFromTag(NBTTagCompound tag) {
size = tag.getByte("size");
empty();
InventoryUtils.readItemStacksFromTag(items, tag.getTagList("Items", 10));
if (size != configSize) {
alignSize();
}
}
示例3: read
import codechicken.lib.inventory.InventoryUtils; //导入方法依赖的package包/类
@Override
public void read(NBTTagCompound tag) {
super.read(tag);
regulate = tag.getBoolean("regulate");
signal = tag.getBoolean("signal");
a_powering = tag.getBoolean("powering");
InventoryUtils.readItemStacksFromTag(filters, tag.getTagList("filters", 10));
}
示例4: readFromNBT
import codechicken.lib.inventory.InventoryUtils; //导入方法依赖的package包/类
@Override
public void readFromNBT(NBTTagCompound tag) {
super.readFromNBT(tag);
if (tag.hasKey("items")) {
for (Attachment a : attachments) {
if (a != null) {
InventoryUtils.readItemStacksFromTag(((ItemAttachment) a).filters, tag.getTagList("items", 10));
}
}
}
}
示例5: sendOpenPotionWindow
import codechicken.lib.inventory.InventoryUtils; //导入方法依赖的package包/类
public static void sendOpenPotionWindow() {
ItemStack[] potionStore = new ItemStack[9];
ArrayUtils.fillArray(potionStore, ItemStack.EMPTY);
InventoryUtils.readItemStacksFromTag(potionStore, NEIClientConfig.global.nbt.getCompoundTag("potionStore").getTagList("items", 10));
PacketCustom packet = new PacketCustom(channel, 24);
for (ItemStack stack : potionStore) {
packet.writeItemStack(stack);
}
packet.sendToServer();
}
示例6: loadCreativeInv
import codechicken.lib.inventory.InventoryUtils; //导入方法依赖的package包/类
private void loadCreativeInv() {
creativeInv = new ItemStack[54];
ArrayUtils.fillArray(creativeInv, ItemStack.EMPTY);
NBTTagList itemList = nbt.getTagList("creativeitems", 10);
if (itemList != null) {
InventoryUtils.readItemStacksFromTag(creativeInv, itemList);
}
}
示例7: loadCreativeInv
import codechicken.lib.inventory.InventoryUtils; //导入方法依赖的package包/类
private void loadCreativeInv() {
creativeInv = new ItemStack[54];
NBTTagList itemList = nbt.getTagList("creativeitems", 10);
if (itemList != null)
InventoryUtils.readItemStacksFromTag(creativeInv, itemList);
}
示例8: readFromNBT
import codechicken.lib.inventory.InventoryUtils; //导入方法依赖的package包/类
@Override
public void readFromNBT(NBTTagCompound tag) {
super.readFromNBT(tag);
InventoryUtils.readItemStacksFromTag(items, tag.getTagList("items", 10));
timeout = tag.getInteger("timeout");
}