Package extracells.tileentity

Examples of extracells.tileentity.TileEntityMEBattery


  }

  @Override
  public TileEntity createNewTileEntity(World world)
  {
    return new TileEntityMEBattery();
  }
View Full Code Here


  @Override
  public void onNeighborBlockChange(World world, int x, int y, int z, int neighbourID)
  {
    if (!world.isRemote)
    {
      TileEntityMEBattery battery = (TileEntityMEBattery) world.getBlockTileEntity(x, y, z);
      battery.updateRedstone();
    }
  }
View Full Code Here

  {
    PacketDispatcher.sendPacketToServer(new PacketMEBattery(world, tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord, player.username).makePacket());

    if (world.getBlockTileEntity(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord) instanceof TileEntityMEBattery)
    {
      TileEntityMEBattery battery = (TileEntityMEBattery) world.getBlockTileEntity(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord);
      currentEnergy = battery.getMECurrentPower();
      maxEnergy = battery.getMEMaxPower();
    }
  }
View Full Code Here

  {
    TileEntity tileentity = blockAccess.getBlockTileEntity(x, y, z);

    if (tileentity != null)
    {
      TileEntityMEBattery meBattery = (TileEntityMEBattery) tileentity;

      double energy = meBattery.getMECurrentPower();
      double maxEnergy = meBattery.getMEMaxPower();

      if (energy < (maxEnergy * 0.25))
      {
        return iconLow;
      } else if (energy >= (maxEnergy * 0.25) && energy <= (maxEnergy * 0.75))
 
View Full Code Here

  @Override
  public void execute(EntityPlayer player, Side side) throws ProtocolException
  {
    if (side.isServer())
    {
      TileEntityMEBattery tile = (TileEntityMEBattery) world.getBlockTileEntity(x, y, z);
      tile.updateGuiTile(playername);
    }
  }
View Full Code Here

TOP

Related Classes of extracells.tileentity.TileEntityMEBattery

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.