Package net.minecraft.inventory

Examples of net.minecraft.inventory.Container


    public boolean isTransmutationResult(BlockTuple block, World w, int x, int y, int z) {
        return getBlockTransformation(w, x, y, z).values().contains(block);
    }

    public ItemStack getBlockCraftingResult(World w, ItemStack itemStack) {
        InventoryCrafting blockCraftInventory = new InventoryCrafting(new Container() {
            @Override
            public boolean canInteractWith(EntityPlayer entityPlayer) {
                return false;
            }
        }, 3, 3);
View Full Code Here


  public static Slot getHoveredSlot(int guiLeft, int guiTop) {
    GuiContainer gui = (GuiContainer) Minecraft.getMinecraft().currentScreen;
    if( gui == null )
      return null;

    Container container = Minecraft.getMinecraft().thePlayer.openContainer;
    int mouseX = getMouseX( Minecraft.getMinecraft() ) - guiLeft;
    int mouseY = getMouseY( Minecraft.getMinecraft() ) - guiTop;

    return getHoveredSlot( container, mouseX, mouseY );
  }
View Full Code Here

    craftingGrid.writeToNBT(craftingRoot);
    nbtRoot.setTag("craftingGrid", craftingRoot);
  }

  public void updateCraftingOutput() {
    InventoryCrafting inv = new InventoryCrafting(new Container() {

      @Override
      public boolean canInteractWith(EntityPlayer var1) {
        return false;
      }
View Full Code Here

    try {
      Class<?> cl = Class.forName("appeng.me.gui.GuiTerminal");
      cl.getDeclaredField("initialSearch").set(null, "");
      cl.getDeclaredField("initialScroll").set(null, 0);

      Container c = MeProxy.createMeTerminalContainer(player, x, y, z, true);
      Constructor<?> constr = cl.getDeclaredConstructor(Container.class);
      return constr.newInstance(c);
    } catch (Exception e) {
      Log.warn("BlockEnderIO: Error occured creating the server element for an ME Terminal " + e);
View Full Code Here

    Class<?>[] argTypes = new Class[] { InventoryPlayer.class, gteClass };
    Object[] args = new Object[] { player.inventory, player.worldObj.getTileEntity(x, y, z) };

    e.setInterceptDuringConstruction(false);

    Container proxifiedObj = (Container) e.create(argTypes, args);
    if(!isClient) {
      proxifiedObj.setPlayerIsPresent(player, true);
    }
    return proxifiedObj;
  }
View Full Code Here

    Class<?>[] argTypes = new Class[] { InventoryPlayer.class, gteClass, boolean.class };
    Object[] args = new Object[] { player.inventory, isClient ? null : player.worldObj.getTileEntity(x, y, z), false };

    e.setInterceptDuringConstruction(false);

    Container proxifiedObj = (Container) e.create(argTypes, args);
    if(!isClient) {
      proxifiedObj.setPlayerIsPresent(player, true);
    }
    return proxifiedObj;
  }
View Full Code Here

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

public class RemoteInventoryCrafting extends InventoryCrafting
{
  public RemoteInventoryCrafting()
  {
    super(new Container()
    {
      @Override
      public boolean canInteractWith(EntityPlayer var1)
      {
        return false;
View Full Code Here

  boolean craft(boolean fullCheck) {
    if(fullCheck && !isFull())
      return false;

    InventoryCrafting craft = new InventoryCrafting(new Container() {
      @Override
      public boolean canInteractWith(EntityPlayer p_75145_1_) {
        return false;
      }
    }, 3, 3);
View Full Code Here

        prepare(entityPlayer);

        MessageOpenBackpack message = new MessageOpenBackpack(backpackSave, inventory, entityPlayer.currentWindowId);
        Backpack.packetHandler.networkWrapper.sendTo(message, entityPlayer);

        Container container = FactoryBackpack.getContainer(backpackSave, new IInventory[] { entityPlayer.inventory, inventory }, entityPlayer);
        openContainer(container, entityPlayer);
    }
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.