From fd4b9b508609f8d46f3f494c81379ebd4df7ab3c Mon Sep 17 00:00:00 2001 From: SenseiKiwi Date: Sat, 7 Sep 2013 13:14:43 -0400 Subject: [PATCH] Fixed Regression in DungeonSchematic As part of the rewrite, I'd removed code related to replacing the sandstone markers under dungeon exit doors, so the markers weren't being replaced. Now that's working again. --- .../mod_pocketDim/dungeon/DungeonSchematic.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/StevenDimDoors/mod_pocketDim/dungeon/DungeonSchematic.java b/StevenDimDoors/mod_pocketDim/dungeon/DungeonSchematic.java index e33a455..2389c82 100644 --- a/StevenDimDoors/mod_pocketDim/dungeon/DungeonSchematic.java +++ b/StevenDimDoors/mod_pocketDim/dungeon/DungeonSchematic.java @@ -248,7 +248,7 @@ public class DungeonSchematic extends Schematic { //Set up link data for exit door for (Point3D location : exitDoorLocations) { - createExitDoorLink(dimension, location, entranceDoorLocation, turnAngle, pocketCenter); + createExitDoorLink(world, dimension, location, entranceDoorLocation, turnAngle, pocketCenter); } //Remove end portal frames and spawn Monoliths @@ -291,12 +291,22 @@ public class DungeonSchematic extends Schematic { prevDim.setDestination(reverseLink, destination.getX(), destination.getY(), destination.getZ()); } - private static void createExitDoorLink(NewDimData dimension, Point3D point, Point3D entrance, int rotation, Point3D pocketCenter) + private static void createExitDoorLink(World world, NewDimData dimension, Point3D point, Point3D entrance, int rotation, Point3D pocketCenter) { //Transform the door's location to the pocket coordinate system Point3D location = point.clone(); BlockRotator.transformPoint(location, entrance, rotation, pocketCenter); dimension.createLink(location.getX(), location.getY(), location.getZ(), LinkTypes.DUNGEON_EXIT); + //Replace the sandstone block under the exit door with the same block as the one underneath it + int x = location.getX(); + int y = location.getY() - 3; + int z = location.getZ(); + if (y >= 0) + { + int blockID = world.getBlockId(x, y, z); + int metadata = world.getBlockMetadata(x, y, z); + setBlockDirectly(world, x, y + 1, z, blockID, metadata); + } } private static void createDimensionalDoorLink(NewDimData dimension, Point3D point, Point3D entrance, int rotation, Point3D pocketCenter)