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