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


Java NonNullList.func_191197_a方法代码示例

本文整理汇总了Java中net.minecraft.util.NonNullList.func_191197_a方法的典型用法代码示例。如果您正苦于以下问题:Java NonNullList.func_191197_a方法的具体用法?Java NonNullList.func_191197_a怎么用?Java NonNullList.func_191197_a使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.util.NonNullList的用法示例。


在下文中一共展示了NonNullList.func_191197_a方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getRemainingItems

import net.minecraft.util.NonNullList; //导入方法依赖的package包/类
public NonNullList<ItemStack> getRemainingItems(InventoryCrafting inv)
{
    NonNullList<ItemStack> nonnulllist = NonNullList.<ItemStack>func_191197_a(inv.getSizeInventory(), ItemStack.field_190927_a);

    for (int i = 0; i < nonnulllist.size(); ++i)
    {
        ItemStack itemstack = inv.getStackInSlot(i);

        if (itemstack.getItem().hasContainerItem())
        {
            nonnulllist.set(i, new ItemStack(itemstack.getItem().getContainerItem()));
        }
    }

    return nonnulllist;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:17,代码来源:RecipesBanners.java

示例2: getRemainingItems

import net.minecraft.util.NonNullList; //导入方法依赖的package包/类
public NonNullList<ItemStack> getRemainingItems(InventoryCrafting craftMatrix, World worldIn)
{
    for (IRecipe irecipe : this.recipes)
    {
        if (irecipe.matches(craftMatrix, worldIn))
        {
            return irecipe.getRemainingItems(craftMatrix);
        }
    }

    NonNullList<ItemStack> nonnulllist = NonNullList.<ItemStack>func_191197_a(craftMatrix.getSizeInventory(), ItemStack.field_190927_a);

    for (int i = 0; i < nonnulllist.size(); ++i)
    {
        nonnulllist.set(i, craftMatrix.getStackInSlot(i));
    }

    return nonnulllist;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:20,代码来源:CraftingManager.java

示例3: readFromNBT

import net.minecraft.util.NonNullList; //导入方法依赖的package包/类
public void readFromNBT(NBTTagCompound compound)
{
    super.readFromNBT(compound);
    this.inventory = NonNullList.<ItemStack>func_191197_a(this.getSizeInventory(), ItemStack.field_190927_a);

    if (!this.checkLootAndRead(compound))
    {
        ItemStackHelper.func_191283_b(compound, this.inventory);
    }

    if (compound.hasKey("CustomName", 8))
    {
        this.field_190577_o = compound.getString("CustomName");
    }

    this.transferCooldown = compound.getInteger("TransferCooldown");
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:18,代码来源:TileEntityHopper.java

示例4: readFromNBT

import net.minecraft.util.NonNullList; //导入方法依赖的package包/类
public void readFromNBT(NBTTagCompound compound)
{
    super.readFromNBT(compound);
    this.brewingItemStacks = NonNullList.<ItemStack>func_191197_a(this.getSizeInventory(), ItemStack.field_190927_a);
    ItemStackHelper.func_191283_b(compound, this.brewingItemStacks);
    this.brewTime = compound.getShort("BrewTime");

    if (compound.hasKey("CustomName", 8))
    {
        this.customName = compound.getString("CustomName");
    }

    this.fuel = compound.getByte("Fuel");
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:15,代码来源:TileEntityBrewingStand.java

示例5: SPacketWindowItems

import net.minecraft.util.NonNullList; //导入方法依赖的package包/类
public SPacketWindowItems(int p_i47317_1_, NonNullList<ItemStack> p_i47317_2_)
{
    this.windowId = p_i47317_1_;
    this.itemStacks = NonNullList.<ItemStack>func_191197_a(p_i47317_2_.size(), ItemStack.field_190927_a);

    for (int i = 0; i < this.itemStacks.size(); ++i)
    {
        ItemStack itemstack = (ItemStack)p_i47317_2_.get(i);

        if (!itemstack.func_190926_b())
        {
            this.itemStacks.set(i, itemstack.copy());
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:16,代码来源:SPacketWindowItems.java

示例6: readFromNBT

import net.minecraft.util.NonNullList; //导入方法依赖的package包/类
public void readFromNBT(NBTTagCompound compound)
{
    super.readFromNBT(compound);
    this.chestContents = NonNullList.<ItemStack>func_191197_a(this.getSizeInventory(), ItemStack.field_190927_a);

    if (!this.checkLootAndRead(compound))
    {
        ItemStackHelper.func_191283_b(compound, this.chestContents);
    }

    if (compound.hasKey("CustomName", 8))
    {
        this.field_190577_o = compound.getString("CustomName");
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:16,代码来源:TileEntityChest.java

示例7: func_190586_e

import net.minecraft.util.NonNullList; //导入方法依赖的package包/类
public void func_190586_e(NBTTagCompound p_190586_1_)
{
    this.field_190596_f = NonNullList.<ItemStack>func_191197_a(this.getSizeInventory(), ItemStack.field_190927_a);

    if (!this.checkLootAndRead(p_190586_1_) && p_190586_1_.hasKey("Items", 9))
    {
        ItemStackHelper.func_191283_b(p_190586_1_, this.field_190596_f);
    }

    if (p_190586_1_.hasKey("CustomName", 8))
    {
        this.field_190577_o = p_190586_1_.getString("CustomName");
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:15,代码来源:TileEntityShulkerBox.java

示例8: readFromNBT

import net.minecraft.util.NonNullList; //导入方法依赖的package包/类
public void readFromNBT(NBTTagCompound compound)
{
    super.readFromNBT(compound);
    this.stacks = NonNullList.<ItemStack>func_191197_a(this.getSizeInventory(), ItemStack.field_190927_a);

    if (!this.checkLootAndRead(compound))
    {
        ItemStackHelper.func_191283_b(compound, this.stacks);
    }

    if (compound.hasKey("CustomName", 8))
    {
        this.field_190577_o = compound.getString("CustomName");
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:16,代码来源:TileEntityDispenser.java

示例9: InventoryCrafting

import net.minecraft.util.NonNullList; //导入方法依赖的package包/类
public InventoryCrafting(Container eventHandlerIn, int width, int height)
{
    this.stackList = NonNullList.<ItemStack>func_191197_a(width * height, ItemStack.field_190927_a);
    this.eventHandler = eventHandlerIn;
    this.inventoryWidth = width;
    this.inventoryHeight = height;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:8,代码来源:InventoryCrafting.java

示例10: InventoryBasic

import net.minecraft.util.NonNullList; //导入方法依赖的package包/类
public InventoryBasic(String title, boolean customName, int slotCount)
{
    this.inventoryTitle = title;
    this.hasCustomName = customName;
    this.slotsCount = slotCount;
    this.inventoryContents = NonNullList.<ItemStack>func_191197_a(slotCount, ItemStack.field_190927_a);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:8,代码来源:InventoryBasic.java

示例11: TileEntityShulkerBox

import net.minecraft.util.NonNullList; //导入方法依赖的package包/类
public TileEntityShulkerBox(@Nullable EnumDyeColor p_i47242_1_)
{
    this.field_190596_f = NonNullList.<ItemStack>func_191197_a(27, ItemStack.field_190927_a);
    this.field_190599_i = TileEntityShulkerBox.AnimationStatus.CLOSED;
    this.field_190602_l = p_i47242_1_;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:7,代码来源:TileEntityShulkerBox.java

示例12: getRemainingItems

import net.minecraft.util.NonNullList; //导入方法依赖的package包/类
public NonNullList<ItemStack> getRemainingItems(InventoryCrafting inv)
{
    return NonNullList.<ItemStack>func_191197_a(inv.getSizeInventory(), ItemStack.field_190927_a);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:5,代码来源:RecipeTippedArrow.java

示例13: func_190948_a

import net.minecraft.util.NonNullList; //导入方法依赖的package包/类
public void func_190948_a(ItemStack p_190948_1_, EntityPlayer p_190948_2_, List<String> p_190948_3_, boolean p_190948_4_)
{
    super.func_190948_a(p_190948_1_, p_190948_2_, p_190948_3_, p_190948_4_);
    NBTTagCompound nbttagcompound = p_190948_1_.getTagCompound();

    if (nbttagcompound != null && nbttagcompound.hasKey("BlockEntityTag", 10))
    {
        NBTTagCompound nbttagcompound1 = nbttagcompound.getCompoundTag("BlockEntityTag");

        if (nbttagcompound1.hasKey("LootTable", 8))
        {
            p_190948_3_.add("???????");
        }

        if (nbttagcompound1.hasKey("Items", 9))
        {
            NonNullList<ItemStack> nonnulllist = NonNullList.<ItemStack>func_191197_a(27, ItemStack.field_190927_a);
            ItemStackHelper.func_191283_b(nbttagcompound1, nonnulllist);
            int i = 0;
            int j = 0;

            for (ItemStack itemstack : nonnulllist)
            {
                if (!itemstack.func_190926_b())
                {
                    ++j;

                    if (i <= 4)
                    {
                        ++i;
                        p_190948_3_.add(String.format("%s x%d", new Object[] {itemstack.getDisplayName(), Integer.valueOf(itemstack.func_190916_E())}));
                    }
                }
            }

            if (j - i > 0)
            {
                p_190948_3_.add(String.format(TextFormatting.ITALIC + I18n.translateToLocal("container.shulkerBox.more"), new Object[] {Integer.valueOf(j - i)}));
            }
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:43,代码来源:BlockShulkerBox.java


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