From 848ec406da4899b120d3533f2e14907a7e92196e Mon Sep 17 00:00:00 2001 From: LemADEC Date: Sun, 14 Sep 2014 05:58:01 +0200 Subject: [PATCH] Laser lift minor tweaks Updated laser beam to go up when laser lift is moving up Code cleanup --- src/cr0s/WarpDrive/machines/TileEntityLift.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cr0s/WarpDrive/machines/TileEntityLift.java b/src/cr0s/WarpDrive/machines/TileEntityLift.java index 40b07713..514fc55d 100644 --- a/src/cr0s/WarpDrive/machines/TileEntityLift.java +++ b/src/cr0s/WarpDrive/machines/TileEntityLift.java @@ -48,9 +48,9 @@ public class TileEntityLift extends WarpEnergyTE implements IPeripheral { // Switching mode if (computerMode == MODE_DOWN || (computerMode == MODE_REDSTONE && worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord))) { - mode = 2; // down + mode = MODE_DOWN; } else { - mode = 1; // up + mode = MODE_UP; } isEnabled = computerEnabled @@ -81,9 +81,9 @@ public class TileEntityLift extends WarpEnergyTE implements IPeripheral { } if (yCoord - firstUncoveredY > 0) { - if (mode == 1) { - WarpDrive.instance.sendLaserPacket(worldObj, new Vector3(this).translate(0.5D), new Vector3(xCoord, firstUncoveredY, zCoord).translate(0.5D), 0f, 1f, 0f, 40, 0, 100); - } else if (mode == 2) { + if (mode == MODE_UP) { + WarpDrive.instance.sendLaserPacket(worldObj, new Vector3(xCoord, firstUncoveredY, zCoord).translate(0.5D), new Vector3(this).translate(0.5D), 0f, 1f, 0f, 40, 0, 100); + } else if (mode == MODE_DOWN) { WarpDrive.instance.sendLaserPacket(worldObj, new Vector3(this).translate(0.5D), new Vector3(xCoord, firstUncoveredY, zCoord).translate(0.5D), 0f, 0f, 1f, 40, 0, 100); } }