Java 类net.minecraft.inventory.ContainerFurnace 实例源码

项目:Cauldron    文件:EntityPlayerMP.java   
public void func_146101_a(TileEntityFurnace p_146101_1_)
{
    // CraftBukkit start - Inventory open hook
    Container container = CraftEventFactory.callInventoryOpenEvent(this, new ContainerFurnace(this.inventory, p_146101_1_));

    if (container == null)
    {
        p_146101_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, 2, p_146101_1_.getInventoryName(), p_146101_1_.getSizeInventory(), p_146101_1_.hasCustomInventoryName()));
    this.openContainer = container; // CraftBukkit - Use container we passed to event
    this.openContainer.windowId = this.currentWindowId;
    this.openContainer.addCraftingToCrafters(this);
}
项目:Minecraft-Modding-Tutorials    文件:GuiHandler.java   
@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
    if(ID == MINI_CHEST) {
        return new ContainerMiniChest(player.inventory, (TileEntityMiniChest) world.getTileEntity(new BlockPos(x, y, z)));
    }
    if(ID == COPPER_FURNACE) {
        return new ContainerFurnace(player.inventory, (TileEntityCopperFurnace) world.getTileEntity(new BlockPos(x, y, z)));
    }
    return null;
}
项目:Resilience-Client-Source    文件:EntityPlayerMP.java   
public void func_146101_a(TileEntityFurnace p_146101_1_)
{
    this.getNextWindowId();
    this.playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(this.currentWindowId, 2, p_146101_1_.getInventoryName(), p_146101_1_.getSizeInventory(), p_146101_1_.isInventoryNameLocalized()));
    this.openContainer = new ContainerFurnace(this.inventory, p_146101_1_);
    this.openContainer.windowId = this.currentWindowId;
    this.openContainer.addCraftingToCrafters(this);
}
项目:SecurityCraft    文件:GuiKeypadFurnaceInventory.java   
public GuiKeypadFurnaceInventory(InventoryPlayer p_i1091_1_, TileEntityKeypadFurnace p_i1091_2_){
    super(new ContainerFurnace(p_i1091_1_, p_i1091_2_));
    tileFurnace = p_i1091_2_;

    if(new Random().nextInt(100) < 5)
        gurnace = true;
}
项目:SecurityCraft    文件:GuiKeypadFurnaceInventory.java   
public GuiKeypadFurnaceInventory(InventoryPlayer p_i1091_1_, TileEntityKeypadFurnace p_i1091_2_){
    super(new ContainerFurnace(p_i1091_1_, p_i1091_2_));
    tileFurnace = p_i1091_2_;

    if(new Random().nextInt(100) < 5)
        gurnace = true;
}
项目:SecurityCraft    文件:GuiKeypadFurnaceInventory.java   
public GuiKeypadFurnaceInventory(InventoryPlayer p_i1091_1_, TileEntityKeypadFurnace p_i1091_2_){
    super(new ContainerFurnace(p_i1091_1_, p_i1091_2_));
    tileFurnace = p_i1091_2_;

    if(new Random().nextInt(100) < 5)
        gurnace = true;
}
项目:SecurityCraft    文件:GuiKeypadFurnaceInventory.java   
public GuiKeypadFurnaceInventory(InventoryPlayer p_i1091_1_, TileEntityKeypadFurnace p_i1091_2_){
    super(new ContainerFurnace(p_i1091_1_, p_i1091_2_));
    tileFurnace = p_i1091_2_;

    if(new Random().nextInt(100) < 5)
        gurnace = true;
}
项目:SecurityCraft    文件:GuiKeypadFurnaceInventory.java   
public GuiKeypadFurnaceInventory(InventoryPlayer p_i1091_1_, TileEntityKeypadFurnace p_i1091_2_){
    super(new ContainerFurnace(p_i1091_1_, p_i1091_2_));
    tileFurnace = p_i1091_2_;

    if(new Random().nextInt(100) < 5)
        gurnace = true;
}
项目:SecurityCraft    文件:GuiKeypadFurnaceInventory.java   
public GuiKeypadFurnaceInventory(InventoryPlayer p_i1091_1_, TileEntityFurnace p_i1091_2_){
    super(new ContainerFurnace(p_i1091_1_, p_i1091_2_));
    tileFurnace = p_i1091_2_;

    if(new Random().nextInt(100) < 5)
        gurnace = true;
}
项目:Cauldron    文件:EntityPlayerMP.java   
public void func_146101_a(TileEntityFurnace p_146101_1_)
{
    this.getNextWindowId();
    this.playerNetServerHandler.sendPacket(new S2DPacketOpenWindow(this.currentWindowId, 2, p_146101_1_.getInventoryName(), p_146101_1_.getSizeInventory(), p_146101_1_.hasCustomInventoryName()));
    this.openContainer = new ContainerFurnace(this.inventory, p_146101_1_);
    this.openContainer.windowId = this.currentWindowId;
    this.openContainer.addCraftingToCrafters(this);
}
项目:RuneCraftery    文件:EntityPlayerMP.java   
public void func_71042_a(TileEntityFurnace p_71042_1_) {
   this.func_71117_bO();
   this.field_71135_a.func_72567_b(new Packet100OpenWindow(this.field_71139_cq, 2, p_71042_1_.func_70303_b(), p_71042_1_.func_70302_i_(), p_71042_1_.func_94042_c()));
   this.field_71070_bA = new ContainerFurnace(this.field_71071_by, p_71042_1_);
   this.field_71070_bA.field_75152_c = this.field_71139_cq;
   this.field_71070_bA.func_75132_a(this);
}
项目:RuneCraftery    文件:EntityPlayerMP.java   
/**
 * Displays the furnace GUI for the passed in furnace entity. Args: tileEntityFurnace
 */
public void displayGUIFurnace(TileEntityFurnace par1TileEntityFurnace)
{
    this.incrementWindowID();
    this.playerNetServerHandler.sendPacketToPlayer(new Packet100OpenWindow(this.currentWindowId, 2, par1TileEntityFurnace.getInvName(), par1TileEntityFurnace.getSizeInventory(), par1TileEntityFurnace.isInvNameLocalized()));
    this.openContainer = new ContainerFurnace(this.inventory, par1TileEntityFurnace);
    this.openContainer.windowId = this.currentWindowId;
    this.openContainer.addCraftingToCrafters(this);
}
项目:BetterNutritionMod    文件:EntityPlayerMP.java   
/**
 * Displays the furnace GUI for the passed in furnace entity. Args: tileEntityFurnace
 */
public void displayGUIFurnace(TileEntityFurnace par1TileEntityFurnace)
{
    this.incrementWindowID();
    this.playerNetServerHandler.sendPacketToPlayer(new Packet100OpenWindow(this.currentWindowId, 2, par1TileEntityFurnace.getInvName(), par1TileEntityFurnace.getSizeInventory(), par1TileEntityFurnace.isInvNameLocalized()));
    this.openContainer = new ContainerFurnace(this.inventory, par1TileEntityFurnace);
    this.openContainer.windowId = this.currentWindowId;
    this.openContainer.addCraftingToCrafters(this);
}
项目:DecompiledMinecraft    文件:TileEntityFurnace.java   
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
{
    return new ContainerFurnace(playerInventory, this);
}
项目:DecompiledMinecraft    文件:GuiFurnace.java   
public GuiFurnace(InventoryPlayer playerInv, IInventory furnaceInv)
{
    super(new ContainerFurnace(playerInv, furnaceInv));
    this.playerInventory = playerInv;
    this.tileFurnace = furnaceInv;
}
项目:DecompiledMinecraft    文件:TileEntityFurnace.java   
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
{
    return new ContainerFurnace(playerInventory, this);
}
项目:BaseClient    文件:GuiFurnace.java   
public GuiFurnace(InventoryPlayer playerInv, IInventory furnaceInv)
{
    super(new ContainerFurnace(playerInv, furnaceInv));
    this.playerInventory = playerInv;
    this.tileFurnace = furnaceInv;
}
项目:BaseClient    文件:TileEntityFurnace.java   
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
{
    return new ContainerFurnace(playerInventory, this);
}
项目:BaseClient    文件:GuiFurnace.java   
public GuiFurnace(InventoryPlayer playerInv, IInventory furnaceInv)
{
    super(new ContainerFurnace(playerInv, furnaceInv));
    this.playerInventory = playerInv;
    this.tileFurnace = furnaceInv;
}
项目:BaseClient    文件:TileEntityFurnace.java   
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
{
    return new ContainerFurnace(playerInventory, this);
}
项目:Backmemed    文件:GuiFurnace.java   
public GuiFurnace(InventoryPlayer playerInv, IInventory furnaceInv)
{
    super(new ContainerFurnace(playerInv, furnaceInv));
    this.playerInventory = playerInv;
    this.tileFurnace = furnaceInv;
}
项目:Backmemed    文件:TileEntityFurnace.java   
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
{
    return new ContainerFurnace(playerInventory, this);
}
项目:CustomWorldGen    文件:GuiFurnace.java   
public GuiFurnace(InventoryPlayer playerInv, IInventory furnaceInv)
{
    super(new ContainerFurnace(playerInv, furnaceInv));
    this.playerInventory = playerInv;
    this.tileFurnace = furnaceInv;
}
项目:CustomWorldGen    文件:TileEntityFurnace.java   
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
{
    return new ContainerFurnace(playerInventory, this);
}
项目:Naschkatze    文件:TileEntityNkGrinder.java   
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
{
    return new ContainerFurnace(playerInventory, this);
}
项目:Minecraft-Modding-Tutorials    文件:TileEntityCopperFurnace.java   
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
{
    return new ContainerFurnace(playerInventory, this);
}
项目:EnderCore    文件:EnderCoreMethods.java   
public static ItemStack transferStackInSlot(ContainerFurnace inv, EntityPlayer p_82846_1_, int p_82846_2_) {
  ItemStack itemstack = null;
  Slot slot = (Slot) inv.inventorySlots.get(p_82846_2_);

  if (slot != null && slot.getHasStack()) {
    ItemStack itemstack1 = slot.getStack();
    itemstack = itemstack1.copy();

    if (p_82846_2_ == 2) {
      if (!mergeItemStack(inv, itemstack1, 3, 39, true)) {
        return null;
      }

      slot.onSlotChange(itemstack1, itemstack);
    } else if (p_82846_2_ != 1 && p_82846_2_ != 0) {
      // I have moved this check to the beginning
      if (TileEntityFurnace.isItemFuel(itemstack1)) {
        if (!mergeItemStack(inv, itemstack1, 1, 2, false)) {
          // Nest this inside so that if the above fails it will
          // attempt to do the input slot
          if (FurnaceRecipes.smelting().getSmeltingResult(itemstack1) != null) {
            if (!mergeItemStack(inv, itemstack1, 0, 1, false)) {
              return null;
            }
          }
        }
      } else if (FurnaceRecipes.smelting().getSmeltingResult(itemstack1) != null) {
        if (!mergeItemStack(inv, itemstack1, 0, 1, false)) {
          return null;
        }
      } else if (p_82846_2_ >= 3 && p_82846_2_ < 30) {
        if (!mergeItemStack(inv, itemstack1, 30, 39, false)) {
          return null;
        }
      } else if (p_82846_2_ >= 30 && p_82846_2_ < 39 && !mergeItemStack(inv, itemstack1, 3, 30, false)) {
        return null;
      }
    } else if (!mergeItemStack(inv, itemstack1, 3, 39, false)) {
      return null;
    }

    if (itemstack1.stackSize == 0) {
      slot.putStack((ItemStack) null);
    } else {
      slot.onSlotChanged();
    }

    if (itemstack1.stackSize == itemstack.stackSize) {
      return null;
    }

    slot.onPickupFromSlot(p_82846_1_, itemstack1);
  }

  return itemstack;
}
项目:NordMod    文件:TileAbstractEnergyMachineDoubleInput.java   
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn) {
    return new ContainerFurnace(playerInventory, this);
}
项目:NordMod    文件:TileAbstractEnergyCable.java   
@Override
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn) {
    return new ContainerFurnace(playerInventory, this);
}
项目:NordMod    文件:TileAbstractEnergyAccumulator.java   
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn) {
    return new ContainerFurnace(playerInventory, this);
}
项目:NordMod    文件:TileAbstractEnergyMachine.java   
@Override
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn) {
    return new ContainerFurnace(playerInventory, this);
}
项目:NordMod    文件:TileAbstractEnergyGenerator.java   
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn) {
    return new ContainerFurnace(playerInventory, this);
}
项目:Resilience-Client-Source    文件:GuiFurnace.java   
public GuiFurnace(InventoryPlayer par1InventoryPlayer, TileEntityFurnace par2TileEntityFurnace)
{
    super(new ContainerFurnace(par1InventoryPlayer, par2TileEntityFurnace));
    this.field_147086_v = par2TileEntityFurnace;
}
项目:ExpandedRailsMod    文件:GuiFurnace.java   
public GuiFurnace(InventoryPlayer playerInv, IInventory furnaceInv)
{
    super(new ContainerFurnace(playerInv, furnaceInv));
    this.playerInventory = playerInv;
    this.tileFurnace = furnaceInv;
}
项目:mcplus_mods    文件:TileEntityLoom.java   
@Override
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
{
    return new ContainerFurnace(playerInventory, this);
}
项目:SecurityCraft    文件:TileEntityKeypadFurnace.java   
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
{
    return new ContainerFurnace(playerInventory, this);
}
项目:SecurityCraft    文件:TileEntityKeypadFurnace.java   
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
{
    return new ContainerFurnace(playerInventory, this);
}
项目:SecurityCraft    文件:TileEntityKeypadFurnace.java   
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
{
    return new ContainerFurnace(playerInventory, this);
}
项目:SecurityCraft    文件:TileEntityKeypadFurnace.java   
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
{
    return new ContainerFurnace(playerInventory, this);
}
项目:SecurityCraft    文件:TileEntityKeypadFurnace.java   
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
{
    return new ContainerFurnace(playerInventory, this);
}