From 45bfdfa9aaf0eea86a196433fb5caadcf8b37d23 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 6 May 2018 22:37:33 +0200 Subject: [PATCH] Integrated transporter in multiplayer - transporter effect alignment glitch - going accross dimensions --- .../block/movement/TileEntityTransporterCore.java | 4 ++-- .../java/cr0s/warpdrive/config/WarpDriveConfig.java | 4 ++-- .../warpdrive/network/MessageTransporterEffect.java | 6 +++++- .../lua.ComputerCraft/warpdriveTransporterCore/startup | 10 ++++------ .../lua.OpenComputers/warpdriveTransporterCore/startup | 10 ++++------ 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/main/java/cr0s/warpdrive/block/movement/TileEntityTransporterCore.java b/src/main/java/cr0s/warpdrive/block/movement/TileEntityTransporterCore.java index 63304ce4..57c676b8 100644 --- a/src/main/java/cr0s/warpdrive/block/movement/TileEntityTransporterCore.java +++ b/src/main/java/cr0s/warpdrive/block/movement/TileEntityTransporterCore.java @@ -686,7 +686,7 @@ public class TileEntityTransporterCore extends TileEntityAbstractEnergy implemen globalPositionRemoteNew = globalPositionBeacon; } else if (remoteLocationRequested instanceof VectorI) { - final VectorI vRequest = (VectorI) remoteLocationRequested; + final VectorI vRequest = ((VectorI) remoteLocationRequested).clone(); if (vRequest.y < 0) { final CelestialObject celestialObjectChild = CelestialObjectManager.getClosestChild(worldObj, xCoord, zCoord); if (celestialObjectChild == null) { @@ -844,7 +844,7 @@ public class TileEntityTransporterCore extends TileEntityAbstractEnergy implemen // check maximum range if (rangeActual > rangeMax) { isJammed = true; - reasonJammed = String.format("Out of range: %d > %d", rangeActual, rangeMax); + reasonJammed = String.format("Out of range: %d > %d m", rangeActual, rangeMax); return; } diff --git a/src/main/java/cr0s/warpdrive/config/WarpDriveConfig.java b/src/main/java/cr0s/warpdrive/config/WarpDriveConfig.java index 8d81490d..69096255 100644 --- a/src/main/java/cr0s/warpdrive/config/WarpDriveConfig.java +++ b/src/main/java/cr0s/warpdrive/config/WarpDriveConfig.java @@ -365,8 +365,8 @@ public class WarpDriveConfig { public static int TRANSPORTER_SETUP_SCANNER_RANGE_XZ_BLOCKS = 8; public static int TRANSPORTER_SETUP_SCANNER_RANGE_Y_BELOW_BLOCKS = 3; public static int TRANSPORTER_SETUP_SCANNER_RANGE_Y_ABOVE_BLOCKS = 1; - public static int TRANSPORTER_RANGE_BASE_BLOCKS = 128; - public static int TRANSPORTER_RANGE_UPGRADE_BLOCKS = 16; + public static int TRANSPORTER_RANGE_BASE_BLOCKS = 256; + public static int TRANSPORTER_RANGE_UPGRADE_BLOCKS = 64; public static int TRANSPORTER_RANGE_UPGRADE_MAX_QUANTITY = 8; public static double[] TRANSPORTER_LOCKING_ENERGY_FACTORS = { 50.0, 3.0, 0.0, 10.0, 1.0 / Math.sqrt(2.0) }; public static double TRANSPORTER_LOCKING_STRENGTH_FACTOR_PER_TICK = Math.pow(0.01D, 1.0D / 300.0D); // natural decay down to 1% over 300 ticks diff --git a/src/main/java/cr0s/warpdrive/network/MessageTransporterEffect.java b/src/main/java/cr0s/warpdrive/network/MessageTransporterEffect.java index 76881786..b8506498 100644 --- a/src/main/java/cr0s/warpdrive/network/MessageTransporterEffect.java +++ b/src/main/java/cr0s/warpdrive/network/MessageTransporterEffect.java @@ -160,7 +160,11 @@ public class MessageTransporterEffect implements IMessage, IMessageHandler