Flipped east/west rotation

This commit is contained in:
StevenRS11 2013-06-27 01:03:09 -04:00
parent 37f4ba0fa3
commit c444515907
3 changed files with 15 additions and 11 deletions

View file

@ -903,16 +903,16 @@ public class SchematicLoader
realZ = (z - entrance.getZ()) + riftZ; realZ = (z - entrance.getZ()) + riftZ;
break; break;
case (REFERENCE_DOOR_ORIENTATION + 1) % 4: //270 degree CCW rotation case (REFERENCE_DOOR_ORIENTATION + 1) % 4: //270 degree CCW rotation
realX = (z - entrance.getZ()) + riftX; realX = -(z - entrance.getZ()) + riftX;
realZ = -(x - entrance.getX()) + riftZ; realZ = (x - entrance.getX()) + riftZ;
break; break;
case (REFERENCE_DOOR_ORIENTATION + 2) % 4: //180 degree rotation case (REFERENCE_DOOR_ORIENTATION + 2) % 4: //180 degree rotation
realX = -(x - entrance.getX()) + riftX; realX = -(x - entrance.getX()) + riftX;
realZ = -(z - entrance.getZ()) + riftZ; realZ = -(z - entrance.getZ()) + riftZ;
break; break;
case (REFERENCE_DOOR_ORIENTATION + 3) % 4: //90 degree CCW rotation case (REFERENCE_DOOR_ORIENTATION + 3) % 4: //90 degree CCW rotation
realX = -(z - entrance.getZ()) + riftX; realX = (z - entrance.getZ()) + riftX;
realZ = (x - entrance.getX()) + riftZ; realZ = -(x - entrance.getX()) + riftZ;
break; break;
} }
@ -1025,7 +1025,7 @@ public class SchematicLoader
//generate linkData for wooden dim doors leading to the overworld //generate linkData for wooden dim doors leading to the overworld
for(Point3D point : exitLinks) for(Point3D point : exitLinks)
{ {
//DISABLED FOR TESTING //TODO DISABLED FOR TESTING
/*try /*try
{ {
LinkData randomLink=dimHelper.instance.getRandomLinkData(false); LinkData randomLink=dimHelper.instance.getRandomLinkData(false);
@ -1122,18 +1122,19 @@ public class SchematicLoader
rz = tz; rz = tz;
break; break;
case 1: //270 degrees counterclockwise case 1: //270 degrees counterclockwise
rx = tz; rx = -tz;
rz = -tx; rz = tx;
break; break;
case 2: //180 degrees case 2: //180 degrees
rx = -tx; rx = -tx;
rz = -tz; rz = -tz;
break; break;
case 3: //90 degrees counterclockwise case 3: //90 degrees counterclockwise
rx = -tz; rx = tz;
rz = tx; rz = -tx;
break; break;
default: //This should never happen. default: //This should never happen
throw new IllegalStateException("Invalid angle value. This should never happen!"); throw new IllegalStateException("Invalid angle value. This should never happen!");
} }

View file

@ -338,7 +338,7 @@ public class DungeonHelper
deadEnds.add(new DungeonGenerator(DEFAULT_DUNGEON_WEIGHT, "/schematics/azersDungeonO.schematic", false)); deadEnds.add(new DungeonGenerator(DEFAULT_DUNGEON_WEIGHT, "/schematics/azersDungeonO.schematic", false));
deadEnds.add(new DungeonGenerator(DEFAULT_DUNGEON_WEIGHT, "/schematics/diamondTowerTemple1.schematic", true)); deadEnds.add(new DungeonGenerator(DEFAULT_DUNGEON_WEIGHT, "/schematics/diamondTowerTemple1.schematic", true));
deadEnds.add(new DungeonGenerator(DEFAULT_DUNGEON_WEIGHT, "/schematics/fallingTrapO.schematic", false)); deadEnds.add(new DungeonGenerator(DEFAULT_DUNGEON_WEIGHT, "/schematics/fallingTrapO.schematic", true));
deadEnds.add(new DungeonGenerator(DEFAULT_DUNGEON_WEIGHT, "/schematics/hiddenStaircaseO.schematic", true)); deadEnds.add(new DungeonGenerator(DEFAULT_DUNGEON_WEIGHT, "/schematics/hiddenStaircaseO.schematic", true));
deadEnds.add(new DungeonGenerator(DEFAULT_DUNGEON_WEIGHT, "/schematics/lavaTrapO.schematic", true)); deadEnds.add(new DungeonGenerator(DEFAULT_DUNGEON_WEIGHT, "/schematics/lavaTrapO.schematic", true));
deadEnds.add(new DungeonGenerator(DEFAULT_DUNGEON_WEIGHT, "/schematics/randomTree.schematic", true)); deadEnds.add(new DungeonGenerator(DEFAULT_DUNGEON_WEIGHT, "/schematics/randomTree.schematic", true));

View file

@ -31,6 +31,7 @@ import StevenDimDoors.mod_pocketDim.commands.CommandPrintDimensionData;
import StevenDimDoors.mod_pocketDim.commands.CommandPruneDimensions; import StevenDimDoors.mod_pocketDim.commands.CommandPruneDimensions;
import StevenDimDoors.mod_pocketDim.commands.CommandResetDungeons; import StevenDimDoors.mod_pocketDim.commands.CommandResetDungeons;
import StevenDimDoors.mod_pocketDim.commands.CommandStartDungeonCreation; import StevenDimDoors.mod_pocketDim.commands.CommandStartDungeonCreation;
import StevenDimDoors.mod_pocketDim.helpers.BlockRotationHelper;
import StevenDimDoors.mod_pocketDim.helpers.DungeonHelper; import StevenDimDoors.mod_pocketDim.helpers.DungeonHelper;
import StevenDimDoors.mod_pocketDim.helpers.dimHelper; import StevenDimDoors.mod_pocketDim.helpers.dimHelper;
import StevenDimDoors.mod_pocketDim.items.ItemChaosDoor; import StevenDimDoors.mod_pocketDim.items.ItemChaosDoor;
@ -94,6 +95,7 @@ public class mod_pocketDim
public static SchematicLoader loader; public static SchematicLoader loader;
public static pocketTeleporter teleporter; public static pocketTeleporter teleporter;
public static BlockRotationHelper rotationHelper;
public static Block transientDoor; public static Block transientDoor;
public static Block ExitDoor; public static Block ExitDoor;
@ -148,6 +150,7 @@ public class mod_pocketDim
teleporter = new pocketTeleporter(); teleporter = new pocketTeleporter();
tracker = new PlayerRespawnTracker(); tracker = new PlayerRespawnTracker();
riftGen = new RiftGenerator(); riftGen = new RiftGenerator();
rotationHelper = new BlockRotationHelper();
} }
@Init @Init