Fixed Empty Dungeon Guide Bug and Updated Guide #30

Merged
SenseiKiwi merged 3 commits from master into master 2013-06-20 22:32:49 +00:00
3 changed files with 7 additions and 7 deletions
Showing only changes of commit 248f14971e - Show all commits

View File

@@ -112,7 +112,7 @@ public class DungeonHelper
File file = new File(properties.CustomSchematicDirectory);
if (file.exists() || file.mkdir())
{
copyfile.copyFile("/mods/DimDoors/How_to_add_dungeons.txt", file.getAbsolutePath() + "/How_to_add_dungeons.txt");
copyfile.copyFile("/mods/DimDoors/text/How_to_add_dungeons.txt", file.getAbsolutePath() + "/How_to_add_dungeons.txt");
}
registerFlipBlocks();
importCustomDungeons(properties.CustomSchematicDirectory);

View File

@@ -12,10 +12,10 @@ public class copyfile
{
try
{
System.out.println("DIMDOORS COPYING FILE TIME");
System.out.println("src: " + ori);
System.out.println("dest: " + dest);
InputStream in = (mod_pocketDim.class.getClass().getResourceAsStream(ori));
//Note: For this to work properly, you must use getClass() on an instance of the class,
//not on the value obtained from .class. That was what caused this code to fail before.
//SchematicLoader didn't have this problem because we used instances of it.
InputStream in = mod_pocketDim.instance.getClass().getResourceAsStream(ori);
OutputStream out = new FileOutputStream(dest);
byte[] buf = new byte[1024];
int len;
@@ -27,7 +27,7 @@ public class copyfile
}
catch (Exception e)
{
e.printStackTrace();
System.out.println("Unable to get resource: " + ori);
return false;
}
return true;