Skip to content
This repository has been archived by the owner on May 13, 2021. It is now read-only.

Commit

Permalink
First Stable 1.6.4 release
Browse files Browse the repository at this point in the history
  • Loading branch information
TehNut committed Aug 3, 2014
1 parent 8346713 commit a29757a
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 47 deletions.
31 changes: 7 additions & 24 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -60,4 +43,4 @@ processResources
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
}
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
5 changes: 3 additions & 2 deletions src/main/java/main/launchgui/ConfigHandler.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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.");
Expand Down
13 changes: 7 additions & 6 deletions src/main/java/main/launchgui/LaunchGui.java
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
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;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
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 {

@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;
public static Configuration config;

@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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/main/launchgui/ModInformation.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
4 changes: 2 additions & 2 deletions src/main/java/main/launchgui/gui/GuiEventHandler.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
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 {

private boolean shouldLoadGUI = true;

public static GuiEventHandler instance = new GuiEventHandler();

@SubscribeEvent
@ForgeSubscribe
@SideOnly(Side.CLIENT)
public void openMainMenu(GuiOpenEvent event) {
if (shouldLoadGUI && ConfigHandler.displayGuiOnLaunch && Loader.isModLoaded(ConfigHandler.modToFind)) {
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/main/launchgui/gui/StartupGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit a29757a

Please sign in to comment.