Improved and Integrated DungeonSchematic
Improved DungeonSchematic to the point that it can replace SchematicLoader as our method of loading dungeons. Some of the code was copied over rather than refactored to save time. It's been subdivided so make it much more readable. Also, we can reimplement portions of it as WorldOperations later on further remove redudancy. Testing shows that there is one problem left to fix: door blocks are not being set up correctly at the moment. Rifts are being set up properly and attaching doors to rifts will show that dungeons continue to generate fine. Added classes to support DungeonSchematic and its additional filtering logic on import and export. SpecialBlockFinder handles listing the entrance, other doors in the dungeon, and end portal frames. FillContainersOperation is a WorldOperation that fills chests and dispensers. BlockRotator is a temporary class to hold transformMetadata() and transformPoint() until we rewrite that code later. Stripped out most of the code from SchematicLoader to ensure it's no longer used. The only remaining function sets up dungeon pockets. We can phase it out in a later version so as not to delay our release. Removed references to SchematicLoader in mod_pocketDim since it no longer needs to be instantiated.
This commit is contained in:
@@ -32,7 +32,6 @@ import StevenDimDoors.mod_pocketDim.commands.CommandExportDungeon;
|
||||
import StevenDimDoors.mod_pocketDim.commands.CommandPrintDimensionData;
|
||||
import StevenDimDoors.mod_pocketDim.commands.CommandPruneDimensions;
|
||||
import StevenDimDoors.mod_pocketDim.commands.CommandResetDungeons;
|
||||
import StevenDimDoors.mod_pocketDim.helpers.BlockRotationHelper;
|
||||
import StevenDimDoors.mod_pocketDim.helpers.DungeonHelper;
|
||||
import StevenDimDoors.mod_pocketDim.helpers.dimHelper;
|
||||
import StevenDimDoors.mod_pocketDim.items.ItemBlockDimWall;
|
||||
@@ -98,9 +97,7 @@ public class mod_pocketDim
|
||||
@Instance("PocketDimensions")
|
||||
public static mod_pocketDim instance = new mod_pocketDim();
|
||||
|
||||
public static SchematicLoader loader;
|
||||
public static pocketTeleporter teleporter;
|
||||
public static BlockRotationHelper rotationHelper;
|
||||
|
||||
public static Block transientDoor;
|
||||
public static Block ExitDoor;
|
||||
@@ -169,11 +166,9 @@ public class mod_pocketDim
|
||||
//These fields MUST be initialized after properties are loaded to prevent
|
||||
//instances from holding onto null references to the properties.
|
||||
|
||||
loader = new SchematicLoader();
|
||||
teleporter = new pocketTeleporter();
|
||||
tracker = new PlayerRespawnTracker();
|
||||
riftGen = new RiftGenerator();
|
||||
rotationHelper = new BlockRotationHelper();
|
||||
}
|
||||
|
||||
@Init
|
||||
|
||||
Reference in New Issue
Block a user