Package net.minecraft.inventory

Examples of net.minecraft.inventory.IInventory


  public ContainerAlvearySieve(InventoryPlayer player, TileAlvearySieve tile) {
    super(tile.getInternalInventory());

    this.tile = tile;
    IInventory inventory = tile.getInternalInventory();

    addSlot(new SlotCustom(inventory, 0, 94, 52, new Object[0]).setCrafter(tile));
    addSlot(new SlotCustom(inventory, 1, 115, 39, new Object[0]).setCrafter(tile));
    addSlot(new SlotCustom(inventory, 2, 73, 39, new Object[0]).setCrafter(tile));
    addSlot(new SlotCustom(inventory, 3, 94, 26, new Object[0]).setCrafter(tile));
View Full Code Here


  public ContainerApiary(InventoryPlayer player, TileBeehouse tile, boolean hasFrames) {
    super(tile.getInternalInventory());

    this.tile = tile;
    tile.sendNetworkUpdate();
    IInventory inventory = tile.getInternalInventory();

    // Queen/Princess
    this.addSlot(new SlotCustom(inventory, TileBeehouse.SLOT_QUEEN, 29, 39, ForestryItem.beePrincessGE, ForestryItem.beeQueenGE));

    // Drone
View Full Code Here

  protected List<IInventory> getConnectedRawInventories()  {
    if(_cachedAdjacentInventories != null) {
      return _cachedAdjacentInventories;
    }
    List<IInventory> adjacent = new ArrayList<IInventory>(1);
    IInventory adjinv = getRealInventory();
    if(adjinv != null) {
      adjacent.add(adjinv);
    }
    _cachedAdjacentInventories = adjacent;
    return _cachedAdjacentInventories;
View Full Code Here

    WorldUtil worldUtil = new WorldUtil(_world.getWorld(), getX(), getY(), getZ());
    for (AdjacentTile tile :  worldUtil.getAdjacentTileEntities(true)){
      if (!(tile.tile instanceof IInventory)) continue;
     
      IInventory inv = (IInventory) tile.tile;
      if (inv.getSizeInventory() < 1) continue;
      IInventoryUtil invUtil = SimpleServiceLocator.inventoryUtilFactory.getInventoryUtil(inv);
     
      if(_service.getUpgradeManager().hasPatternUpgrade()) {
        createPatternRequest(invUtil);
      } else {
View Full Code Here

       
        return dummy;
     
      case GuiIDs.GUI_Freq_Card_ID:
        if(pipe == null || pipe.pipe == null || !((pipe.pipe instanceof PipeItemsSystemEntranceLogistics) || (pipe.pipe instanceof PipeItemsSystemDestinationLogistics))) return null;
        IInventory inv = null;
        if(pipe.pipe instanceof PipeItemsSystemEntranceLogistics) {
          inv = ((PipeItemsSystemEntranceLogistics)pipe.pipe).inv;
        } else if(pipe.pipe instanceof PipeItemsSystemDestinationLogistics) {
          inv = ((PipeItemsSystemDestinationLogistics)pipe.pipe).inv;
        }
View Full Code Here

        if(pipe == null || pipe.pipe == null || !(pipe.pipe instanceof PipeItemsInvSysConnector)) return null;
        return new GuiInvSysConnector(player, (PipeItemsInvSysConnector)pipe.pipe);
       
      case GuiIDs.GUI_Freq_Card_ID:
        if(pipe == null || pipe.pipe == null || !((pipe.pipe instanceof PipeItemsSystemEntranceLogistics) || (pipe.pipe instanceof PipeItemsSystemDestinationLogistics))) return null;
        IInventory inv = null;
        if(pipe.pipe instanceof PipeItemsSystemEntranceLogistics) {
          inv = ((PipeItemsSystemEntranceLogistics)pipe.pipe).inv;
        } else if(pipe.pipe instanceof PipeItemsSystemDestinationLogistics) {
          inv = ((PipeItemsSystemDestinationLogistics)pipe.pipe).inv;
        }
View Full Code Here

    if(!itemsOnRoute.isEmpty()) { // don't check the inventory if you don't want anything
 
      WorldUtil wUtil = new WorldUtil(getWorld(), getX(), getY(), getZ());
      for (AdjacentTile tile : wUtil.getAdjacentTileEntities(true)){
        if(tile.tile instanceof IInventory) {
          IInventory inv = InventoryHelper.getInventory((IInventory) tile.tile);
          if(inv instanceof net.minecraft.inventory.ISidedInventory) {
            inv = new SidedInventoryMinecraftAdapter((net.minecraft.inventory.ISidedInventory)inv, tile.orientation.getOpposite(),false);
          }
          if(checkOneConnectedInv(inv,tile.orientation)) {
            updateContentListener();
View Full Code Here

  public void tick() {
    if (++currentTick < ticksToAction()) return;
    currentTick = 0;

    //Extract Item
    IInventory realInventory = _service.getRealInventory();
    if (realInventory == null) return;
    ForgeDirection extractOrientation = _sneakyDirection;
    if(extractOrientation == ForgeDirection.UNKNOWN) {
      extractOrientation = _service.inventoryOrientation().getOpposite();
    }
View Full Code Here

    _orderManager.sendFailed();
    return 0;
  }
 
  private IInventoryUtil getAdaptedInventoryUtil(AdjacentTile tile){
    IInventory base = (IInventory) tile.tile;
    if(base instanceof net.minecraft.inventory.ISidedInventory) {
      base = new SidedInventoryMinecraftAdapter((net.minecraft.inventory.ISidedInventory)base, tile.orientation.getOpposite(), true);
    }
    ExtractionMode mode = getExtractionMode();
    switch(mode){
View Full Code Here

 
  @Override
  public void tick() {
    if(++currentTickCount < ticksToOperation) return;
    currentTickCount = 0;
    IInventory inv = _service.getRealInventory();
    if(!(inv instanceof ISidedInventory)) return;
    ISidedInventory sinv = (ISidedInventory)inv;
    ForgeDirection direction = _service.inventoryOrientation().getOpposite();
    ItemStack stack = extractItem(sinv, false, direction, 1);
    if(stack == null) return;
View Full Code Here

TOP

Related Classes of net.minecraft.inventory.IInventory

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.