mirror of
https://github.com/GTNewHorizons/BloodArsenal.git
synced 2026-11-21 12:42:16 +00:00
-Add ConfigGUI -Fix chat messages sending twice -Fix bound flint'n'steel swinging when inactive -Create and use actual logger -Make .gitignore not suck -Update mcmod.info to actually be useful -Update build scripts -Upgradle
30 lines
1.1 KiB
Java
30 lines
1.1 KiB
Java
package com.arc.bloodarsenal.gui;
|
|
|
|
import com.arc.bloodarsenal.BloodArsenal;
|
|
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 com.arc.bloodarsenal.BloodArsenalConfig.config;
|
|
|
|
public class ConfigGui extends GuiConfig {
|
|
|
|
public ConfigGui(GuiScreen parentScreen) {
|
|
super(parentScreen, getConfigElements(parentScreen), BloodArsenal.MODID, false, false, "BloodArsenal Configuration");
|
|
}
|
|
|
|
@SuppressWarnings("rawtypes")
|
|
private static List<IConfigElement> getConfigElements(GuiScreen parent) {
|
|
List<IConfigElement> list = new ArrayList<IConfigElement>();
|
|
|
|
// Adds sections declared in BloodArsenalConfig. toLowerCase() is used because the configuration class automatically does this, so must we.
|
|
list.add(new ConfigElement<ConfigCategory>(config.getCategory("Example Section".toLowerCase())));
|
|
|
|
return list;
|
|
}
|
|
} |