Integrated transporter in multiplayer

- transporter effect alignment glitch
- going accross dimensions
This commit is contained in:
Unknown 2018-05-06 22:37:33 +02:00 committed by unknown
parent 6df387016d
commit 45bfdfa9aa
5 changed files with 17 additions and 17 deletions

View file

@ -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;
}

View file

@ -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

View file

@ -160,7 +160,11 @@ public class MessageTransporterEffect implements IMessage, IMessageHandler<Messa
// energizing
if (entity != null) {
// check existing particle at position
final Vector3 v3Position = v3EntityPositions.get(indexEntity).clone().translate(ForgeDirection.DOWN, entity.getEyeHeight());
final Vector3 v3Position = v3EntityPositions.get(indexEntity).clone();
if ( entity instanceof EntityPlayer
&& entity == Minecraft.getMinecraft().thePlayer) {
v3Position.translate(ForgeDirection.DOWN, entity.getEyeHeight());
}
AbstractEntityFX effect = EntityFXRegistry.get(world, v3Position, 0.5D);
if (effect == null) {
// compute height with a margin

View file

@ -81,7 +81,7 @@ function transporter_page()
w.write("Remote location = ")
local remoteLocation = { transporter.remoteLocation() }
if remoteLocation[3] ~= nil then
w.write(w.format_integer(remoteLocation[1], 6) .. ", " .. w.format_integer(remoteLocation[2], 3) .. ", " .. w.format_integer(remoteLocation[3], 6))
w.write(w.format_integer(remoteLocation[1]) .. ", " .. w.format_integer(remoteLocation[2]) .. ", " .. w.format_integer(remoteLocation[3]))
elseif remoteLocation[1] ~= nil then
w.writeCentered(5, remoteLocation[1])
else
@ -130,7 +130,7 @@ function transporter_page()
w.write(w.format_boolean(isLockRequested, "requested", "on hold"))
w.setColorNormal()
w.write(".")
w.setColorNormal()
w.setCursorPos(1, 11)
w.write("Lock strength is ")
@ -283,9 +283,7 @@ function transporter_config()
remoteLocation = { transporter.remoteLocation(remoteLocation_new) }
else
if #remoteLocation == 1 then
remoteLocation[1] = "0";
remoteLocation[2] = "0";
remoteLocation[3] = "0";
remoteLocation[1], remoteLocation[2], remoteLocation[3] = transporter.position()
end
w.setColorNormal()
@ -326,7 +324,7 @@ function transporter_config()
w.setCursorPos(1, 12)
if remoteLocation[3] ~= nil then
w.write("Remote location updated to " .. remoteLocation[1] .. ", " .. remoteLocation[2] .. ", " .. remoteLocation[3])
w.write("Remote location updated to " .. w.format_integer(remoteLocation[1]) .. ", " .. w.format_integer(remoteLocation[2]) .. ", " .. w.format_integer(remoteLocation[3]))
elseif remoteLocation[1] ~= nil then
w.write("Remote location updated to " .. remoteLocation[1])
else

View file

@ -80,7 +80,7 @@ function transporter_page()
w.write("Remote location = ")
local remoteLocation = { transporter.remoteLocation() }
if remoteLocation[3] ~= nil then
w.write(w.format_integer(remoteLocation[1], 6) .. ", " .. w.format_integer(remoteLocation[2], 3) .. ", " .. w.format_integer(remoteLocation[3], 6))
w.write(w.format_integer(remoteLocation[1]) .. ", " .. w.format_integer(remoteLocation[2]) .. ", " .. w.format_integer(remoteLocation[3]))
elseif remoteLocation[1] ~= nil then
w.write(remoteLocation[1])
else
@ -129,7 +129,7 @@ function transporter_page()
w.write(w.format_boolean(isLockRequested, "requested", "on hold"))
w.setColorNormal()
w.write(".")
w.setColorNormal()
w.setCursorPos(1, 11)
w.write("Lock strength is ")
@ -282,9 +282,7 @@ function transporter_config()
remoteLocation = { transporter.remoteLocation(remoteLocation_new) }
else
if #remoteLocation == 1 then
remoteLocation[1] = "0";
remoteLocation[2] = "0";
remoteLocation[3] = "0";
remoteLocation[1], remoteLocation[2], remoteLocation[3] = transporter.position()
end
w.setColorNormal()
@ -325,7 +323,7 @@ function transporter_config()
w.setCursorPos(1, 12)
if remoteLocation[3] ~= nil then
w.write("Remote location updated to " .. remoteLocation[1] .. ", " .. remoteLocation[2] .. ", " .. remoteLocation[3])
w.write("Remote location updated to " .. w.format_integer(remoteLocation[1]) .. ", " .. w.format_integer(remoteLocation[2]) .. ", " .. w.format_integer(remoteLocation[3]))
elseif remoteLocation[1] ~= nil then
w.write("Remote location updated to " .. remoteLocation[1])
else