diff --git a/build.gradle b/build.gradle index 58e926f..58adade 100644 --- a/build.gradle +++ b/build.gradle @@ -5,52 +5,35 @@ buildscript { name = "forge" url = "http://files.minecraftforge.net/maven" } - maven { + maven { name = "sonatype" url = "https://oss.sonatype.org/content/repositories/snapshots/" } } dependencies { - classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' + classpath 'net.minecraftforge.gradle:ForgeGradle:1.0-SNAPSHOT' } } apply plugin: 'forge' -version = "1.7.10-1.3" +version = "1.6.4-1.3" group= "info.tehnut.launchgui" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "launchgui" minecraft { - version = "1.7.10-10.13.0.1186" - assetDir = "eclipse/assets" + version = "1.6.4-9.11.1.964" } dependencies { - // you may put jars on which you depend on in ./libs - // or you may define them like so.. - //compile "some.group:artifact:version:classifier" - //compile "some.group:artifact:version" - - // real examples - //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env - //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env - - // for more info... - // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html - // http://www.gradle.org/docs/current/userguide/dependency_management.html - + compile fileTree(dir: 'libs', include: '*.jar') } processResources { - // this will ensure that this task is redone when the versions change. - inputs.property "version", project.version - inputs.property "mcversion", project.minecraft.version - // 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 @@ -60,4 +43,4 @@ processResources from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } -} +} \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 0087cd3..667288a 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 662430a..d9425c6 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue May 06 21:57:37 CEST 2014 +#Tue Oct 29 18:00:54 CDT 2013 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-1.12-bin.zip +distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip diff --git a/src/main/java/main/launchgui/ConfigHandler.java b/src/main/java/main/launchgui/ConfigHandler.java index d161bcb..c96b4fa 100644 --- a/src/main/java/main/launchgui/ConfigHandler.java +++ b/src/main/java/main/launchgui/ConfigHandler.java @@ -1,6 +1,6 @@ package main.launchgui; -import net.minecraftforge.common.config.Configuration; +import net.minecraftforge.common.Configuration; import java.io.*; import java.util.ArrayList; @@ -30,7 +30,8 @@ public class ConfigHandler { public static File cfg; - public static void init(Configuration config) { + public static void init(File file) { + Configuration config = new Configuration(file); config.load(); config.addCustomCategoryComment(lines, "These are the options for what your GUI says. Change them as you please, but try to keep them short. It won't split lines for you. Leave blank if unused."); diff --git a/src/main/java/main/launchgui/LaunchGui.java b/src/main/java/main/launchgui/LaunchGui.java index c83ed67..4f62cdc 100644 --- a/src/main/java/main/launchgui/LaunchGui.java +++ b/src/main/java/main/launchgui/LaunchGui.java @@ -1,5 +1,6 @@ package main.launchgui; +import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; @@ -7,10 +8,10 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent; import main.launchgui.gui.GuiEventHandler; import main.launchgui.proxies.CommonProxy; +import net.minecraftforge.common.Configuration; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.common.config.Configuration; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; + +import java.util.logging.Logger; @Mod(modid = ModInformation.ID, name = ModInformation.NAME, version = ModInformation.VERSION) public class LaunchGui { @@ -18,7 +19,7 @@ public class LaunchGui { @SidedProxy(clientSide = "main.launchgui.proxies.ClientProxy", serverSide = "main.launchgui.proxies.CommonProxy") public static CommonProxy proxy; - public static Logger logger = LogManager.getLogger(ModInformation.NAME); + public static final Logger logger = Logger.getLogger(ModInformation.NAME); @Mod.Instance public static LaunchGui instance; @@ -26,8 +27,8 @@ public class LaunchGui { @Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { - config = new Configuration(event.getSuggestedConfigurationFile()); - ConfigHandler.init(config); + logger.setParent(FMLCommonHandler.instance().getFMLLogger()); + ConfigHandler.init(event.getSuggestedConfigurationFile()); MinecraftForge.EVENT_BUS.register(GuiEventHandler.instance); } diff --git a/src/main/java/main/launchgui/ModInformation.java b/src/main/java/main/launchgui/ModInformation.java index e4db8a6..9d31db8 100644 --- a/src/main/java/main/launchgui/ModInformation.java +++ b/src/main/java/main/launchgui/ModInformation.java @@ -4,5 +4,5 @@ public class ModInformation { public static final String NAME = "Launch GUI"; public static final String ID = "launchgui"; public static final String CHANNEL = "LaunchGui"; - public static final String VERSION = "1.0.0"; + public static final String VERSION = "1.3"; } diff --git a/src/main/java/main/launchgui/gui/GuiEventHandler.java b/src/main/java/main/launchgui/gui/GuiEventHandler.java index 95b7c87..6f1619d 100644 --- a/src/main/java/main/launchgui/gui/GuiEventHandler.java +++ b/src/main/java/main/launchgui/gui/GuiEventHandler.java @@ -1,11 +1,11 @@ package main.launchgui.gui; import cpw.mods.fml.common.Loader; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import main.launchgui.ConfigHandler; import net.minecraftforge.client.event.GuiOpenEvent; +import net.minecraftforge.event.ForgeSubscribe; public class GuiEventHandler { @@ -13,7 +13,7 @@ public class GuiEventHandler { public static GuiEventHandler instance = new GuiEventHandler(); - @SubscribeEvent + @ForgeSubscribe @SideOnly(Side.CLIENT) public void openMainMenu(GuiOpenEvent event) { if (shouldLoadGUI && ConfigHandler.displayGuiOnLaunch && Loader.isModLoaded(ConfigHandler.modToFind)) { diff --git a/src/main/java/main/launchgui/gui/StartupGui.java b/src/main/java/main/launchgui/gui/StartupGui.java index 0b87771..e28512c 100644 --- a/src/main/java/main/launchgui/gui/StartupGui.java +++ b/src/main/java/main/launchgui/gui/StartupGui.java @@ -21,16 +21,16 @@ public void initGui() { public void drawScreen(int par1, int par2, float par3) { drawDefaultBackground(); - this.drawCenteredString(this.fontRendererObj, TextHelper.YELLOW + ConfigHandler.guiTitle, this.width / 2, this.height / 2 - 100, 0xFFFFFF); - this.drawCenteredString(this.fontRendererObj, ConfigHandler.line1, this.width / 2, this.height / 2 - 85, 0xFFFFFF); - this.drawCenteredString(this.fontRendererObj, ConfigHandler.line2, this.width / 2, this.height / 2 - 70, 0xFFFFFF); - this.drawCenteredString(this.fontRendererObj, ConfigHandler.line3, this.width / 2, this.height / 2 - 55, 0xFFFFFF); - this.drawCenteredString(this.fontRendererObj, ConfigHandler.line4, this.width / 2, this.height / 2 - 40, 0xFFFFFF); - this.drawCenteredString(this.fontRendererObj, ConfigHandler.line5, this.width / 2, this.height / 2 - 25, 0xFFFFFF); - this.drawCenteredString(this.fontRendererObj, ConfigHandler.line6, this.width / 2, this.height / 2 - 10, 0xFFFFFF); - this.drawCenteredString(this.fontRendererObj, ConfigHandler.line7, this.width / 2, this.height / 2 + 5, 0xFFFFFF); - this.drawCenteredString(this.fontRendererObj, ConfigHandler.line8, this.width / 2, this.height / 2 + 20, 0xFFFFFF); - this.drawCenteredString(this.fontRendererObj, ConfigHandler.line9, this.width / 2, this.height / 2 + 35, 0xFFFFFF); + this.drawCenteredString(this.mc.fontRenderer, TextHelper.YELLOW + ConfigHandler.guiTitle, this.width / 2, this.height / 2 - 100, 0xFFFFFF); + this.drawCenteredString(this.mc.fontRenderer, ConfigHandler.line1, this.width / 2, this.height / 2 - 85, 0xFFFFFF); + this.drawCenteredString(this.mc.fontRenderer, ConfigHandler.line2, this.width / 2, this.height / 2 - 70, 0xFFFFFF); + this.drawCenteredString(this.mc.fontRenderer, ConfigHandler.line3, this.width / 2, this.height / 2 - 55, 0xFFFFFF); + this.drawCenteredString(this.mc.fontRenderer, ConfigHandler.line4, this.width / 2, this.height / 2 - 40, 0xFFFFFF); + this.drawCenteredString(this.mc.fontRenderer, ConfigHandler.line5, this.width / 2, this.height / 2 - 25, 0xFFFFFF); + this.drawCenteredString(this.mc.fontRenderer, ConfigHandler.line6, this.width / 2, this.height / 2 - 10, 0xFFFFFF); + this.drawCenteredString(this.mc.fontRenderer, ConfigHandler.line7, this.width / 2, this.height / 2 + 5, 0xFFFFFF); + this.drawCenteredString(this.mc.fontRenderer, ConfigHandler.line8, this.width / 2, this.height / 2 + 20, 0xFFFFFF); + this.drawCenteredString(this.mc.fontRenderer, ConfigHandler.line9, this.width / 2, this.height / 2 + 35, 0xFFFFFF); super.drawScreen(par1, par2, par3); }