Added AND finished successfully the work on the config file. Perfect with comments and stuff and a in-game config pane. that's a new feature. that's so cool!
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package de.skate702.craftingkeys;
|
||||
|
||||
import cpw.mods.fml.client.event.ConfigChangedEvent;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
@@ -11,6 +12,7 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.InputEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
import de.skate702.craftingkeys.config.Config;
|
||||
import de.skate702.craftingkeys.manager.ContainerManager;
|
||||
import de.skate702.craftingkeys.proxies.CraftingKeysProxy;
|
||||
import net.minecraft.client.gui.inventory.GuiCrafting;
|
||||
@@ -22,13 +24,18 @@ import net.minecraft.inventory.Slot;
|
||||
*
|
||||
* @author skate702
|
||||
*/
|
||||
@Mod(modid = "craftingkeys", name = "Crafting Keys", version = "1.0.0")
|
||||
@Mod(modid = CraftingKeys.MODID, name = CraftingKeys.VERSION, version = CraftingKeys.NAME,
|
||||
guiFactory = "de.skate702.craftingkeys.config.ConfigGuiFactory")
|
||||
public class CraftingKeys {
|
||||
|
||||
public static final String MODID = "craftingkeys";
|
||||
public static final String VERSION = "1.0.0";
|
||||
public static final String NAME = "Crafting Keys";
|
||||
|
||||
/**
|
||||
* Current Instance of CraftingKeys.
|
||||
*/
|
||||
@Instance(value = "CraftingKeys")
|
||||
@Instance(value = MODID)
|
||||
public static CraftingKeys instance;
|
||||
|
||||
/**
|
||||
@@ -80,6 +87,12 @@ public class CraftingKeys {
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent eventArgs) {
|
||||
if (eventArgs.modID.equals(MODID))
|
||||
Config.syncConfig();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will be executed every Ingame Tick.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user