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


Java ContainerDispenser类代码示例

本文整理汇总了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);
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:19,代码来源:EntityPlayerMP.java

示例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);
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:9,代码来源:EntityPlayerMP.java

示例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);
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:9,代码来源:EntityPlayerMP.java

示例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);
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:8,代码来源:EntityPlayerMP.java

示例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);
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:12,代码来源:EntityPlayerMP.java

示例6: createContainer

import net.minecraft.inventory.ContainerDispenser; //导入依赖的package包/类
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
{
    return new ContainerDispenser(playerInventory, this);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:5,代码来源:TileEntityDispenser.java

示例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;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:7,代码来源:GuiDispenser.java

示例8: createContainer

import net.minecraft.inventory.ContainerDispenser; //导入依赖的package包/类
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
{
    this.fillWithLoot(playerIn);
    return new ContainerDispenser(playerInventory, this);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:6,代码来源:TileEntityDispenser.java

示例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;
}
 
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:7,代码来源:GuiObsidianDispener.java

示例10: createContainer

import net.minecraft.inventory.ContainerDispenser; //导入依赖的package包/类
@Override
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn) {
  this.addLoot(playerIn);
  return new ContainerDispenser(playerInventory, this);
}
 
开发者ID:PrinceOfAmber,项目名称:Cyclic,代码行数:6,代码来源:EntityMinecartDropper.java

示例11: GuiDispenser

import net.minecraft.inventory.ContainerDispenser; //导入依赖的package包/类
public GuiDispenser(InventoryPlayer par1InventoryPlayer, TileEntityDispenser par2TileEntityDispenser)
{
    super(new ContainerDispenser(par1InventoryPlayer, par2TileEntityDispenser));
    this.field_147089_u = par2TileEntityDispenser;
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:6,代码来源:GuiDispenser.java

示例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_;
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:6,代码来源:GuiDispenser.java

示例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_;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:5,代码来源:GuiDispenser.java

示例14: GuiDispenser

import net.minecraft.inventory.ContainerDispenser; //导入依赖的package包/类
public GuiDispenser(InventoryPlayer par1InventoryPlayer, TileEntityDispenser par2TileEntityDispenser)
{
    super(new ContainerDispenser(par1InventoryPlayer, par2TileEntityDispenser));
    this.theDispenser = par2TileEntityDispenser;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:6,代码来源:GuiDispenser.java


注:本文中的net.minecraft.inventory.ContainerDispenser类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。