Package appeng.api.networking.security

Examples of appeng.api.networking.security.PlayerSource


    return getPlayerInv().player.worldObj;
  }

  public BaseActionSource getActionSrc()
  {
    return new PlayerSource( getPlayerInv().player, (IActionHost) getTarget() );
  }
View Full Code Here


    return getPlayerInv().player.worldObj;
  }

  public BaseActionSource getActionSrc()
  {
    return new PlayerSource( getPlayerInv().player, (IActionHost) getTarget() );
  }
View Full Code Here

  public AEBaseContainer(InventoryPlayer ip, TileEntity myTile, IPart myPart, IGuiItemObject gio) {
    invPlayer = ip;
    tileEntity = myTile;
    part = myPart;
    obj = gio;
    mySrc = new PlayerSource( ip.player, getActionHost() );
    prepareSync();
  }
View Full Code Here

    obj = anchor instanceof IGuiItemObject ? (IGuiItemObject) anchor : null;

    if ( tileEntity == null && part == null && obj == null )
      throw new RuntimeException( "Must have a valid anchor" );

    mySrc = new PlayerSource( ip.player, getActionHost() );

    prepareSync();
  }
View Full Code Here

            ItemStack ammo = ((IAEItemStack) aeAmmo).getItemStack();
            if ( ammo == null )
              return item;

            ammo.stackSize = 1;
            aeAmmo = inv.extractItems( aeAmmo, Actionable.MODULATE, new PlayerSource( p, null ) );
            if ( aeAmmo == null )
              return item;

            float f = 1.0F;
            float f1 = p.prevRotationPitch + (p.rotationPitch - p.prevRotationPitch) * f;
 
View Full Code Here

            ItemStack targetStack = player.inventory.getStackInSlot( x );
            if ( input.equals( targetStack ) )
            {
              IAEItemStack insertItem = input.copy();
              insertItem.setStackSize( targetStack.stackSize );
              IAEItemStack failedToInsert = Platform.poweredInsert( energy, cell, insertItem, new PlayerSource( player, this ) );
              player.inventory.setInventorySlotContents( x, failedToInsert == null ? null : failedToInsert.getItemStack() );
            }
          }
        }
        else
        {
          IAEItemStack failedToInsert = Platform.poweredInsert( energy, cell, input, new PlayerSource( player, this ) );
          player.inventory.setInventorySlotContents( player.inventory.currentItem, failedToInsert == null ? null : failedToInsert.getItemStack() );
        }
      }
      catch (GridAccessException e)
      {
View Full Code Here

        IMEMonitor<IAEItemStack> cell = proxy.getStorage().getItemInventory();

        ItemStack is = input.getItemStack();
        input.setStackSize( is.getMaxStackSize() );

        IAEItemStack retrieved = Platform.poweredExtraction( energy, cell, input, new PlayerSource( player, this ) );
        if ( retrieved != null )
        {
          ItemStack newItems = retrieved.getItemStack();
          InventoryAdaptor adaptor = InventoryAdaptor.getAdaptor( player, ForgeDirection.UNKNOWN );
          newItems = adaptor.addItems( newItems );
View Full Code Here

TOP

Related Classes of appeng.api.networking.security.PlayerSource

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.