mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-24 22:04:49 +00:00
Tweaking of lasers for packet-efficiency
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user