Package appeng.tile

Examples of appeng.tile.AEBaseTile


      tickColors( srvPlayerColors );
      // ready tiles.
      HandlerRep repo = getRepo();
      while (!repo.tiles.isEmpty())
      {
        AEBaseTile bt = repo.tiles.poll();
        if ( !bt.isInvalid() )
          bt.onReady();
      }

      // tick networks.
      for (Grid g : getRepo().networks)
        g.update();
View Full Code Here


  @Override
  public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z)
  {
    if ( player.capabilities.isCreativeMode )
    {
      AEBaseTile tile = getTileEntity( world, x, y, z );
      if ( tile != null )
        tile.disableDrops();
      // maybe ray trace?
    }
    return super.removedByPlayer( world, player, x, y, z );
  }
View Full Code Here

  }

  @Override
  public boolean renderInWorld(AEBaseBlock block, IBlockAccess world, int x, int y, int z, RenderBlocks renderer)
  {
    AEBaseTile t = block.getTileEntity( world, x, y, z );

    if ( t instanceof TileCableBus )
    {
      BusRenderer.instance.renderer.renderAllFaces = true;
      BusRenderer.instance.renderer.blockAccess = renderer.blockAccess;
View Full Code Here

      return;

    if ( r.nextFloat() < 0.98 )
      return;

    AEBaseTile tile = getTileEntity( w, x, y, z );
    if ( tile instanceof TileCharger )
    {
      TileCharger tc = (TileCharger) tile;
      if ( AEApi.instance().materials().materialCertusQuartzCrystalCharged.sameAsStack( tc.getStackInSlot( 0 ) ) )
      {
View Full Code Here

  public boolean onActivated(World w, int x, int y, int z, EntityPlayer p, int side, float hitX, float hitY, float hitZ)
  {
    if ( p instanceof FakePlayer || p == null )
      return true;

    AEBaseTile tile = getTileEntity( w, x, y, z );
    if ( tile instanceof TileCrank )
    {
      if ( ((TileCrank) tile).power() )
      {
        Stats.TurnedCranks.addToPlayer( p, 1 );
View Full Code Here

  }

  @Override
  public void onBlockPlacedBy(World w, int x, int y, int z, EntityLivingBase p, ItemStack is)
  {
    AEBaseTile tile = getTileEntity( w, x, y, z );
    if ( tile != null )
    {
      ForgeDirection mnt = findCrankable( w, x, y, z );
      ForgeDirection forward = ForgeDirection.UP;
      if ( mnt == ForgeDirection.UP || mnt == ForgeDirection.DOWN )
        forward = ForgeDirection.SOUTH;
      tile.setOrientation( forward, mnt.getOpposite() );
    }
    else
      dropCrank( w, x, y, z );
  }
View Full Code Here

  }

  @Override
  public void onNeighborBlockChange(World w, int x, int y, int z, Block id)
  {
    AEBaseTile tile = getTileEntity( w, x, y, z );
    if ( tile != null )
    {
      if ( !isCrankable( w, x, y, z, tile.getUp().getOpposite() ) )
        dropCrank( w, x, y, z );
    }
    else
      dropCrank( w, x, y, z );
  }
View Full Code Here

  public void randomDisplayTick(World w, int x, int y, int z, Random r)
  {
    if ( !AEConfig.instance.enableEffects )
      return;

    AEBaseTile tile = getTileEntity( w, x, y, z );
    if ( tile instanceof TileVibrationChamber )
    {
      TileVibrationChamber tc = (TileVibrationChamber) tile;
      if ( tc.isOn )
      {
View Full Code Here

    if ( super.placeBlockAt( stack, player, w, x, y, z, side, hitX, hitY, hitZ, metadata ) )
    {
      if ( blockType.hasBlockTileEntity() && !(blockType instanceof BlockLightDetector) )
      {
        AEBaseTile tile = blockType.getTileEntity( w, x, y, z );
        ori = tile;

        if ( tile == null )
          return true;

        if ( ori.canBeRotated() && !blockType.hasCustomRotation() )
        {
          if ( ori.getForward() == null || ori.getUp() == null || // null
              tile.getForward() == ForgeDirection.UNKNOWN || ori.getUp() == ForgeDirection.UNKNOWN )
            ori.setOrientation( forward, up );
        }

        if ( tile instanceof IGridProxyable )
        {
          ((IGridProxyable) tile).getProxy().setOwner( player );
        }

        tile.onPlacement( stack, player, side );
      }
      else if ( blockType instanceof IOrientableBlock )
      {
        ori.setOrientation( forward, up );
      }
View Full Code Here

  @Override
  final public ForgeDirection[] getValidRotations(World w, int x, int y, int z)
  {
    if ( hasBlockTileEntity() )
    {
      AEBaseTile obj = getTileEntity( w, x, y, z );
      if ( obj != null && obj.canBeRotated() )
      {
        return ForgeDirection.VALID_DIRECTIONS;
      }
    }
View Full Code Here

TOP

Related Classes of appeng.tile.AEBaseTile

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.