本文整理汇总了Java中net.minecraft.inventory.ContainerDispenser类的典型用法代码示例。如果您正苦于以下问题:Java ContainerDispenser类的具体用法?Java ContainerDispenser怎么用?Java ContainerDispenser使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ContainerDispenser类属于net.minecraft.inventory包,在下文中一共展示了ContainerDispenser类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: func_146102_a
import net.minecraft.inventory.ContainerDispenser; //导入依赖的package包/类
public void func_146102_a(TileEntityDispenser p_146102_1_)
{
// CraftBukkit start - Inventory open hook
Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerDispenser(this.inventory, p_146102_1_));
if (container == null)
{
p_146102_1_.closeInventory(); // Cauldron - prevent chests from being stuck in open state on clients
return;
}
// CraftBukkit end
this.getNextWindowId();
this.playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(this.currentWindowId, p_146102_1_ instanceof TileEntityDropper ? 10 : 3, p_146102_1_.getInventoryName(), p_146102_1_.getSizeInventory(), p_146102_1_.hasCustomInventoryName()));
this.openContainer = container; // CraftBukkit - Use container we passed to event
this.openContainer.windowId = this.currentWindowId;
this.openContainer.addCraftingToCrafters(this);
}
示例2: func_146102_a
import net.minecraft.inventory.ContainerDispenser; //导入依赖的package包/类
public void func_146102_a(TileEntityDispenser p_146102_1_)
{
this.getNextWindowId();
this.playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(this.currentWindowId, p_146102_1_ instanceof TileEntityDropper ? 10 : 3, p_146102_1_.getInventoryName(), p_146102_1_.getSizeInventory(), p_146102_1_.isInventoryNameLocalized()));
this.openContainer = new ContainerDispenser(this.inventory, p_146102_1_);
this.openContainer.windowId = this.currentWindowId;
this.openContainer.addCraftingToCrafters(this);
}
示例3: func_146102_a
import net.minecraft.inventory.ContainerDispenser; //导入依赖的package包/类
public void func_146102_a(TileEntityDispenser p_146102_1_)
{
this.getNextWindowId();
this.playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(this.currentWindowId, p_146102_1_ instanceof TileEntityDropper ? 10 : 3, p_146102_1_.getInventoryName(), p_146102_1_.getSizeInventory(), p_146102_1_.hasCustomInventoryName()));
this.openContainer = new ContainerDispenser(this.inventory, p_146102_1_);
this.openContainer.windowId = this.currentWindowId;
this.openContainer.addCraftingToCrafters(this);
}
示例4: func_71006_a
import net.minecraft.inventory.ContainerDispenser; //导入依赖的package包/类
public void func_71006_a(TileEntityDispenser p_71006_1_) {
this.func_71117_bO();
this.field_71135_a.func_72567_b(new Packet100OpenWindow(this.field_71139_cq, p_71006_1_ instanceof TileEntityDropper?10:3, p_71006_1_.func_70303_b(), p_71006_1_.func_70302_i_(), p_71006_1_.func_94042_c()));
this.field_71070_bA = new ContainerDispenser(this.field_71071_by, p_71006_1_);
this.field_71070_bA.field_75152_c = this.field_71139_cq;
this.field_71070_bA.func_75132_a(this);
}
示例5: displayGUIDispenser
import net.minecraft.inventory.ContainerDispenser; //导入依赖的package包/类
/**
* Displays the dipsenser GUI for the passed in dispenser entity. Args: TileEntityDispenser
*/
public void displayGUIDispenser(TileEntityDispenser par1TileEntityDispenser)
{
this.incrementWindowID();
this.playerNetServerHandler.sendPacketToPlayer(new Packet100OpenWindow(this.currentWindowId, par1TileEntityDispenser instanceof TileEntityDropper ? 10 : 3, par1TileEntityDispenser.getInvName(), par1TileEntityDispenser.getSizeInventory(), par1TileEntityDispenser.isInvNameLocalized()));
this.openContainer = new ContainerDispenser(this.inventory, par1TileEntityDispenser);
this.openContainer.windowId = this.currentWindowId;
this.openContainer.addCraftingToCrafters(this);
}
示例6: createContainer
import net.minecraft.inventory.ContainerDispenser; //导入依赖的package包/类
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
{
return new ContainerDispenser(playerInventory, this);
}
示例7: GuiDispenser
import net.minecraft.inventory.ContainerDispenser; //导入依赖的package包/类
public GuiDispenser(InventoryPlayer playerInv, IInventory dispenserInv)
{
super(new ContainerDispenser(playerInv, dispenserInv));
this.playerInventory = playerInv;
this.dispenserInventory = dispenserInv;
}
示例8: createContainer
import net.minecraft.inventory.ContainerDispenser; //导入依赖的package包/类
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
{
this.fillWithLoot(playerIn);
return new ContainerDispenser(playerInventory, this);
}
示例9: GuiObsidianDispener
import net.minecraft.inventory.ContainerDispenser; //导入依赖的package包/类
public GuiObsidianDispener(InventoryPlayer playerInv, IInventory dispenserInv)
{
super(new ContainerDispenser(playerInv, dispenserInv));
this.playerInventory = playerInv;
this.dispenserInventory = dispenserInv;
}
示例10: createContainer
import net.minecraft.inventory.ContainerDispenser; //导入依赖的package包/类
@Override
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn) {
this.addLoot(playerIn);
return new ContainerDispenser(playerInventory, this);
}
示例11: GuiDispenser
import net.minecraft.inventory.ContainerDispenser; //导入依赖的package包/类
public GuiDispenser(InventoryPlayer par1InventoryPlayer, TileEntityDispenser par2TileEntityDispenser)
{
super(new ContainerDispenser(par1InventoryPlayer, par2TileEntityDispenser));
this.field_147089_u = par2TileEntityDispenser;
}
示例12: GuiDispenser
import net.minecraft.inventory.ContainerDispenser; //导入依赖的package包/类
public GuiDispenser(InventoryPlayer p_i1098_1_, TileEntityDispenser p_i1098_2_)
{
super(new ContainerDispenser(p_i1098_1_, p_i1098_2_));
this.tileDispenser = p_i1098_2_;
}
示例13: GuiDispenser
import net.minecraft.inventory.ContainerDispenser; //导入依赖的package包/类
public GuiDispenser(InventoryPlayer p_i1098_1_, TileEntityDispenser p_i1098_2_) {
super(new ContainerDispenser(p_i1098_1_, p_i1098_2_));
this.field_94078_r = p_i1098_2_;
}
示例14: GuiDispenser
import net.minecraft.inventory.ContainerDispenser; //导入依赖的package包/类
public GuiDispenser(InventoryPlayer par1InventoryPlayer, TileEntityDispenser par2TileEntityDispenser)
{
super(new ContainerDispenser(par1InventoryPlayer, par2TileEntityDispenser));
this.theDispenser = par2TileEntityDispenser;
}