mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 06:42:56 +00:00
I accidentally a linear autominer.
Might make a really basic laser redirection block next - none of the refined controls of the Amplifier, none of the collection abilities of the Tractor Beam.
This commit is contained in:
1 parent
90f2086990
commit
44d852ee9b
18 files changed
+437
-30
No files matched your search
@@ -4,7 +4,6 @@ import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.api.MekanismConfig.usage;
|
||||
import mekanism.api.lasers.ILaserReceptor;
|
||||
import mekanism.common.LaserManager;
|
||||
import mekanism.common.Mekanism;
|
||||
@@ -62,7 +61,7 @@ public class TileEntityLaserAmplifier extends TileEntityContainerBlock implement
|
||||
{
|
||||
if(on)
|
||||
{
|
||||
LaserManager.fireLaserClient(this, ForgeDirection.getOrientation(facing), toFire(), worldObj);
|
||||
LaserManager.fireLaserClient(this, ForgeDirection.getOrientation(facing), lastFired, worldObj);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -80,14 +79,15 @@ public class TileEntityLaserAmplifier extends TileEntityContainerBlock implement
|
||||
|
||||
if(shouldFire() && toFire() > 0)
|
||||
{
|
||||
if(!on || toFire() != lastFired)
|
||||
double firing = toFire();
|
||||
|
||||
if(!on || firing != lastFired)
|
||||
{
|
||||
on = true;
|
||||
lastFired = firing;
|
||||
Mekanism.packetHandler.sendToAllAround(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), Coord4D.get(this).getTargetPoint(50D));
|
||||
}
|
||||
|
||||
double firing = toFire();
|
||||
|
||||
MovingObjectPosition mop =LaserManager.fireLaser(this, ForgeDirection.getOrientation(facing), firing, worldObj);
|
||||
Coord4D hitCoord = mop == null ? null : new Coord4D(mop.blockX, mop.blockY, mop.blockZ);
|
||||
|
||||
@@ -122,7 +122,6 @@ public class TileEntityLaserAmplifier extends TileEntityContainerBlock implement
|
||||
}
|
||||
|
||||
setEnergy(getEnergy() - firing);
|
||||
lastFired = firing;
|
||||
}
|
||||
else if(on)
|
||||
{
|
||||
@@ -186,6 +185,7 @@ public class TileEntityLaserAmplifier extends TileEntityContainerBlock implement
|
||||
data.add(threshold);
|
||||
data.add(time);
|
||||
data.add(collectedEnergy);
|
||||
data.add(lastFired);
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -204,6 +204,7 @@ public class TileEntityLaserAmplifier extends TileEntityContainerBlock implement
|
||||
threshold = dataStream.readDouble();
|
||||
time = dataStream.readInt();
|
||||
collectedEnergy = dataStream.readDouble();
|
||||
lastFired = dataStream.readDouble();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user