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


Java AnimalChest.getStackInSlot方法代码示例

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


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

示例1: initHorseChest

import net.minecraft.inventory.AnimalChest; //导入方法依赖的package包/类
private void initHorseChest()
{
    AnimalChest animalchest = this.horseChest;
    this.horseChest = new AnimalChest("HorseChest", this.getChestSize());
    this.horseChest.setCustomName(this.getName());

    if (animalchest != null)
    {
        animalchest.func_110132_b(this);
        int i = Math.min(animalchest.getSizeInventory(), this.horseChest.getSizeInventory());

        for (int j = 0; j < i; ++j)
        {
            ItemStack itemstack = animalchest.getStackInSlot(j);

            if (itemstack != null)
            {
                this.horseChest.setInventorySlotContents(j, itemstack.copy());
            }
        }
    }

    this.horseChest.func_110134_a(this);
    this.updateHorseSlots();
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:26,代码来源:EntityHorse.java

示例2: initHorseChest

import net.minecraft.inventory.AnimalChest; //导入方法依赖的package包/类
private void initHorseChest()
{
    AnimalChest animalchest = this.horseChest;
    this.horseChest = new AnimalChest("HorseChest", this.getChestSize());
    this.horseChest.setCustomName(this.getName());

    if (animalchest != null)
    {
        animalchest.removeInventoryChangeListener(this);
        int i = Math.min(animalchest.getSizeInventory(), this.horseChest.getSizeInventory());

        for (int j = 0; j < i; ++j)
        {
            ItemStack itemstack = animalchest.getStackInSlot(j);

            if (itemstack != null)
            {
                this.horseChest.setInventorySlotContents(j, itemstack.copy());
            }
        }
    }

    this.horseChest.addInventoryChangeListener(this);
    this.updateHorseSlots();
    this.itemHandler = new net.minecraftforge.items.wrapper.InvWrapper(this.horseChest);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:27,代码来源:EntityHorse.java

示例3: chestInit

import net.minecraft.inventory.AnimalChest; //导入方法依赖的package包/类
private void chestInit()
{
	//Compare To: @EntityHorse
	AnimalChest animalchest = this.turtleChest;
	this.turtleChest = new AnimalChest("TurtleChest", this.getChestSize());
	this.turtleChest.setCustomName(this.getName());

	if (animalchest != null)
	{
		animalchest.func_110132_b(this);
		int i = Math.min(animalchest.getSizeInventory(), this.turtleChest.getSizeInventory());

		for (int j = 0; j < i; ++j)
		{
			ItemStack itemstack = animalchest.getStackInSlot(j);

			if (itemstack != null)
			{
				this.turtleChest.setInventorySlotContents(j, itemstack.copy());
			}
		}
	}

	this.turtleChest.func_110134_a(this);
	this.updateWatcheables();
}
 
开发者ID:andykuo1,项目名称:mcplus_mods,代码行数:27,代码来源:EntityTurtle.java

示例4: dropItemsInChest

import net.minecraft.inventory.AnimalChest; //导入方法依赖的package包/类
private void dropItemsInChest(Entity p_110240_1_, AnimalChest p_110240_2_)
{
	//Compare To: @EntityHorse
	if (p_110240_2_ != null && !this.worldObj.isRemote)
	{
		for (int i = 0; i < p_110240_2_.getSizeInventory(); ++i)
		{
			ItemStack itemstack = p_110240_2_.getStackInSlot(i);

			if (itemstack != null)
			{
				this.entityDropItem(itemstack, 0.0F);
			}
		}
	}
}
 
开发者ID:andykuo1,项目名称:mcplus_mods,代码行数:17,代码来源:EntityTurtle.java

示例5: func_110226_cD

import net.minecraft.inventory.AnimalChest; //导入方法依赖的package包/类
private void func_110226_cD() {
	AnimalChest animalchest = this.horseChest;
	this.horseChest = new AnimalChest("HorseChest", this.func_110225_cC());
	this.horseChest.func_110133_a(this.getCommandSenderName());

	if (animalchest != null) {
		animalchest.func_110132_b(this);
		int i = Math.min(animalchest.getSizeInventory(), this.horseChest.getSizeInventory());

		for (int j = 0; j < i; ++j) {
			ItemStack itemstack = animalchest.getStackInSlot(j);

			if (itemstack != null) {
				this.horseChest.setInventorySlotContents(j, itemstack.copy());
			}
		}

		animalchest = null;
	}

	this.horseChest.func_110134_a(this);
	this.func_110232_cE();
}
 
开发者ID:mookie1097,项目名称:NausicaaMod,代码行数:24,代码来源:EntityHorseclaw.java

示例6: createCamelChest

import net.minecraft.inventory.AnimalChest; //导入方法依赖的package包/类
private void createCamelChest()
{
    AnimalChest animalchest = this.camelChest;
    this.camelChest = new AnimalChest("CamelChest", 17);
    this.camelChest.func_110133_a(this.getCommandSenderName());

    if (animalchest != null)
    {   
        animalchest.func_110132_b((IInvBasic) this);
        int i = Math.min(animalchest.getSizeInventory(), this.camelChest.getSizeInventory());

        for (int j = 0; j < i; ++j)
        {
            ItemStack itemstack = animalchest.getStackInSlot(j);

            if (itemstack != null)
            {
                this.camelChest.setInventorySlotContents(j, itemstack.copy());
            }
        }
        animalchest = null;
    }

    this.camelChest.func_110134_a((IInvBasic) this);
}
 
开发者ID:soultek101,项目名称:projectzulu1.7.10,代码行数:26,代码来源:EntityCamel.java

示例7: dropItemsInChest

import net.minecraft.inventory.AnimalChest; //导入方法依赖的package包/类
private void dropItemsInChest(Entity entityIn, AnimalChest animalChestIn)
{
    if (animalChestIn != null && !this.worldObj.isRemote)
    {
        for (int i = 0; i < animalChestIn.getSizeInventory(); ++i)
        {
            ItemStack itemstack = animalChestIn.getStackInSlot(i);

            if (itemstack != null)
            {
                this.entityDropItem(itemstack, 0.0F);
            }
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:16,代码来源:EntityHorse.java

示例8: func_110226_cD

import net.minecraft.inventory.AnimalChest; //导入方法依赖的package包/类
private void func_110226_cD()
{
    AnimalChest var1 = this.horseChest;
    this.horseChest = new AnimalChest("HorseChest", this.func_110225_cC());
    this.horseChest.func_110133_a(this.getCommandSenderName());

    if (var1 != null)
    {
        var1.func_110132_b(this);
        int var2 = Math.min(var1.getSizeInventory(), this.horseChest.getSizeInventory());

        for (int var3 = 0; var3 < var2; ++var3)
        {
            ItemStack var4 = var1.getStackInSlot(var3);

            if (var4 != null)
            {
                this.horseChest.setInventorySlotContents(var3, var4.copy());
            }
        }

        var1 = null;
    }

    this.horseChest.func_110134_a(this);
    this.func_110232_cE();
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:28,代码来源:EntityHorse.java

示例9: dropItemsInChest

import net.minecraft.inventory.AnimalChest; //导入方法依赖的package包/类
private void dropItemsInChest(Entity par1Entity, AnimalChest par2AnimalChest)
{
    if (par2AnimalChest != null && !this.worldObj.isClient)
    {
        for (int var3 = 0; var3 < par2AnimalChest.getSizeInventory(); ++var3)
        {
            ItemStack var4 = par2AnimalChest.getStackInSlot(var3);

            if (var4 != null)
            {
                this.entityDropItem(var4, 0.0F);
            }
        }
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:16,代码来源:EntityHorse.java

示例10: dropItemsInChest

import net.minecraft.inventory.AnimalChest; //导入方法依赖的package包/类
private void dropItemsInChest(Entity par1Entity, AnimalChest par2AnimalChest) {
	if (par2AnimalChest != null && !this.worldObj.isRemote) {
		for (int i = 0; i < par2AnimalChest.getSizeInventory(); ++i) {
			ItemStack itemstack = par2AnimalChest.getStackInSlot(i);

			if (itemstack != null) {
				this.entityDropItem(itemstack, 0.0F);
			}
		}
	}
}
 
开发者ID:mookie1097,项目名称:NausicaaMod,代码行数:12,代码来源:EntityHorseclaw.java

示例11: func_110226_cD

import net.minecraft.inventory.AnimalChest; //导入方法依赖的package包/类
public void func_110226_cD()   // CraftBukkit - private -> public
{
    AnimalChest animalchest = this.horseChest;
    this.horseChest = new AnimalChest("HorseChest", this.func_110225_cC(), this); // CraftBukkit - add this horse
    this.horseChest.func_110133_a(this.getCommandSenderName());

    if (animalchest != null)
    {
        animalchest.func_110132_b(this);
        int i = Math.min(animalchest.getSizeInventory(), this.horseChest.getSizeInventory());

        for (int j = 0; j < i; ++j)
        {
            ItemStack itemstack = animalchest.getStackInSlot(j);

            if (itemstack != null)
            {
                this.horseChest.setInventorySlotContents(j, itemstack.copy());
            }
        }

        animalchest = null;
    }

    this.horseChest.func_110134_a(this);
    this.func_110232_cE();
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:28,代码来源:EntityHorse.java

示例12: dropItemsInChest

import net.minecraft.inventory.AnimalChest; //导入方法依赖的package包/类
private void dropItemsInChest(Entity p_110240_1_, AnimalChest p_110240_2_)
{
    if (p_110240_2_ != null && !this.worldObj.isRemote)
    {
        for (int i = 0; i < p_110240_2_.getSizeInventory(); ++i)
        {
            ItemStack itemstack = p_110240_2_.getStackInSlot(i);

            if (itemstack != null)
            {
                this.entityDropItem(itemstack, 0.0F);
            }
        }
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:16,代码来源:EntityHorse.java

示例13: func_110226_cD

import net.minecraft.inventory.AnimalChest; //导入方法依赖的package包/类
private void func_110226_cD()
{
    AnimalChest animalchest = this.horseChest;
    this.horseChest = new AnimalChest("HorseChest", this.func_110225_cC());
    this.horseChest.func_110133_a(this.getCommandSenderName());

    if (animalchest != null)
    {
        animalchest.func_110132_b(this);
        int i = Math.min(animalchest.getSizeInventory(), this.horseChest.getSizeInventory());

        for (int j = 0; j < i; ++j)
        {
            ItemStack itemstack = animalchest.getStackInSlot(j);

            if (itemstack != null)
            {
                this.horseChest.setInventorySlotContents(j, itemstack.copy());
            }
        }

        animalchest = null;
    }

    this.horseChest.func_110134_a(this);
    this.func_110232_cE();
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:28,代码来源:EntityHorse.java

示例14: func_110226_cD

import net.minecraft.inventory.AnimalChest; //导入方法依赖的package包/类
private void func_110226_cD()
{
    AnimalChest animalchest = this.horseChest;
    this.horseChest = new AnimalChest("HorseChest", this.func_110225_cC());
    this.horseChest.func_110133_a(this.getEntityName());

    if (animalchest != null)
    {
        animalchest.func_110132_b(this);
        int i = Math.min(animalchest.getSizeInventory(), this.horseChest.getSizeInventory());

        for (int j = 0; j < i; ++j)
        {
            ItemStack itemstack = animalchest.getStackInSlot(j);

            if (itemstack != null)
            {
                this.horseChest.setInventorySlotContents(j, itemstack.copy());
            }
        }

        animalchest = null;
    }

    this.horseChest.func_110134_a(this);
    this.func_110232_cE();
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:28,代码来源:EntityHorse.java

示例15: dropItemsInChest

import net.minecraft.inventory.AnimalChest; //导入方法依赖的package包/类
private void dropItemsInChest(Entity par1Entity, AnimalChest par2AnimalChest)
{
    if (par2AnimalChest != null && !this.worldObj.isRemote)
    {
        for (int i = 0; i < par2AnimalChest.getSizeInventory(); ++i)
        {
            ItemStack itemstack = par2AnimalChest.getStackInSlot(i);

            if (itemstack != null)
            {
                this.entityDropItem(itemstack, 0.0F);
            }
        }
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:16,代码来源:EntityHorse.java


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