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


Java AnimalChest.getSizeInventory方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: 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

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