Package net.minecraft.inventory

Examples of net.minecraft.inventory.Container


  @Override
  public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
    if (world.isRemote || !player.isSneaking()) return stack;
    String title = StackUtils.get(stack, "", "display", "Name");
    int protectedSlot = player.inventory.currentItem;
    Container container = new ContainerKeyring(player, title, protectedSlot);
    PlayerUtils.openGui(player, Constants.containerKeyring, protectedSlot, 1, title, container);
    return stack;
  }
View Full Code Here


  public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player,
                                  int side, float hitX, float hitY, float hitZ) {
    if (!world.isRemote) {
      TileEntityBackpack backpack = WorldUtils.get(world, x, y, z, TileEntityBackpack.class);
      IInventory inventory = new InventoryTileEntity(backpack, player.getInventoryEnderChest());
      Container container = new ContainerBetterStorage(player, inventory, 9, 3);
      String name = "container." + Constants.modId + ".enderBackpack";
      PlayerUtils.openGui(player, name, 9, 3, backpack.getCustomTitle(), container);
    }
    return true;
  }
View Full Code Here

    inventory = new InventoryBackpackEquipped(carrier, player, inventory);
    if (!inventory.isUseableByPlayer(player)) return false;
   
    int columns = backpackType.getBackpackColumns();
    int rows = backpackType.getBackpackRows();
    Container container = new ContainerBetterStorage(player, inventory, columns, rows);
   
    String title = StackUtils.get(backpack, "", "display", "Name");
    PlayerUtils.openGui(player, inventory.getInventoryName(), columns, rows, title, container);
   
    return true;
View Full Code Here

            {
                try
                {
                    datainputstream = new DataInputStream(new ByteArrayInputStream(p_147349_1_.func_149558_e()));
                    i = datainputstream.readInt();
                    Container container = net.playerEntity.openContainer;

                    if (container instanceof ContainerMerchant)
                    {
                        ((ContainerMerchant)container).setCurrentRecipeIndex(i);
                    }
View Full Code Here

    }
  }

  private void onLetterInfo(PacketLetterInfo packet) {

    Container container = Proxies.common.getClientInstance().thePlayer.openContainer;
    if (container instanceof ContainerLetter) {
      ((ContainerLetter) container).handleLetterInfoUpdate(packet);
    } else if(container instanceof ContainerCatalogue) {
      ((ContainerCatalogue) container).handleTradeInfoUpdate(packet);
    }
View Full Code Here

  private void onGuiSelection(PacketUpdate packet) {
    assert FMLCommonHandler.instance().getEffectiveSide().isClient();

    EntityPlayer player = Proxies.common.getPlayer();

    Container container = player.openContainer;
    if (!(container instanceof IGuiSelectable))
      return;

    ((IGuiSelectable) container).setSelection(packet);
View Full Code Here

import net.minecraft.inventory.InventoryCrafting;

public class AutoCraftingInventory extends InventoryCrafting {
  public final PlayerIdentifier placedByPlayer;
  public AutoCraftingInventory(PlayerIdentifier playerID) {
    super(new Container() {
      @Override public boolean canInteractWith(EntityPlayer entityplayer) {return false;}
      @Override public void onCraftMatrixChanged(IInventory par1iInventory) {}
    }, 3, 3);
    this.placedByPlayer = playerID;
  }
View Full Code Here

       
        // Import recipeInputs
       
        ItemStack[][] recipe = (ItemStack[][]) tileAutoCraftingMk2.getField("recipeInputs").get(tile);
        // Not really a AutoCraftingInventory, but same content
        InventoryCrafting tempCraftingInv = new InventoryCrafting(new Container() {
          @Override public boolean canInteractWith(EntityPlayer entityplayer) {return false;}
          @Override public void onCraftMatrixChanged(IInventory par1iInventory) {}
        }, 3, 3);
       
        for(int i = 0; i < 9; i++) {
View Full Code Here

  private PipeItemsSatelliteLogistics _satellite;
  private PipeFluidSatellite _liquidSatellite;
  private EntityPlayer _player;

  public GuiSatellitePipe(PipeItemsSatelliteLogistics satellite, EntityPlayer player){
    super(new Container(){
      @Override
      public boolean canInteractWith(EntityPlayer entityplayer) {
        return true;
      }
    });
View Full Code Here

    this.xSize = 116;
    this.ySize = 70;
  }
 
  public GuiSatellitePipe(PipeFluidSatellite satellite, EntityPlayer player){
    super(new Container(){
      @Override
      public boolean canInteractWith(EntityPlayer entityplayer) {
        return true;
      }
    });
View Full Code Here

TOP

Related Classes of net.minecraft.inventory.Container

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.