2014-09-29 21:10:58 +02:00
|
|
|
package resonantinduction.atomic.machine.fulmination
|
|
|
|
|
|
|
|
import net.minecraft.block.material.Material
|
2014-11-02 12:33:59 +01:00
|
|
|
import resonant.lib.content.prefab.TEnergyStorage
|
2014-09-29 21:10:58 +02:00
|
|
|
import resonant.lib.content.prefab.java.TileElectric
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Fulmination TileEntity
|
|
|
|
*/
|
|
|
|
object TileFulmination
|
|
|
|
{
|
2014-11-02 12:33:59 +01:00
|
|
|
private final val DIAN: 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 12:33:59 +01:00
|
|
|
//Constructor
|
|
|
|
energy.setCapacity(TileFulmination.DIAN * 2)
|
|
|
|
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
|
|
|
}
|