Skip to content

Commit 30bb24b

Browse files
committed
Merge pull request #63 from TPPI-Dev/Dev
1.0.2 into master
2 parents f1072b7 + 91ff497 commit 30bb24b

File tree

6 files changed

+26
-24
lines changed

6 files changed

+26
-24
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ processResources
6161
{
6262
// replace stuff in mcmod.info, nothing else
6363
from(sourceSets.main.resources.srcDirs) {
64-
include 'mcmod/info'
64+
include 'mcmod.info'
6565

6666
// replace version and mcversion
6767
expand 'version':project.version, 'mcversion':project.minecraft.version

resources/mcmod.template

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/main/java/tppitweaks/command/CommandTPPI.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import java.util.logging.Level;
1010

1111
import net.minecraft.command.CommandBase;
12+
import net.minecraft.command.ICommand;
1213
import net.minecraft.command.ICommandSender;
1314
import net.minecraft.entity.player.EntityPlayer;
1415
import net.minecraft.item.Item;
@@ -317,6 +318,6 @@ public static String getProperName(String modid)
317318
@Override
318319
public int compareTo(Object arg0)
319320
{
320-
return 0; // wat
321+
return this.compareTo((ICommand) arg0);
321322
}
322323
}

src/main/java/tppitweaks/util/FileLoader.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import java.io.File;
44
import java.io.FileInputStream;
55
import java.io.FileNotFoundException;
6+
import java.io.FileWriter;
67
import java.io.IOException;
78
import java.io.InputStream;
89
import java.util.ArrayList;
@@ -184,7 +185,26 @@ public static InputStream getGuideText()
184185

185186
public static InputStream getChangelogText() throws FileNotFoundException
186187
{
188+
File changelog = new File(ConfigurationHandler.cfg.getParent() + "/changelog.txt");
189+
190+
if (!changelog.exists())
191+
{
192+
FileWriter fw;
193+
try
194+
{
195+
changelog.createNewFile();
196+
fw = new FileWriter(changelog);
197+
fw.write("Default Changelog, please make sure the correct changelog exists in the TPPI directory before launching next time!");
198+
fw.flush();
199+
fw.close();
200+
} catch (IOException e1) {
201+
TPPITweaks.logger.severe("Could not create default changelog!");
202+
e1.printStackTrace();
203+
}
204+
}
205+
187206
changelogText = new FileInputStream(new File(ConfigurationHandler.cfg.getParent() + "/changelog.txt"));
207+
188208
return changelogText;
189209
}
190210

src/main/java/tppitweaks/util/TxtParser.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ public static ArrayList<String> parseFileMain(InputStream file)
2525
{
2626
ArrayList<String> bookText = new ArrayList<String>();
2727
useableLines.clear();
28+
29+
if (file == null) return new ArrayList<String>();
2830

2931
Scanner scanner;
3032
scanner = new Scanner(file);

src/main/resources/mcmod.info

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"modid": "TPPITweaks",
33
"name": "TPPI Tweaks",
44
"description": "Does some useful stuff for the TPPI modpack.",
5-
"version": "0.6.2",
5+
"version": "1.0.0",
66
"mcversion": "1.6.4",
77
"authors": [ "The TPPI Team" ],
88
"requiredMods": [ "Forge" ]

0 commit comments

Comments
 (0)