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;
break;
case (REFERENCE_DOOR_ORIENTATION + 1) % 4: //270 degree CCW rotation
realX = (z - entrance.getZ()) + riftX;
realZ = -(x - entrance.getX()) + riftZ;
realX = -(z - entrance.getZ()) + riftX;
realZ = (x - entrance.getX()) + riftZ;
break;
case (REFERENCE_DOOR_ORIENTATION + 2) % 4: //180 degree rotation
realX = -(x - entrance.getX()) + riftX;
realZ = -(z - entrance.getZ()) + riftZ;
break;
case (REFERENCE_DOOR_ORIENTATION + 3) % 4: //90 degree CCW rotation
realX = -(z - entrance.getZ()) + riftX;
realZ = (x - entrance.getX()) + riftZ;
realX = (z - entrance.getZ()) + riftX;
realZ = -(x - entrance.getX()) + riftZ;
break;
}
@ -1025,7 +1025,7 @@ public class SchematicLoader
//generate linkData for wooden dim doors leading to the overworld
for(Point3D point : exitLinks)
{
//DISABLED FOR TESTING
//TODO DISABLED FOR TESTING
/*try
{
LinkData randomLink=dimHelper.instance.getRandomLinkData(false);
@ -1122,18 +1122,19 @@ public class SchematicLoader
rz = tz;
break;
case 1: //270 degrees counterclockwise
rx = tz;
rz = -tx;
rx = -tz;
rz = tx;
break;
case 2: //180 degrees
rx = -tx;
rz = -tz;
break;
case 3: //90 degrees counterclockwise
rx = -tz;
rz = tx;
rx = tz;
rz = -tx;
break;
default: //This should never happen.
default: //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/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/lavaTrapO.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.CommandResetDungeons;
import StevenDimDoors.mod_pocketDim.commands.CommandStartDungeonCreation;
import StevenDimDoors.mod_pocketDim.helpers.BlockRotationHelper;
import StevenDimDoors.mod_pocketDim.helpers.DungeonHelper;
import StevenDimDoors.mod_pocketDim.helpers.dimHelper;
import StevenDimDoors.mod_pocketDim.items.ItemChaosDoor;
@ -94,6 +95,7 @@ public class mod_pocketDim
public static SchematicLoader loader;
public static pocketTeleporter teleporter;
public static BlockRotationHelper rotationHelper;
public static Block transientDoor;
public static Block ExitDoor;
@ -148,6 +150,7 @@ public class mod_pocketDim
teleporter = new pocketTeleporter();
tracker = new PlayerRespawnTracker();
riftGen = new RiftGenerator();
rotationHelper = new BlockRotationHelper();
}
@Init