本文整理汇总了Java中net.minecraft.inventory.ContainerHorseInventory类的典型用法代码示例。如果您正苦于以下问题:Java ContainerHorseInventory类的具体用法?Java ContainerHorseInventory怎么用?Java ContainerHorseInventory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ContainerHorseInventory类属于net.minecraft.inventory包,在下文中一共展示了ContainerHorseInventory类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: displayGUIHorse
import net.minecraft.inventory.ContainerHorseInventory; //导入依赖的package包/类
public void displayGUIHorse(EntityHorse p_110298_1_, IInventory p_110298_2_)
{
// CraftBukkit start - Inventory open hook
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerHorseInventory(this.inventory, p_110298_2_, p_110298_1_));
if (container == null)
{
p_110298_2_.closeInventory(); // Cauldron - prevent chests from being stuck in open state on clients
return;
}
// CraftBukkit end
if (this.openContainer != this.inventoryContainer)
{
this.closeScreen();
}
this.getNextWindowId();
this.playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(this.currentWindowId, 11, p_110298_2_.getInventoryName(), p_110298_2_.getSizeInventory(), p_110298_2_.hasCustomInventoryName(), p_110298_1_.getEntityId()));
this.openContainer = container; // CraftBukkit - Use container we passed to event
this.openContainer.windowId = this.currentWindowId;
this.openContainer.addCraftingToCrafters(this);
}
示例2: displayGUIHorse
import net.minecraft.inventory.ContainerHorseInventory; //导入依赖的package包/类
public void displayGUIHorse(EntityHorse horse, IInventory horseInventory)
{
if (this.openContainer != this.inventoryContainer)
{
this.closeScreen();
}
this.getNextWindowId();
this.playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(this.currentWindowId, "EntityHorse", horseInventory.getDisplayName(), horseInventory.getSizeInventory(), horse.getEntityId()));
this.openContainer = new ContainerHorseInventory(this.inventory, horseInventory, horse, this);
this.openContainer.windowId = this.currentWindowId;
this.openContainer.onCraftGuiOpened(this);
}
示例3: GuiScreenHorseInventory
import net.minecraft.inventory.ContainerHorseInventory; //导入依赖的package包/类
public GuiScreenHorseInventory(IInventory playerInv, IInventory horseInv, EntityHorse horse)
{
super(new ContainerHorseInventory(playerInv, horseInv, horse, Minecraft.getMinecraft().thePlayer));
this.playerInventory = playerInv;
this.horseInventory = horseInv;
this.horseEntity = horse;
this.allowUserInput = false;
}
示例4: openGuiHorseInventory
import net.minecraft.inventory.ContainerHorseInventory; //导入依赖的package包/类
public void openGuiHorseInventory(AbstractHorse horse, IInventory inventoryIn)
{
if (this.openContainer != this.inventoryContainer)
{
this.closeScreen();
}
this.getNextWindowId();
this.connection.sendPacket(new SPacketOpenWindow(this.currentWindowId, "EntityHorse", inventoryIn.getDisplayName(), inventoryIn.getSizeInventory(), horse.getEntityId()));
this.openContainer = new ContainerHorseInventory(this.inventory, inventoryIn, horse, this);
this.openContainer.windowId = this.currentWindowId;
this.openContainer.addListener(this);
}
示例5: GuiScreenHorseInventory
import net.minecraft.inventory.ContainerHorseInventory; //导入依赖的package包/类
public GuiScreenHorseInventory(IInventory playerInv, IInventory horseInv, AbstractHorse horse)
{
super(new ContainerHorseInventory(playerInv, horseInv, horse, Minecraft.getMinecraft().player));
this.playerInventory = playerInv;
this.horseInventory = horseInv;
this.horseEntity = horse;
this.allowUserInput = false;
}
示例6: openGuiHorseInventory
import net.minecraft.inventory.ContainerHorseInventory; //导入依赖的package包/类
public void openGuiHorseInventory(EntityHorse horse, IInventory inventoryIn)
{
if (this.openContainer != this.inventoryContainer)
{
this.closeScreen();
}
this.getNextWindowId();
this.connection.sendPacket(new SPacketOpenWindow(this.currentWindowId, "EntityHorse", inventoryIn.getDisplayName(), inventoryIn.getSizeInventory(), horse.getEntityId()));
this.openContainer = new ContainerHorseInventory(this.inventory, inventoryIn, horse, this);
this.openContainer.windowId = this.currentWindowId;
this.openContainer.addListener(this);
}
示例7: displayGUIHorse
import net.minecraft.inventory.ContainerHorseInventory; //导入依赖的package包/类
public void displayGUIHorse(EntityHorse par1EntityHorse, IInventory par2IInventory)
{
if (this.openContainer != this.inventoryContainer)
{
this.closeScreen();
}
this.getNextWindowId();
this.playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(this.currentWindowId, 11, par2IInventory.getInventoryName(), par2IInventory.getSizeInventory(), par2IInventory.isInventoryNameLocalized(), par1EntityHorse.getEntityId()));
this.openContainer = new ContainerHorseInventory(this.inventory, par2IInventory, par1EntityHorse);
this.openContainer.windowId = this.currentWindowId;
this.openContainer.addCraftingToCrafters(this);
}
示例8: GuiScreenHorseInventory
import net.minecraft.inventory.ContainerHorseInventory; //导入依赖的package包/类
public GuiScreenHorseInventory(IInventory par1IInventory, IInventory par2IInventory, EntityHorse par3EntityHorse)
{
super(new ContainerHorseInventory(par1IInventory, par2IInventory, par3EntityHorse));
this.field_147030_v = par1IInventory;
this.field_147029_w = par2IInventory;
this.field_147034_x = par3EntityHorse;
this.field_146291_p = false;
}
示例9: GuiScreenHorseInventory
import net.minecraft.inventory.ContainerHorseInventory; //导入依赖的package包/类
public GuiScreenHorseInventory(IInventory p_i1093_1_, IInventory p_i1093_2_, EntityHorse p_i1093_3_)
{
super(new ContainerHorseInventory(p_i1093_1_, p_i1093_2_, p_i1093_3_));
this.field_147030_v = p_i1093_1_;
this.field_147029_w = p_i1093_2_;
this.field_147034_x = p_i1093_3_;
this.allowUserInput = false;
}
示例10: displayGUIHorse
import net.minecraft.inventory.ContainerHorseInventory; //导入依赖的package包/类
public void displayGUIHorse(EntityHorse p_110298_1_, IInventory p_110298_2_)
{
if (this.openContainer != this.inventoryContainer)
{
this.closeScreen();
}
this.getNextWindowId();
this.playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(this.currentWindowId, 11, p_110298_2_.getInventoryName(), p_110298_2_.getSizeInventory(), p_110298_2_.hasCustomInventoryName(), p_110298_1_.getEntityId()));
this.openContainer = new ContainerHorseInventory(this.inventory, p_110298_2_, p_110298_1_);
this.openContainer.windowId = this.currentWindowId;
this.openContainer.addCraftingToCrafters(this);
}
示例11: func_110298_a
import net.minecraft.inventory.ContainerHorseInventory; //导入依赖的package包/类
public void func_110298_a(EntityHorse p_110298_1_, IInventory p_110298_2_) {
if(this.field_71070_bA != this.field_71069_bz) {
this.func_71053_j();
}
this.func_71117_bO();
this.field_71135_a.func_72567_b(new Packet100OpenWindow(this.field_71139_cq, 11, p_110298_2_.func_70303_b(), p_110298_2_.func_70302_i_(), p_110298_2_.func_94042_c(), p_110298_1_.field_70157_k));
this.field_71070_bA = new ContainerHorseInventory(this.field_71071_by, p_110298_2_, p_110298_1_);
this.field_71070_bA.field_75152_c = this.field_71139_cq;
this.field_71070_bA.func_75132_a(this);
}
示例12: GuiScreenHorseInventory
import net.minecraft.inventory.ContainerHorseInventory; //导入依赖的package包/类
public GuiScreenHorseInventory(IInventory p_i1093_1_, IInventory p_i1093_2_, EntityHorse p_i1093_3_) {
super(new ContainerHorseInventory(p_i1093_1_, p_i1093_2_, p_i1093_3_));
this.field_110413_u = p_i1093_1_;
this.field_110412_v = p_i1093_2_;
this.field_110411_w = p_i1093_3_;
this.field_73885_j = false;
}
示例13: displayGUIHorse
import net.minecraft.inventory.ContainerHorseInventory; //导入依赖的package包/类
public void displayGUIHorse(EntityHorse par1EntityHorse, IInventory par2IInventory)
{
if (this.openContainer != this.inventoryContainer)
{
this.closeScreen();
}
this.incrementWindowID();
this.playerNetServerHandler.sendPacketToPlayer(new Packet100OpenWindow(this.currentWindowId, 11, par2IInventory.getInvName(), par2IInventory.getSizeInventory(), par2IInventory.isInvNameLocalized(), par1EntityHorse.entityId));
this.openContainer = new ContainerHorseInventory(this.inventory, par2IInventory, par1EntityHorse);
this.openContainer.windowId = this.currentWindowId;
this.openContainer.addCraftingToCrafters(this);
}
示例14: GuiScreenHorseInventory
import net.minecraft.inventory.ContainerHorseInventory; //导入依赖的package包/类
public GuiScreenHorseInventory(IInventory par1IInventory, IInventory par2IInventory, EntityHorse par3EntityHorse)
{
super(new ContainerHorseInventory(par1IInventory, par2IInventory, par3EntityHorse));
this.field_110413_u = par1IInventory;
this.field_110412_v = par2IInventory;
this.field_110411_w = par3EntityHorse;
this.allowUserInput = false;
}
示例15: ContainerHorseInventorySlotArmor
import net.minecraft.inventory.ContainerHorseInventory; //导入依赖的package包/类
ContainerHorseInventorySlotArmor(ContainerHorseInventory p_i1816_1_, IInventory p_i1816_2_, int p_i1816_3_, int p_i1816_4_, int p_i1816_5_, EntityHorse p_i1816_6_) {
super(p_i1816_2_, p_i1816_3_, p_i1816_4_, p_i1816_5_);
this.field_111240_b = p_i1816_1_;
this.field_111241_a = p_i1816_6_;
}