本文整理汇总了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);
}
}
}
}
示例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);
}
}
}
}
示例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);
}
}
}
}
示例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);
}
}
}
}
示例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);
}
}
}
}
示例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);
}
}
}
}