Tweaking of lasers for packet-efficiency

This commit is contained in:
Ben Spiers committed 2014-07-22 22:34:19 +01:00
1 parent c66676dd55
commit 775ba68482
9 files changed
+66 -97

No files matched your search

@@ -34,7 +34,17 @@ public class LaserManager
((ILaserReceptor)tile).receiveLaserEnergy(energy, ForgeDirection.getOrientation(mop.sideHit));
}
}
}
}
public static void fireLaserClient(Coord4D from, ForgeDirection direction, World world)
{
Coord4D rangeFrom = from.getFromSide(direction, 1);
Coord4D to = from.getFromSide(direction, range);
MovingObjectPosition mop = world.rayTraceBlocks(Vec3.createVectorHelper(rangeFrom.xCoord, rangeFrom.yCoord, rangeFrom.zCoord), Vec3.createVectorHelper(to.xCoord, to.yCoord, to.zCoord));
if(mop != null)
{
Mekanism.proxy.renderLaser(world, from, new Coord4D(mop.blockX, mop.blockY, mop.blockZ), direction);
}
else
@@ -42,4 +52,5 @@ public class LaserManager
Mekanism.proxy.renderLaser(world, from, to, direction);
}
}
}