Added new config option to turn off the new filters.

Workaround for people having the @mod slowdown.
This commit is contained in:
Thomas Guimbretiere committed 2014-09-29 14:28:20 +02:00
1 parent d01c5cd452
commit 9ecab4c490
3 files changed
+12 -6

No files matched your search

@@ -132,11 +132,12 @@ public class ConfigHandler implements IWailaConfigHandler {
public void loadDefaultConfig(FMLPreInitializationEvent event){
config = new Configuration(event.getSuggestedConfigurationFile());
config.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, true);
config.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_MODE, true);
config.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_LIQUID, false);
config.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_METADATA, false);
config.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_KEYBIND, true);
config.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_SHOW, true);
config.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_MODE, true);
config.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_LIQUID, false);
config.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_METADATA, false);
config.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_KEYBIND, true);
config.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_NEWFILTERS, true);
OverlayConfig.posX = config.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_POSX, 5000).getInt();
OverlayConfig.posY = config.get(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_POSY, 100).getInt();
@@ -23,6 +23,7 @@ import mcp.mobius.waila.addons.thermalexpansion.ThermalExpansionModule;
import mcp.mobius.waila.addons.twilightforest.TwilightForestModule;
import mcp.mobius.waila.addons.vanillamc.HUDHandlerVanilla;
import mcp.mobius.waila.api.IWailaDataProvider;
import mcp.mobius.waila.api.impl.ConfigHandler;
import mcp.mobius.waila.api.impl.ModuleRegistrar;
import mcp.mobius.waila.gui.truetyper.FontLoader;
import mcp.mobius.waila.gui.truetyper.TrueTypeFont;
@@ -41,6 +42,7 @@ import net.minecraft.entity.Entity;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.config.Configuration;
import org.lwjgl.input.Keyboard;
@@ -70,7 +72,9 @@ public class ProxyClient extends ProxyServer {
//TickRegistry.registerTickHandler(WailaTickHandler.instance(), Side.CLIENT);
//GuiContainerManager.addTooltipHandler(new TooltipHandlerWaila());
API.addSearchProvider(new ModNameFilter());
if (ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_NEWFILTERS, true))
API.addSearchProvider(new ModNameFilter());
GuiContainerManager.addTooltipHandler(new TooltipHandlerWaila());
//KeyBindingRegistry.registerKeyBinding(new ConfigKeyHandler());
@@ -27,6 +27,7 @@ public final class Constants {
public static String CFG_WAILA_SHIFTENTS = "waila.cfg.shiftents";
public static String CFG_WAILA_NHEARTS = "waila.cfg.heartsperline";
public static String CFG_WAILA_MAXHP = "waila.cfg.maxhpbeforetext";
public static String CFG_WAILA_NEWFILTERS = "waila.cfg.newfilters";
public static String CFG_WAILA_ALPHA = "waila.cfg.alpha";
public static String CFG_WAILA_BGCOLOR = "waila.cfg.bgcolor";