mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 14:52:58 +00:00
More Laser and Reactor work. Lasers work now, and Heat Generators generate energy from incident lasers, in order to test lasers. This is probably only temporary.
This commit is contained in:
1 parent
cdeb25803c
commit
cb2188580e
15 files changed
+202
-7
No files matched your search
@@ -3,6 +3,7 @@ package mekanism.common.tile;
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.lasers.LaserManager;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityLaser extends TileEntityElectricBlock
|
||||
@@ -12,14 +13,18 @@ public class TileEntityLaser extends TileEntityElectricBlock
|
||||
public TileEntityLaser()
|
||||
{
|
||||
super("Laser", 100000);
|
||||
inventory = new ItemStack[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate()
|
||||
{
|
||||
super.onUpdate();
|
||||
|
||||
if(getEnergy() >= LASER_ENERGY)
|
||||
{
|
||||
LaserManager.fireLaser(Coord4D.get(this), ForgeDirection.getOrientation(facing), LASER_ENERGY, worldObj);
|
||||
setEnergy(getEnergy()-LASER_ENERGY);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user