2015-01-14 12:06:03 +01:00
|
|
|
package edx.quantum.machine.fulmination
|
2014-09-29 21:10:58 +02:00
|
|
|
|
|
|
|
import net.minecraft.block.material.Material
|
2014-11-02 12:33:59 +01:00
|
|
|
import resonant.lib.content.prefab.TEnergyStorage
|
2014-12-09 23:46:07 +01:00
|
|
|
import resonant.lib.grid.energy.EnergyStorage
|
2014-12-10 19:47:51 +01:00
|
|
|
import resonant.lib.prefab.tile.TileElectric
|
2014-09-29 21:10:58 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Fulmination TileEntity
|
|
|
|
*/
|
|
|
|
object TileFulmination
|
|
|
|
{
|
2014-11-02 13:56:11 +01:00
|
|
|
private final val maxEnergy: Long = 10000000000000L
|
2014-09-29 21:10:58 +02:00
|
|
|
}
|
|
|
|
|
2014-11-02 12:33:59 +01:00
|
|
|
class TileFulmination extends TileElectric(Material.iron) with TEnergyStorage
|
2014-09-29 21:10:58 +02:00
|
|
|
{
|
2014-11-02 13:56:11 +01:00
|
|
|
//TODO: Dummy
|
|
|
|
energy = new EnergyStorage(0)
|
|
|
|
energy.setCapacity(TileFulmination.maxEnergy * 2)
|
2014-11-02 12:33:59 +01:00
|
|
|
this.blockHardness(10)
|
|
|
|
this.blockResistance(25000)
|
2014-09-29 21:10:58 +02:00
|
|
|
|
2014-11-02 12:33:59 +01:00
|
|
|
override def start
|
|
|
|
{
|
|
|
|
super.start
|
|
|
|
FulminationHandler.INSTANCE.register(this)
|
|
|
|
}
|
2014-09-29 21:10:58 +02:00
|
|
|
|
2014-11-02 12:33:59 +01:00
|
|
|
override def update
|
|
|
|
{
|
|
|
|
super.update
|
|
|
|
energy.extractEnergy(10, true)
|
|
|
|
}
|
2014-09-29 21:10:58 +02:00
|
|
|
|
2014-11-02 12:33:59 +01:00
|
|
|
override def invalidate
|
|
|
|
{
|
|
|
|
FulminationHandler.INSTANCE.unregister(this)
|
|
|
|
super.start
|
|
|
|
}
|
2014-09-29 21:10:58 +02:00
|
|
|
}
|