Package appeng.container

Examples of appeng.container.AEBaseContainer


  @Override
  public void serverPacketData(INetworkInfo manager, AppEngPacket packet, EntityPlayer player)
  {
    EntityPlayerMP sender = (EntityPlayerMP) player;
    AEBaseContainer baseContainer = (AEBaseContainer) sender.openContainer;
    if ( baseContainer.getTarget() instanceof IConfigurableObject )
    {
      IConfigManager cm = ((IConfigurableObject) baseContainer.getTarget()).getConfigManager();
      Enum newState = Platform.rotateEnum( cm.getSetting( option ), rotationDirection, option.getPossibleValues() );
      cm.putSetting( option, newState );
    }
  }
View Full Code Here


  public void serverPacketData(INetworkInfo manager, AppEngPacket packet, EntityPlayer player)
  {
    EntityPlayerMP sender = (EntityPlayerMP) player;
    if ( sender.openContainer instanceof AEBaseContainer )
    {
      AEBaseContainer baseContainer = (AEBaseContainer) sender.openContainer;
      if ( action == InventoryAction.AUTO_CRAFT )
      {
        ContainerOpenContext context = baseContainer.openContext;
        if ( context != null )
        {
          TileEntity te = context.getTile();
          Platform.openGUI( sender, te, baseContainer.openContext.side, GuiBridge.GUI_CRAFTING_AMOUNT );

          if ( sender.openContainer instanceof ContainerCraftAmount )
          {
            ContainerCraftAmount cca = (ContainerCraftAmount) sender.openContainer;

            if ( baseContainer.getTargetStack() != null )
            {
              cca.craftingItem.putStack( baseContainer.getTargetStack().getItemStack() );
              cca.whatToMake = baseContainer.getTargetStack();
            }

            cca.detectAndSendChanges();
          }
        }
      }
      else
      {
        baseContainer.doAction( sender, action, slot, id );
      }
    }
  }
View Full Code Here

  public void serverPacketData(INetworkInfo manager, AppEngPacket packet, EntityPlayer player)
  {
    Container c = player.openContainer;
    if ( c instanceof AEBaseContainer )
    {
      AEBaseContainer bc = (AEBaseContainer) c;
      ContainerOpenContext context = bc.openContext;
      if ( context != null )
      {
        TileEntity te = context.getTile();
        Platform.openGUI( player, te, context.side, newGui );
View Full Code Here

TOP

Related Classes of appeng.container.AEBaseContainer

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.