mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 11:49:37 +00:00
Implemented the ingame configs. Paging @Minalien again just to be evil too >:D
This commit is contained in:
1 parent
f26040006a
commit
cb7ee33fed
20 files changed
+140
-29
No files matched your search
@@ -22,7 +22,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import vazkii.botania.api.mana.IManaCollector;
|
||||
import vazkii.botania.api.mana.TileSignature;
|
||||
import vazkii.botania.client.core.handler.LightningHandler.LightningBolt;
|
||||
import vazkii.botania.client.gui.GuiLexicon;
|
||||
import vazkii.botania.client.gui.lexicon.GuiLexicon;
|
||||
import vazkii.botania.common.core.handler.ManaNetworkHandler;
|
||||
import vazkii.botania.common.item.ItemTwigWand;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
@@ -25,9 +25,9 @@ import vazkii.botania.client.core.handler.LightningHandler;
|
||||
import vazkii.botania.client.core.helper.ShaderHelper;
|
||||
import vazkii.botania.client.fx.FXSparkle;
|
||||
import vazkii.botania.client.fx.FXWisp;
|
||||
import vazkii.botania.client.gui.GuiLexicon;
|
||||
import vazkii.botania.client.gui.GuiLexiconEntry;
|
||||
import vazkii.botania.client.gui.GuiLexiconIndex;
|
||||
import vazkii.botania.client.gui.lexicon.GuiLexicon;
|
||||
import vazkii.botania.client.gui.lexicon.GuiLexiconEntry;
|
||||
import vazkii.botania.client.gui.lexicon.GuiLexiconIndex;
|
||||
import vazkii.botania.client.lib.LibRenderIDs;
|
||||
import vazkii.botania.client.render.block.RenderAltar;
|
||||
import vazkii.botania.client.render.block.RenderPool;
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Jun 27, 2014, 1:50:49 AM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.core.proxy;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import vazkii.botania.client.gui.GuiBotaniaConfig;
|
||||
import cpw.mods.fml.client.IModGuiFactory;
|
||||
|
||||
public class GuiFactory implements IModGuiFactory {
|
||||
|
||||
@Override
|
||||
public void initialize(Minecraft minecraftInstance) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiScreen> mainConfigGuiClass() {
|
||||
return GuiBotaniaConfig.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* File Created @ [Jun 27, 2014, 1:52:33 AM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.gui;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraftforge.common.config.ConfigElement;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import vazkii.botania.common.core.handler.ConfigHandler;
|
||||
import vazkii.botania.common.lib.LibMisc;
|
||||
import cpw.mods.fml.client.config.GuiConfig;
|
||||
|
||||
public class GuiBotaniaConfig extends GuiConfig {
|
||||
|
||||
public GuiBotaniaConfig(GuiScreen parentScreen) {
|
||||
super(parentScreen, new ConfigElement(ConfigHandler.config.getCategory(Configuration.CATEGORY_GENERAL)).getChildElements(), LibMisc.MOD_ID, false, false, GuiConfig.getAbridgedConfigPath(ConfigHandler.config.toString()));
|
||||
}
|
||||
|
||||
}
|
||||
+3
-3
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* File Created @ [Jan 14, 2014, 6:48:05 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.gui;
|
||||
package vazkii.botania.client.gui.lexicon;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -27,8 +27,8 @@ import org.lwjgl.opengl.GL11;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.lexicon.LexiconCategory;
|
||||
import vazkii.botania.client.core.handler.ClientTickHandler;
|
||||
import vazkii.botania.client.gui.button.GuiButtonBookmark;
|
||||
import vazkii.botania.client.gui.button.GuiButtonInvisible;
|
||||
import vazkii.botania.client.gui.lexicon.button.GuiButtonBookmark;
|
||||
import vazkii.botania.client.gui.lexicon.button.GuiButtonInvisible;
|
||||
import vazkii.botania.client.lib.LibResources;
|
||||
import vazkii.botania.common.item.ItemLexicon;
|
||||
|
||||
+3
-3
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* File Created @ [Jan 14, 2014, 6:47:06 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.gui;
|
||||
package vazkii.botania.client.gui.lexicon;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
@@ -23,8 +23,8 @@ import vazkii.botania.api.lexicon.IAddonEntry;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.lexicon.LexiconPage;
|
||||
import vazkii.botania.client.core.handler.ClientTickHandler;
|
||||
import vazkii.botania.client.gui.button.GuiButtonBackWithShift;
|
||||
import vazkii.botania.client.gui.button.GuiButtonPage;
|
||||
import vazkii.botania.client.gui.lexicon.button.GuiButtonBackWithShift;
|
||||
import vazkii.botania.client.gui.lexicon.button.GuiButtonPage;
|
||||
|
||||
public class GuiLexiconEntry extends GuiLexicon implements IGuiLexiconEntry, IParented {
|
||||
|
||||
+4
-4
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* File Created @ [Jan 14, 2014, 6:46:59 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.gui;
|
||||
package vazkii.botania.client.gui.lexicon;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@@ -25,9 +25,9 @@ import vazkii.botania.api.lexicon.ILexicon;
|
||||
import vazkii.botania.api.lexicon.LexiconCategory;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.client.core.handler.ClientTickHandler;
|
||||
import vazkii.botania.client.gui.button.GuiButtonBack;
|
||||
import vazkii.botania.client.gui.button.GuiButtonInvisible;
|
||||
import vazkii.botania.client.gui.button.GuiButtonPage;
|
||||
import vazkii.botania.client.gui.lexicon.button.GuiButtonBack;
|
||||
import vazkii.botania.client.gui.lexicon.button.GuiButtonInvisible;
|
||||
import vazkii.botania.client.gui.lexicon.button.GuiButtonPage;
|
||||
|
||||
public class GuiLexiconIndex extends GuiLexicon implements IParented {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package vazkii.botania.client.gui;
|
||||
package vazkii.botania.client.gui.lexicon;
|
||||
|
||||
public interface IParented {
|
||||
|
||||
+2
-2
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* File Created @ [Jan 14, 2014, 9:54:21 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.gui.button;
|
||||
package vazkii.botania.client.gui.lexicon.button;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -21,7 +21,7 @@ import net.minecraft.util.StatCollector;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import vazkii.botania.client.core.helper.RenderHelper;
|
||||
import vazkii.botania.client.gui.GuiLexicon;
|
||||
import vazkii.botania.client.gui.lexicon.GuiLexicon;
|
||||
|
||||
public class GuiButtonBack extends GuiButton {
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* File Created @ [Mar 6, 2014, 6:35:32 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.gui.button;
|
||||
package vazkii.botania.client.gui.lexicon.button;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package vazkii.botania.client.gui.button;
|
||||
package vazkii.botania.client.gui.lexicon.button;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -8,7 +8,7 @@ import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import vazkii.botania.client.core.helper.RenderHelper;
|
||||
import vazkii.botania.client.gui.GuiLexicon;
|
||||
import vazkii.botania.client.gui.lexicon.GuiLexicon;
|
||||
|
||||
public class GuiButtonBookmark extends GuiButton {
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* File Created @ [Jan 14, 2014, 8:34:01 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.gui.button;
|
||||
package vazkii.botania.client.gui.lexicon.button;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
+2
-2
@@ -9,7 +9,7 @@
|
||||
*
|
||||
* File Created @ [Jan 16, 2014, 4:52:06 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.gui.button;
|
||||
package vazkii.botania.client.gui.lexicon.button;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@@ -20,7 +20,7 @@ import net.minecraft.util.StatCollector;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import vazkii.botania.client.core.helper.RenderHelper;
|
||||
import vazkii.botania.client.gui.GuiLexicon;
|
||||
import vazkii.botania.client.gui.lexicon.GuiLexicon;
|
||||
|
||||
public class GuiButtonPage extends GuiButton {
|
||||
|
||||
@@ -26,7 +26,7 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLServerStartingEvent;
|
||||
import cpw.mods.fml.common.event.FMLServerStoppingEvent;
|
||||
|
||||
@Mod(modid = LibMisc.MOD_ID, name = LibMisc.MOD_NAME, version = LibMisc.VERSION, dependencies = LibMisc.DEPENDENCIES)
|
||||
@Mod(modid = LibMisc.MOD_ID, name = LibMisc.MOD_NAME, version = LibMisc.VERSION, dependencies = LibMisc.DEPENDENCIES, guiFactory = LibMisc.GUI_FACTORY)
|
||||
public class Botania {
|
||||
|
||||
@Instance(LibMisc.MOD_ID)
|
||||
|
||||
@@ -33,7 +33,7 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
|
||||
@Override
|
||||
public ItemStack getIconItemStack() {
|
||||
return new ItemStack(ModBlocks.flower);
|
||||
return new ItemStack(ModItems.lexicon);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,12 +13,16 @@ package vazkii.botania.common.core.handler;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import vazkii.botania.common.lib.LibMisc;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.config.Property;
|
||||
import cpw.mods.fml.client.event.ConfigChangedEvent;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
public final class ConfigHandler {
|
||||
|
||||
private static Configuration config;
|
||||
public static Configuration config;
|
||||
|
||||
public static boolean useShaders = true;
|
||||
public static boolean lexiconRotatingItems = true;
|
||||
@@ -46,6 +50,12 @@ public final class ConfigHandler {
|
||||
config = new Configuration(configFile);
|
||||
|
||||
config.load();
|
||||
load();
|
||||
|
||||
FMLCommonHandler.instance().bus().register(new ChangeListener());
|
||||
}
|
||||
|
||||
public static void load() {
|
||||
String desc;
|
||||
|
||||
desc = "Set to false to disable the use of shaders for some of the mod's renders.";
|
||||
@@ -89,7 +99,7 @@ public final class ConfigHandler {
|
||||
|
||||
desc = "Turn off ONLY IF you're on an extremely large world with an exhagerated count of Mana Spreaders/Mana Pools and are experiencing TPS lag. This toggles whether flowers are strict with their checking for connecting to pools/spreaders or just check whenever possible.";
|
||||
flowerForceCheck = loadPropBool("flower.forceCheck", desc, flowerForceCheck);
|
||||
|
||||
|
||||
desc = "Set to false to disable the Fallen Kanade flower (gives Regeneration). This config option is here for those using Blood Magic. Note: Turning this off will not remove ones already in the world, it'll simply prevent the crafting.";
|
||||
fallenKanadeEnabled = loadPropBool("fallenKanade.enabled", desc, fallenKanadeEnabled);
|
||||
|
||||
@@ -123,4 +133,14 @@ public final class ConfigHandler {
|
||||
prop.comment = desc;
|
||||
return prop.getBoolean(default_);
|
||||
}
|
||||
|
||||
public static class ChangeListener {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent eventArgs) {
|
||||
if(eventArgs.modID.equals(LibMisc.MOD_ID))
|
||||
load();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ import vazkii.botania.api.internal.IGuiLexiconEntry;
|
||||
import vazkii.botania.api.lexicon.LexiconPage;
|
||||
import vazkii.botania.api.lexicon.LexiconRecipeMappings;
|
||||
import vazkii.botania.api.lexicon.LexiconRecipeMappings.EntryData;
|
||||
import vazkii.botania.client.gui.GuiLexiconEntry;
|
||||
import vazkii.botania.client.gui.lexicon.GuiLexiconEntry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ public final class LibMisc {
|
||||
// Proxy Constants
|
||||
public static final String PROXY_COMMON = "vazkii.botania.common.core.proxy.CommonProxy";
|
||||
public static final String PROXY_CLIENT = "vazkii.botania.client.core.proxy.ClientProxy";
|
||||
public static final String GUI_FACTORY = "vazkii.botania.client.core.proxy.GuiFactory";
|
||||
|
||||
public static final ForgeDirection[] CARDINAL_DIRECTIONS = new ForgeDirection[] {
|
||||
ForgeDirection.NORTH, ForgeDirection.SOUTH, ForgeDirection.EAST, ForgeDirection.WEST
|
||||
|
||||
@@ -14,7 +14,7 @@ package vazkii.botania.common.network;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.lexicon.ILexicon;
|
||||
import vazkii.botania.client.gui.GuiLexicon;
|
||||
import vazkii.botania.client.gui.lexicon.GuiLexicon;
|
||||
import vazkii.botania.common.lib.LibGuiIDs;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
|
||||
|
||||
@@ -72,6 +72,26 @@ botania.rank5=&6SS
|
||||
botania.knowledge.minecraft=Minecraftian Knowledge
|
||||
botania.knowledge.alfheim=&aElven&7 Knowledge
|
||||
|
||||
# CONFIGURATION
|
||||
blockBreakingParticles.enabled=Block Break Particles
|
||||
blockBreakingParticlesTool.enabled=Tool Block Break Particles
|
||||
boundBlock.wireframe.enabled=Bound Block Wireframe
|
||||
darkQuartz.enabled=Enable Smokey Quatrz
|
||||
fallenKanade.enabled=Enable Fallen Kanade
|
||||
flower.forceCheck=Flower Force Checking
|
||||
flowerParticles.frequency=Flower Particle Frequency
|
||||
lexicon.enable.rotatingItems=Lexicon Rotating Items
|
||||
lexicon.render.3D=3D Lexicon Render
|
||||
powerSystem.subtle=Use Subtle Power System
|
||||
pylonModel.old=Use Old Pylon Model
|
||||
references.enabled=Enable Tooltip References
|
||||
shaders.enabled=Enable Shader Usage
|
||||
spreader.posShift=Spreader Pos Shift
|
||||
versionChecking.enabled=Enable Version Checking
|
||||
wandBeam.static=Enable Static Wand Beam
|
||||
worldgen.flower.density=Worldgen Flower Density
|
||||
worldgen.flower.quantity=Worldgen Flower Quantity
|
||||
|
||||
# VERSION CHECKING
|
||||
botania.versioning.flavour0=NANI SORE!? BOTANIA IS OUTDATED!?
|
||||
botania.versioning.flavour1=What do you mean Botania is outdated, you ignorant fool?
|
||||
|
||||
Reference in new issue
Block a user