Major Improvements to DungeonHelper, Minor Bug Fixes and Tweaks #25
@@ -99,14 +99,35 @@ public class DungeonHelper
|
|||||||
//Load our reference to the DDProperties singleton
|
//Load our reference to the DDProperties singleton
|
||||||
if (properties == null)
|
if (properties == null)
|
||||||
properties = DDProperties.instance();
|
properties = DDProperties.instance();
|
||||||
|
|
||||||
|
initializeDungeons();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initializeDungeons()
|
||||||
|
{
|
||||||
|
File file = new File(properties.CustomSchematicDirectory);
|
||||||
|
String helpFile = "/mods/DimDoors/How_to_add_dungeons.txt";
|
||||||
|
if (new File(helpFile).exists())
|
||||||
|
{
|
||||||
|
copyfile.copyFile(helpFile, file + "/How_to_add_dungeons.txt");
|
||||||
|
}
|
||||||
|
file.mkdir();
|
||||||
|
|
||||||
|
registerFlipBlocks();
|
||||||
|
importCustomDungeons(properties.CustomSchematicDirectory);
|
||||||
|
registerBaseDungeons();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static DungeonHelper create()
|
public static DungeonHelper create()
|
||||||
{
|
{
|
||||||
if (instance == null)
|
if (instance == null)
|
||||||
|
{
|
||||||
instance = new DungeonHelper();
|
instance = new DungeonHelper();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
throw new IllegalStateException("Cannot create DungeonHelper twice");
|
throw new IllegalStateException("Cannot create DungeonHelper twice");
|
||||||
|
}
|
||||||
|
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user