Switch to real logger, create ConfigGui, remove random debug thing
-Uses an actual logger instead of System.out.println. -ConfigGui for ingame editing of configs. -Some random leftover debug was being sent to console at startup. This removes that.
This commit is contained in:
parent
51346b5638
commit
4638f1b239
10 changed files with 693 additions and 717 deletions
|
@ -0,0 +1,35 @@
|
|||
package WayofTime.alchemicalWizardry.client.gui;
|
||||
|
||||
import cpw.mods.fml.client.config.GuiConfig;
|
||||
import cpw.mods.fml.client.config.IConfigElement;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraftforge.common.config.ConfigCategory;
|
||||
import net.minecraftforge.common.config.ConfigElement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static WayofTime.alchemicalWizardry.BloodMagicConfiguration.config;
|
||||
|
||||
public class ConfigGui extends GuiConfig {
|
||||
|
||||
public ConfigGui(GuiScreen parentScreen) {
|
||||
super(parentScreen, getConfigElements(parentScreen), "AWWayofTime", false, false, "Blood Magic Configuration");
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private static List<IConfigElement> getConfigElements(GuiScreen parent) {
|
||||
List<IConfigElement> list = new ArrayList<IConfigElement>();
|
||||
|
||||
// adds sections declared in ConfigHandler. toLowerCase() is used because the configuration class automatically does this, so must we.
|
||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory("clientsettings".toLowerCase())));
|
||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory("dungeon loot chances".toLowerCase())));
|
||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory("meteor".toLowerCase())));
|
||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory("orecrushing".toLowerCase())));
|
||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory("potion id".toLowerCase())));
|
||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory("wellofsufferingblacklist".toLowerCase())));
|
||||
list.add(new ConfigElement<ConfigCategory>(config.getCategory("wimpysettings".toLowerCase())));
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
package WayofTime.alchemicalWizardry.client.gui;
|
||||
|
||||
import cpw.mods.fml.client.IModGuiFactory;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public class ConfigGuiFactory implements IModGuiFactory {
|
||||
|
||||
@Override
|
||||
public void initialize(Minecraft minecraftInstance) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiScreen> mainConfigGuiClass() {
|
||||
return ConfigGui.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) {
|
||||
return null;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue