当前位置: 首页>>代码示例>>Java>>正文


Java InventoryUtils.readItemStacksFromTag方法代码示例

本文整理汇总了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();
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:9,代码来源:NEICPH.java

示例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();
    }
}
 
开发者ID:TheCBProject,项目名称:EnderStorage,代码行数:9,代码来源:EnderItemStorage.java

示例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));
}
 
开发者ID:TheCBProject,项目名称:Translocators,代码行数:10,代码来源:TileItemTranslocator.java

示例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));
            }
        }
    }
}
 
开发者ID:TheCBProject,项目名称:Translocators,代码行数:13,代码来源:TileItemTranslocator.java

示例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();
}
 
开发者ID:TheCBProject,项目名称:NotEnoughItems,代码行数:11,代码来源:NEIClientPacketHandler.java

示例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);
    }
}
 
开发者ID:TheCBProject,项目名称:NotEnoughItems,代码行数:9,代码来源:PlayerSave.java

示例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);
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:7,代码来源:PlayerSave.java

示例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");
}
 
开发者ID:TheCBProject,项目名称:Translocators,代码行数:7,代码来源:TileCraftingGrid.java


注:本文中的codechicken.lib.inventory.InventoryUtils.readItemStacksFromTag方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。