當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。