Package mekanism.common.tile

Examples of mekanism.common.tile.TileEntityGasTank


    if(world.isRemote)
    {
      return true;
    }

    TileEntityGasTank tileEntity = (TileEntityGasTank)world.getTileEntity(x, y, z);

    if(entityplayer.getCurrentEquippedItem() != null)
    {
      Item tool = entityplayer.getCurrentEquippedItem().getItem();

      if(MekanismUtils.hasUsableWrench(entityplayer, x, y, z))
      {
        if(entityplayer.isSneaking())
        {
          dismantleBlock(world, x, y, z, false);
          return true;
        }

        if(ModAPIManager.INSTANCE.hasAPI("BuildCraftAPI|tools") && tool instanceof IToolWrench)
          ((IToolWrench)tool).wrenchUsed(entityplayer, x, y, z);

        int change = ForgeDirection.ROTATION_MATRIX[ForgeDirection.UP.ordinal()][tileEntity.facing];

        tileEntity.setFacing((short)change);
        world.notifyBlocksOfNeighborChange(x, y, z, this);
        return true;
      }
    }
View Full Code Here


  }

  @Override
  public TileEntity createNewTileEntity(World world, int meta)
  {
    return new TileEntityGasTank();
  }
View Full Code Here

  }

  @Override
  public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z)
  {
    TileEntityGasTank tileEntity = (TileEntityGasTank)world.getTileEntity(x, y, z);
    ItemStack itemStack = new ItemStack(Mekanism.GasTank);

    IGasItem storageTank = (IGasItem)itemStack.getItem();
    storageTank.setGas(itemStack, tileEntity.gasTank.getGas());
View Full Code Here

  }

  @Override
  public int getComparatorInputOverride(World world, int x, int y, int z, int par5)
  {
    TileEntityGasTank tileEntity = (TileEntityGasTank)world.getTileEntity(x, y, z);
    return tileEntity.getRedstoneLevel();
  }
View Full Code Here

  {
    boolean place = super.placeBlockAt(stack, player, world, x, y, z, side, hitX, hitY, hitZ, metadata);

    if(place)
    {
      TileEntityGasTank tileEntity = (TileEntityGasTank)world.getTileEntity(x, y, z);
      tileEntity.gasTank.setGas(getGas(stack));

      ((ISustainedInventory)tileEntity).setInventory(getInventory(stack));
    }
View Full Code Here

TOP

Related Classes of mekanism.common.tile.TileEntityGasTank

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.