Package net.minecraft.inventory

Examples of net.minecraft.inventory.Container


        prepare(entityPlayer);

        MessageOpenPersonalSlot message = new MessageOpenPersonalSlot(entityPlayer.currentWindowId);
        Backpack.packetHandler.networkWrapper.sendTo(message, entityPlayer);

        Container container = FactoryBackpack.getContainer(playerSave, new IInventory[] { entityPlayer.inventory }, entityPlayer);
        openContainer(container, entityPlayer);
    }
View Full Code Here


    @Override
    public IMessage onMessage(MessageGuiCommand message, MessageContext ctx) {
        EntityPlayerMP entityPlayer = ctx.getServerHandler().playerEntity;

        Container container = entityPlayer.openContainer;

        switch(message.command) {
            case Constants.GuiCommands.CLEAR:
                if(container instanceof ContainerWorkbenchBackpack) {
                    ((ContainerWorkbenchBackpack) container).clearCraftMatrix();
View Full Code Here

    @Override
    public IMessage onMessage(MessageRecipe message, MessageContext ctx) {
        EntityPlayerMP entityPlayer = ctx.getServerHandler().playerEntity;

        Container container = entityPlayer.openContainer;

        if(container instanceof ContainerWorkbenchBackpack) {
            ((ContainerWorkbenchBackpack) container).clearCraftMatrix();

            for(SlotStack slotStack : message.recipeList) {
                container.putStackInSlot(slotStack.getSlot(), slotStack.getStack());
            }
        }

        return null;
    }
View Full Code Here

  /**
   * Handy method for retrieving all log items, finding their corresponding planks, and making recipes with them. Taken from CofhCore.
   */
  public static void addLogRecipes()
  {
    Container tempContainer = new Container() {
      public boolean canInteractWith(EntityPlayer player)
      {
        return false;
      }
    };
View Full Code Here

      }
    }
 
    public static void openServerGui(SorterGuiPacket t, int guiType, World world, EntityPlayerMP playerMP, Coord4D obj, int i)
    {
      Container container = null;
 
      playerMP.closeContainer();
 
      if(guiType == 0)
      {
View Full Code Here

    public static void deleteEverything() {
        NEICPH.sendDeleteAllItems();
    }

    public static void deleteItemsOfType(ItemStack type) {
        Container c = getGuiContainer().inventorySlots;
        for (int i = 0; i < c.inventorySlots.size(); i++) {
            Slot slot = c.getSlot(i);
            if (slot == null)
                continue;

            ItemStack stack = slot.getStack();
            if (stack != null && stack.getItem() == type.getItem() && stack.getItemDamage() == type.getItemDamage()) {
View Full Code Here

                WorldUtil.getSpaceStationRecipe((Integer) this.data.get(0)).matches(playerBase, true);
            }
            break;
        case S_UNLOCK_NEW_SCHEMATIC:
            final Container container = player.openContainer;

            if (container instanceof ContainerSchematic)
            {
                final ContainerSchematic schematicContainer = (ContainerSchematic) container;
View Full Code Here

public class InventoryCraftingDummy extends InventoryCrafting
{
    public InventoryCraftingDummy()
    {
        super(new Container()
        {
            @Override
            public boolean canInteractWith(EntityPlayer entityplayer)
            {
                return true;
View Full Code Here

      ex.printStackTrace();
    }
  }

  private void onFilterSet(PacketNBT packet) {
    Container container = Proxies.common.getClientInstance().thePlayer.openContainer;

    if (container instanceof ContainerPropolisPipe) {
      PipeLogicPropolis pipeLogic = ((ContainerPropolisPipe) container).pipeLogic;
      pipeLogic.handleFilterSet(packet);
    }
View Full Code Here

    overlayTexY = y;
    return this;
  }

  public StandardTank getTank() {
    Container container = manager.gui.inventorySlots;
    if (container instanceof ContainerLiquidTanks)
      return ((ContainerLiquidTanks) container).getTank(slot);
    else if (container instanceof ContainerFarm)
      return ((ContainerFarm) container).getTank(slot);
    return null;
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.