Skip to content

Commit 450df53

Browse files
davenonymousthraaawn
authored andcommitted
Fix all but the first SkyWorld being weird
When applying a schema to a machine, don't adjust the original schema spawn position, but a clone of it so all further spawn positions are not shifted multiple times.
1 parent d7bf12c commit 450df53

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/main/java/org/dave/compactmachines3/world/WorldSavedDataMachines.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import org.dave.compactmachines3.world.tools.StructureTools;
2121

2222
import java.util.HashMap;
23-
import java.util.Map;
2423
import java.util.UUID;
2524

2625
public class WorldSavedDataMachines extends WorldSavedData {

src/main/java/org/dave/compactmachines3/world/tools/TeleportationTools.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public static void teleportPlayerToMachine(EntityPlayerMP player, int coords, bo
118118
Logz.warn("Unknown schema used by Compact Machine @ %s", WorldSavedDataMachines.INSTANCE.getMachinePosition(coords));
119119
} else {
120120
StructureTools.restoreSchema(schema, coords);
121-
double[] adjustedSpawnPosition = schema.getSpawnPosition();
121+
double[] adjustedSpawnPosition = schema.getSpawnPosition().clone();
122122
adjustedSpawnPosition[0] += coords * 1024;
123123
adjustedSpawnPosition[1] += 40;
124124
WorldSavedDataMachines.INSTANCE.addSpawnPoint(machine.coords, adjustedSpawnPosition);

0 commit comments

Comments
 (0)