Examples of ICellHandler


Examples of appeng.api.storage.ICellHandler

      else
      {
        ItemStack cell = tg.getStackInSlot( 1 );
        if ( cell != null )
        {
          ICellHandler ch = AEApi.instance().registries().cell().getHandler( cell );

          tg.openGui( p, ch, cell, side );
        }
        else
          p.addChatMessage( PlayerMessages.ChestCannotReadStorageCell.get() );
View Full Code Here

Examples of appeng.api.storage.ICellHandler

    Tessellator.instance.setBrightness( b );
    Tessellator.instance.setColorOpaque_I( 0xffffff );
    renderer.setRenderBounds( 0, 0, 0, 1, 1, 1 );

    ICellHandler ch = AEApi.instance().registries().cell().getHandler( sp.getStorageType() );

    Tessellator.instance.setColorOpaque_I( sp.getColor().whiteVariant );
    IIcon ico = ch == null ? null : ch.getTopTexture_Light();
    renderFace( x, y, z, imb, ico == null ? ExtraBlockTextures.MEChest.getIcon() : ico, renderer, up );

    if ( ico != null )
    {
      Tessellator.instance.setColorOpaque_I( sp.getColor().mediumVariant );
      ico = ch == null ? null : ch.getTopTexture_Medium();
      renderFace( x, y, z, imb, ico == null ? ExtraBlockTextures.MEChest.getIcon() : ico, renderer, up );

      Tessellator.instance.setColorOpaque_I( sp.getColor().blackVariant );
      ico = ch == null ? null : ch.getTopTexture_Dark();
      renderFace( x, y, z, imb, ico == null ? ExtraBlockTextures.MEChest.getIcon() : ico, renderer, up );
    }

    renderer.overrideBlockTexture = null;
    postRenderInWorld( renderer );
View Full Code Here

Examples of appeng.api.storage.ICellHandler

  {
    if ( Platform.isClient() )
      return (state >> (slot * 3)) & 3;

    ItemStack cell = inv.getStackInSlot( 1 );
    ICellHandler ch = AEApi.instance().registries().cell().getHandler( cell );

    if ( ch != null )
    {
      try
      {
        IMEInventoryHandler handler = getHandler( StorageChannel.ITEMS );
        if ( handler instanceof ChestMonitorHandler )
          return ch.getStatusForCell( cell, ((ChestMonitorHandler) handler).getInternalHandler() );
      }
      catch (ChestNoHandler ignored)
      {
      }

      try
      {
        IMEInventoryHandler handler = getHandler( StorageChannel.FLUIDS );
        if ( handler instanceof ChestMonitorHandler )
          return ch.getStatusForCell( cell, ((ChestMonitorHandler) handler).getInternalHandler() );
      }
      catch (ChestNoHandler ignored)
      {
      }
    }
View Full Code Here

Examples of appeng.api.storage.ICellHandler

  {
    if ( Platform.isClient() )
      return (state >> (slot * 3)) & 3;

    ItemStack cell = inv.getStackInSlot( 2 );
    ICellHandler ch = handlersBySlot[slot];

    MEInventoryHandler handler = invBySlot[slot];
    if ( handler == null )
      return 0;

    if ( handler.getChannel() == StorageChannel.ITEMS )
    {
      if ( ch != null )
        return ch.getStatusForCell( cell, handler.getInternal() );
    }

    if ( handler.getChannel() == StorageChannel.FLUIDS )
    {
      if ( ch != null )
        return ch.getStatusForCell( cell, handler.getInternal() );
    }

    return 0;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.