Examples of AEBaseTile


Examples of appeng.tile.AEBaseTile

  }

  @Override
  public void breakBlock(World w, int x, int y, int z, Block a, int b)
  {
    AEBaseTile te = getTileEntity( w, x, y, z );
    if ( te != null )
    {
      ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
      if ( te.dropItems() )
        te.getDrops( w, x, y, z, drops );
      else
        te.getNoDrops( w, x, y, z, drops );

      // Cry ;_; ...
      Platform.spawnDrops( w, x, y, z, drops );
    }
View Full Code Here

Examples of appeng.tile.AEBaseTile

    if ( this instanceof ICustomCollision )
      collisionHandler = (ICustomCollision) this;
    else
    {
      AEBaseTile te = getTileEntity( w, x, y, z );
      if ( te instanceof ICustomCollision )
        collisionHandler = (ICustomCollision) te;
    }

    if ( collisionHandler != null )
View Full Code Here

Examples of appeng.tile.AEBaseTile

    if ( this instanceof ICustomCollision )
      collisionHandler = (ICustomCollision) this;
    else
    {
      AEBaseTile te = getTileEntity( w, x, y, z );
      if ( te instanceof ICustomCollision )
        collisionHandler = (ICustomCollision) te;
    }

    if ( collisionHandler != null )
View Full Code Here

Examples of appeng.tile.AEBaseTile

    if ( this instanceof ICustomCollision )
      collisionHandler = (ICustomCollision) this;
    else
    {
      AEBaseTile te = getTileEntity( w, x, y, z );
      if ( te instanceof ICustomCollision )
        collisionHandler = (ICustomCollision) te;
    }

    if ( collisionHandler != null && bb != null )
View Full Code Here

Examples of appeng.tile.AEBaseTile

        if ( Platform.isWrench( player, is, x, y, z ) && player.isSneaking() )
        {
          Block id = w.getBlock( x, y, z );
          if ( id != null )
          {
            AEBaseTile tile = getTileEntity( w, x, y, z );
            ItemStack[] drops = Platform.getBlockDrops( w, x, y, z );

            if ( tile == null )
              return false;

            if ( tile instanceof TileCableBus || tile instanceof TileSkyChest )
              return false;

            ItemStack op = new ItemStack( this );
            for (ItemStack ol : drops)
            {
              if ( Platform.isSameItemType( ol, op ) )
              {
                NBTTagCompound tag = tile.downloadSettings( SettingsFrom.DISMANTLE_ITEM );
                if ( tag != null )
                  ol.setTagCompound( tag );
              }
            }

            if ( id.removedByPlayer( w, player, x, y, z, false ) )
            {
              List<ItemStack> l = Lists.newArrayList(drops);
              Platform.spawnDrops( w, x, y, z, l );
              w.setBlockToAir( x, y, z );
            }
          }
          return false;
        }

        if ( is.getItem() instanceof IMemoryCard && !(this instanceof BlockCableBus) )
        {
          IMemoryCard memoryCard = (IMemoryCard) is.getItem();
          if ( player.isSneaking() )
          {
            AEBaseTile t = getTileEntity( w, x, y, z );
            if ( t != null )
            {
              String name = getUnlocalizedName();
              NBTTagCompound data = t.downloadSettings( SettingsFrom.MEMORY_CARD );
              if ( data != null )
              {
                memoryCard.setMemoryCardContents( is, name, data );
                memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_SAVED );
                return true;
              }
            }
          }
          else
          {
            String name = memoryCard.getSettingsName( is );
            NBTTagCompound data = memoryCard.getData( is );
            if ( getUnlocalizedName().equals( name ) )
            {
              AEBaseTile t = getTileEntity( w, x, y, z );
              t.uploadSettings( SettingsFrom.MEMORY_CARD, data );
              memoryCard.notifyUser( player, MemoryCardMessages.SETTINGS_LOADED );
            }
            else
              memoryCard.notifyUser( player, MemoryCardMessages.INVALID_MACHINE );
            return false;
View Full Code Here

Examples of appeng.tile.AEBaseTile

  {
    TileEntity tile = context.world().getTileEntity( x, y, z );
    ArrayList<ItemStack> list = new ArrayList<ItemStack>();
    if ( tile instanceof AEBaseTile )
    {
      AEBaseTile tcb = (AEBaseTile) tile;
      tcb.getDrops( tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord, list );
    }

    storedRequirements = list.toArray( new ItemStack[list.size()] );
  }
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.