Skip to content

Commit

Permalink
Merge pull request #63 from TPPI-Dev/Dev
Browse files Browse the repository at this point in the history
1.0.2 into master
  • Loading branch information
tterrag1098 committed Mar 31, 2014
2 parents f1072b7 + 91ff497 commit 30bb24b
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 24 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ processResources
{
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod/info'
include 'mcmod.info'

// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
Expand Down
21 changes: 0 additions & 21 deletions resources/mcmod.template

This file was deleted.

3 changes: 2 additions & 1 deletion src/main/java/tppitweaks/command/CommandTPPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.util.logging.Level;

import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommand;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
Expand Down Expand Up @@ -317,6 +318,6 @@ public static String getProperName(String modid)
@Override
public int compareTo(Object arg0)
{
return 0; // wat
return this.compareTo((ICommand) arg0);
}
}
20 changes: 20 additions & 0 deletions src/main/java/tppitweaks/util/FileLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
Expand Down Expand Up @@ -184,7 +185,26 @@ public static InputStream getGuideText()

public static InputStream getChangelogText() throws FileNotFoundException
{
File changelog = new File(ConfigurationHandler.cfg.getParent() + "/changelog.txt");

if (!changelog.exists())
{
FileWriter fw;
try
{
changelog.createNewFile();
fw = new FileWriter(changelog);
fw.write("Default Changelog, please make sure the correct changelog exists in the TPPI directory before launching next time!");
fw.flush();
fw.close();
} catch (IOException e1) {
TPPITweaks.logger.severe("Could not create default changelog!");
e1.printStackTrace();
}
}

changelogText = new FileInputStream(new File(ConfigurationHandler.cfg.getParent() + "/changelog.txt"));

return changelogText;
}

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/tppitweaks/util/TxtParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public static ArrayList<String> parseFileMain(InputStream file)
{
ArrayList<String> bookText = new ArrayList<String>();
useableLines.clear();

if (file == null) return new ArrayList<String>();

Scanner scanner;
scanner = new Scanner(file);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"modid": "TPPITweaks",
"name": "TPPI Tweaks",
"description": "Does some useful stuff for the TPPI modpack.",
"version": "0.6.2",
"version": "1.0.0",
"mcversion": "1.6.4",
"authors": [ "The TPPI Team" ],
"requiredMods": [ "Forge" ]
Expand Down

0 comments on commit 30bb24b

Please sign in to comment.