mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-24 05:44:27 +00:00
Move Laser range and usage to config
This commit is contained in:
1 parent
432eab1bcf
commit
12f9753ac5
4 files changed
+13
-11
No files matched your search
@@ -1,8 +1,8 @@
|
||||
package mekanism.common;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.api.lasers.ILaserReceptor;
|
||||
import mekanism.common.Mekanism;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
@@ -12,12 +12,10 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class LaserManager
|
||||
{
|
||||
public static int range = 100;
|
||||
|
||||
public static void fireLaser(Coord4D from, ForgeDirection direction, double energy, World world)
|
||||
{
|
||||
Coord4D rangeFrom = from.getFromSide(direction, 1);
|
||||
Coord4D to = from.getFromSide(direction, range);
|
||||
Coord4D to = from.getFromSide(direction, general.laserRange);
|
||||
MovingObjectPosition mop = world.rayTraceBlocks(Vec3.createVectorHelper(rangeFrom.xCoord, rangeFrom.yCoord, rangeFrom.zCoord), Vec3.createVectorHelper(to.xCoord, to.yCoord, to.zCoord));
|
||||
|
||||
if(mop != null)
|
||||
@@ -41,7 +39,7 @@ public class LaserManager
|
||||
public static void fireLaserClient(Coord4D from, ForgeDirection direction, World world)
|
||||
{
|
||||
Coord4D rangeFrom = from.getFromSide(direction, 1);
|
||||
Coord4D to = from.getFromSide(direction, range);
|
||||
Coord4D to = from.getFromSide(direction, general.laserRange);
|
||||
MovingObjectPosition mop = world.rayTraceBlocks(Vec3.createVectorHelper(rangeFrom.xCoord, rangeFrom.yCoord, rangeFrom.zCoord), Vec3.createVectorHelper(to.xCoord, to.yCoord, to.zCoord));
|
||||
|
||||
if(mop != null)
|
||||
|
||||
Reference in new issue
Block a user