ソースを参照

1.13 port

Took 1 hour 59 minutes
Jared 6 年 前
コミット
50b626ce47
36 ファイル変更810 行追加983 行削除
  1. 84 26
      build.gradle
  2. BIN
      gradle/wrapper/gradle-wrapper.jar
  3. 1 2
      gradle/wrapper/gradle-wrapper.properties
  4. 36 0
      src/main/java/com/blamejared/controlling/Controlling.java
  5. 33 0
      src/main/java/com/blamejared/controlling/client/gui/DisplayMode.java
  6. 314 0
      src/main/java/com/blamejared/controlling/client/gui/GuiNewControls.java
  7. 163 0
      src/main/java/com/blamejared/controlling/client/gui/GuiNewKeyBindingList.java
  8. 8 0
      src/main/java/com/blamejared/controlling/client/gui/ISort.java
  9. 6 0
      src/main/java/com/blamejared/controlling/client/gui/SearchType.java
  10. 38 0
      src/main/java/com/blamejared/controlling/client/gui/SortOrder.java
  11. 26 0
      src/main/java/com/blamejared/controlling/events/ClientEventHandler.java
  12. 6 0
      src/main/java/com/blamejared/controlling/reference/Reference.java
  13. 0 36
      src/main/java/us/getfluxed/controlsearch/Control.java
  14. 0 35
      src/main/java/us/getfluxed/controlsearch/client/gui/EnumSortingType.java
  15. 0 509
      src/main/java/us/getfluxed/controlsearch/client/gui/GuiNewControls.java
  16. 0 229
      src/main/java/us/getfluxed/controlsearch/client/gui/GuiNewKeyBindingList.java
  17. 0 23
      src/main/java/us/getfluxed/controlsearch/events/ClientEventHandler.java
  18. 0 11
      src/main/java/us/getfluxed/controlsearch/events/CommonEventHandler.java
  19. 0 16
      src/main/java/us/getfluxed/controlsearch/proxy/ClientProxy.java
  20. 0 15
      src/main/java/us/getfluxed/controlsearch/proxy/CommonProxy.java
  21. 0 13
      src/main/java/us/getfluxed/controlsearch/reference/Reference.java
  22. 0 4
      src/main/resources/META-INF/MANIFEST.MF
  23. 0 10
      src/main/resources/META-INF/controlling_at.cfg
  24. 40 0
      src/main/resources/META-INF/mods.toml
  25. 8 0
      src/main/resources/assets/controlling/lang/de_DE.json
  26. 0 6
      src/main/resources/assets/controlling/lang/de_DE.lang
  27. 11 0
      src/main/resources/assets/controlling/lang/en_US.json
  28. 0 9
      src/main/resources/assets/controlling/lang/en_US.lang
  29. 8 0
      src/main/resources/assets/controlling/lang/ru_RU.json
  30. 0 6
      src/main/resources/assets/controlling/lang/ru_RU.lang
  31. 11 0
      src/main/resources/assets/controlling/lang/tr_TR.json
  32. 0 9
      src/main/resources/assets/controlling/lang/tr_TR.lang
  33. 10 0
      src/main/resources/assets/controlling/lang/zh_CN.json
  34. 0 8
      src/main/resources/assets/controlling/lang/zh_CN.lang
  35. 0 16
      src/main/resources/mcmod.info
  36. 7 0
      src/main/resources/pack.mcmeta

+ 84 - 26
build.gradle

@@ -1,51 +1,109 @@
 buildscript {
     repositories {
+        mavenLocal()
+        maven { url = 'https://files.minecraftforge.net/maven' }
         jcenter()
-        maven {
-            name = "forge"
-            url = "http://files.minecraftforge.net/maven"
+        mavenCentral()
+    }
+    // This is only here while i'm activly developing FG, Remind me to remove when we publically release
+    configurations {
+        classpath.resolutionStrategy {
+            cacheDynamicVersionsFor 10, 'seconds'
+            cacheChangingModulesFor 0, 'seconds'
         }
     }
     dependencies {
-        classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
+        classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
     }
 }
-apply plugin: 'net.minecraftforge.gradle.forge'
+apply plugin: 'net.minecraftforge.gradle'
+//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
+apply plugin: 'eclipse'
 
-version = "3.0.6"
-group= "us.getfluxed.controlling" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
-archivesBaseName = "Controlling"
+version = '4.0.0'
+group = 'com.blamejared.controlling' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
+archivesBaseName = 'Controlling'
 
-sourceCompatibility = targetCompatibility = "1.8"
+sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
 compileJava {
-    sourceCompatibility = targetCompatibility = "1.8"
-}
-jar {
-    manifest {
-        attributes 'FMLAT': 'controlling_at.cfg'
-    }
+    sourceCompatibility = targetCompatibility = '1.8'
 }
+
 minecraft {
-    version = "1.12-14.21.1.2387"
-    runDir = "run"
-    mappings = "snapshot_20161220"
+    // the mappings can be changed at any time, and must be in the following format.
+    // snapshot_YYYYMMDD   snapshot are built nightly.
+    // stable_#            stables are built at the discretion of the MCP team.
+    // Use non-default mappings at your own risk. they may not always work.
+    // simply re-run your setup task after changing the mappings to update your workspace.
+    mappings channel: 'snapshot', version: '20180921-1.13'
+    // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
+    
+    accessTransformer = file('controlling_at.cfg')
+
+    // default run configurations.
+    // these can be tweaked, removed, or duplicated as needed.
+    runConfig {
+        name= "Minecraft Client"
+        main= "net.minecraftforge.userdev.UserdevLauncher"
+        ideaModuleName = "${project.name}_main"
+        workingDirectory = project.file("run").canonicalPath
+        environment "target", "fmldevclient"
+        environment "assetDirectory", downloadAssets.output.absolutePath
+    }
+
+    runConfig {
+        name= "Minecraft Server"
+        main= "net.minecraftforge.userdev.UserdevLauncher"
+        ideaModuleName = "${project.name}_main"
+        workingDirectory = project.file("run").canonicalPath
+        environment "target", "fmldevserver"
+        environment "assetDirectory", downloadAssets.output.absolutePath
+    }
 }
 
 dependencies {
+    // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
+    // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied. 
+    minecraft 'net.minecraftforge.test:forge:1.13-24.0.35-1.13-pre'
+
+    // you may put jars on which you depend on in ./libs
+    // or you may define them like so..
+    //compile "some.group:artifact:version:classifier"
+    //compile "some.group:artifact:version"
+
+    // real examples
+    //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev'  // adds buildcraft to the dev env
+    //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
+
+    // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
+    //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
+
+    // the deobf configurations:  'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
+    // except that these dependencies get remapped to your current MCP mappings
+    //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
+    //deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
+
+    // for more info...
+    // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
+    // http://www.gradle.org/docs/current/userguide/dependency_management.html
 
 }
 
-processResources
-{
-    inputs.property "version", project.version
-    inputs.property "mcversion", project.minecraft.version
+processResources {
+    // this will ensure that this task is redone when the versions change.
+    inputs.property 'version', project.version
+    inputs.property 'mcversion', '1.13'
 
+    // replace stuff in mcmod.info, nothing else
     from(sourceSets.main.resources.srcDirs) {
-        include 'mcmod.info'
-        expand 'version':project.version, 'mcversion':project.minecraft.version
+        include 'META_INF/mods.toml'
+                
+        // replace version and mcversion
+        expand 'version':project.version, 'mcversion': '1.13'
     }
-        
+
+    // copy everything else except the mcmod.info
     from(sourceSets.main.resources.srcDirs) {
-        exclude 'mcmod.info'
+        exclude 'META_INF/mods.toml'
     }
 }

BIN
gradle/wrapper/gradle-wrapper.jar


+ 1 - 2
gradle/wrapper/gradle-wrapper.properties

@@ -1,6 +1,5 @@
-#Mon Sep 14 12:28:28 PDT 2015
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip

+ 36 - 0
src/main/java/com/blamejared/controlling/Controlling.java

@@ -0,0 +1,36 @@
+package com.blamejared.controlling;
+
+import com.blamejared.controlling.events.ClientEventHandler;
+import net.minecraft.item.crafting.RecipeManager;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.fml.common.Mod;
+import net.minecraftforge.fml.common.event.*;
+import net.minecraftforge.fml.javafmlmod.FMLModLoadingContext;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.logging.log4j.*;
+
+import static com.blamejared.controlling.reference.Reference.MODID;
+
+@Mod(MODID)
+public class Controlling {
+    
+    public static final Logger LOGGER = LogManager.getLogger(StringUtils.capitalize(MODID));
+    
+    public Controlling() {
+        // Register the preInit method for modloading
+        FMLModLoadingContext.get().getModEventBus().addListener(this::preInit);
+        // Register the init method for modloading
+        FMLModLoadingContext.get().getModEventBus().addListener(this::init);
+        
+    }
+    
+    private void preInit(final FMLPreInitializationEvent event) {
+        // some preinit code
+        
+    }
+    
+    private void init(final FMLInitializationEvent event) {
+        // some example code
+        MinecraftForge.EVENT_BUS.register(new ClientEventHandler());
+    }
+}

+ 33 - 0
src/main/java/com/blamejared/controlling/client/gui/DisplayMode.java

@@ -0,0 +1,33 @@
+package com.blamejared.controlling.client.gui;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.settings.KeyBinding;
+
+import java.util.function.Predicate;
+
+public enum DisplayMode {
+    ALL(keyEntry -> true), NONE(keyEntry -> keyEntry.getKeybinding().isInvalid()), CONFLICTING(keyEntry -> {
+        
+        for(KeyBinding key : Minecraft.getInstance().gameSettings.keyBindings) {
+            if(key.getKeyDescription().equals(keyEntry.getKeybinding().getKeyDescription())){
+                continue;
+            }else{
+                if(key.getKey().getKeyCode() == keyEntry.getKeybinding().getKey().getKeyCode()) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    });
+    
+    
+    private Predicate<GuiNewKeyBindingList.KeyEntry> predicate;
+    
+    DisplayMode(Predicate<GuiNewKeyBindingList.KeyEntry> predicate) {
+        this.predicate = predicate;
+    }
+    
+    public Predicate<GuiNewKeyBindingList.KeyEntry> getPredicate() {
+        return predicate;
+    }
+}

+ 314 - 0
src/main/java/com/blamejared/controlling/client/gui/GuiNewControls.java

@@ -0,0 +1,314 @@
+package com.blamejared.controlling.client.gui;
+
+import net.minecraft.client.GameSettings;
+import net.minecraft.client.gui.*;
+import net.minecraft.client.resources.I18n;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraft.client.util.InputMappings;
+import net.minecraft.util.Util;
+import net.minecraftforge.api.distmarker.*;
+import net.minecraftforge.fml.client.config.GuiCheckBox;
+
+import java.util.Iterator;
+import java.util.function.Predicate;
+
+@OnlyIn(Dist.CLIENT)
+public class GuiNewControls extends GuiControls {
+    
+    private static final GameSettings.Options[] OPTIONS_ARR = new GameSettings.Options[]{GameSettings.Options.INVERT_MOUSE, GameSettings.Options.SENSITIVITY, GameSettings.Options.TOUCHSCREEN, GameSettings.Options.AUTO_JUMP};
+    
+    private GuiNewKeyBindingList keyBindingList;
+    private GuiButton buttonReset;
+    private final GuiScreen parentScreen;
+    private final GameSettings options;
+    
+    private String lastSearch;
+    private GuiTextField search;
+    
+    private DisplayMode displayMode;
+    private SearchType searchType;
+    private SortOrder sortOrder;
+    
+    private GuiButton buttonNone;
+    private GuiButton buttonConflicting;
+    private GuiCheckBox buttonKey;
+    private GuiCheckBox buttonCat;
+    
+    private GuiButton buttonSort;
+    
+    public GuiNewControls(GuiScreen screen, GameSettings settings) {
+        super(screen, settings);
+        this.parentScreen = screen;
+        this.options = settings;
+    }
+    
+    /**
+     * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
+     * window resizes, the buttonList is cleared beforehand.
+     */
+    protected void initGui() {
+        this.keyBindingList = new GuiNewKeyBindingList(this, this.mc);
+        this.children.add(this.keyBindingList);
+        this.setFocused(this.keyBindingList);
+        this.addButton(new GuiButton(200, this.width / 2 - 155 + 160, this.height - 29, 150, 20, I18n.format("gui.done")) {
+            /**
+             * Called when the left mouse button is pressed over this button. This method is specific to GuiButton.
+             */
+            public void onClick(double mouseX, double mouseY) {
+                GuiNewControls.this.mc.displayGuiScreen(GuiNewControls.this.parentScreen);
+            }
+        });
+        this.buttonReset = this.addButton(new GuiButton(201, this.width / 2 - 155, this.height - 29, 150, 20, I18n.format("controls.resetAll")) {
+            /**
+             * Called when the left mouse button is pressed over this button. This method is specific to GuiButton.
+             */
+            public void onClick(double mouseX, double mouseY) {
+                for(KeyBinding keybinding : GuiNewControls.this.mc.gameSettings.keyBindings) {
+                    keybinding.setToDefault();
+                }
+                
+                KeyBinding.resetKeyBindingArrayAndHash();
+            }
+        });
+        this.buttonNone = this.addButton(new GuiButton(2907, this.width / 2 - 155 + 160 + 76, this.height - 29 - 24, 150 / 2, 20, "Show Unbound"/*I18n.translate("options.showNone")*/) {
+            @Override
+            public void onClick(double mouseX, double mouseY) {
+                if(displayMode == DisplayMode.NONE) {
+                    buttonNone.displayString = I18n.format("options.showNone");
+                    displayMode = DisplayMode.ALL;
+                } else {
+                    displayMode = DisplayMode.NONE;
+                    buttonNone.displayString = I18n.format("options.showAll");
+                    buttonConflicting.displayString = I18n.format("options.showConflicts");
+                }
+                filterKeys();
+            }
+        });
+        this.buttonConflicting = this.addButton(new GuiButton(2906, this.width / 2 - 155 + 160, this.height - 29 - 24, 150 / 2, 20, "Show Conflicts"/*I18n.translate("options.showConflicts")*/) {
+            @Override
+            public void onClick(double mouseX, double mouseY) {
+                if(displayMode == DisplayMode.CONFLICTING) {
+                    buttonConflicting.displayString = I18n.format("options.showConflicts");
+                    displayMode = DisplayMode.ALL;
+                } else {
+                    displayMode = DisplayMode.CONFLICTING;
+                    buttonConflicting.displayString = "Show All";
+                    buttonNone.displayString = I18n.format("options.showNone");
+                }
+                filterKeys();
+            }
+        });
+        search = new GuiTextField(0, fontRenderer, this.width / 2 - 154, this.height - 29 - 23, 148, 18);
+        this.buttonKey = this.addButton(new GuiCheckBox(2908, this.width / 2 - (155 / 2) + 20, this.height - 29 - 37, I18n.format("options.key"), false) {
+            @Override
+            public void onClick(double mouseX, double mouseY) {
+                super.onClick(mouseX, mouseY);
+                buttonCat.setIsChecked(false);
+                searchType = this.isChecked() ? SearchType.KEY : SearchType.NAME;
+                filterKeys();
+            }
+        });
+        this.buttonCat = this.addButton(new GuiCheckBox(2909, this.width / 2 - (155 / 2) + 20, this.height - 29 - 50, I18n.format("options.category"), false) {
+            @Override
+            public void onClick(double mouseX, double mouseY) {
+                super.onClick(mouseX, mouseY);
+                buttonKey.setIsChecked(false);
+                searchType = this.isChecked() ? SearchType.CATEGORY : SearchType.NAME;
+                filterKeys();
+            }
+        });
+        sortOrder = SortOrder.NONE;
+        this.buttonSort = this.addButton(new GuiButton(2910, this.width / 2 - 155 + 160 + 76, this.height - 29 - 24 - 24, 150 / 2, 20, I18n.format("options.sort") + ": " + sortOrder.getName()) {
+            @Override
+            public void onClick(double mouseX, double mouseY) {
+                super.onClick(mouseX, mouseY);
+                sortOrder = sortOrder.cycle();
+                this.displayString = I18n.format("options.sort") + ": " + sortOrder.getName();
+                filterKeys();
+            }
+        });
+        this.screenTitle = I18n.format("controls.title");
+        int i = 0;
+        
+        for(GameSettings.Options gamesettings$options : GuiNewControls.OPTIONS_ARR) {
+            if(gamesettings$options.isFloat()) {
+                this.addButton(new GuiOptionSlider(gamesettings$options.getOrdinal(), this.width / 2 - 155 + i % 2 * 160, 18 + 24 * (i >> 1), gamesettings$options));
+            } else {
+                this.addButton(new GuiOptionButton(gamesettings$options.getOrdinal(), this.width / 2 - 155 + i % 2 * 160, 18 + 24 * (i >> 1), gamesettings$options, this.options.getKeyBinding(gamesettings$options)) {
+                    public void onClick(double mouseX, double mouseY) {
+                        GuiNewControls.this.options.setOptionValue(this.getOption(), 1);
+                        this.displayString = GuiNewControls.this.options.getKeyBinding(GameSettings.Options.byOrdinal(this.id));
+                    }
+                });
+            }
+            
+            ++i;
+        }
+        
+        
+        lastSearch = "";
+        displayMode = DisplayMode.ALL;
+        searchType = SearchType.NAME;
+        
+    }
+    
+    @Override
+    public boolean charTyped(char var1, int var2) {
+        return search.charTyped(var1, var2);
+    }
+    
+    public void tick() {
+        this.search.tick();
+        if(!lastSearch.equals(search.getText())) {
+            filterKeys();
+        }
+    }
+    
+    public void filterKeys() {
+        lastSearch = search.getText();
+        keyBindingList.getChildren().clear();
+        if(lastSearch.isEmpty() && displayMode == DisplayMode.ALL && sortOrder == SortOrder.NONE) {
+            keyBindingList.getChildren().addAll(keyBindingList.getAllEntries());
+            return;
+        }
+        Predicate<GuiNewKeyBindingList.KeyEntry> filters = displayMode.getPredicate();
+        
+        
+        switch(searchType) {
+            case NAME:
+                filters = filters.and(keyEntry -> keyEntry.getKeyDesc().toLowerCase().contains(lastSearch.toLowerCase()));
+                break;
+            case CATEGORY:
+                filters = filters.and(keyEntry -> keyEntry.getKeybinding().getKeyCategory().toLowerCase().contains(lastSearch.toLowerCase()));
+                break;
+            case KEY:
+                filters = filters.and(keyEntry -> keyEntry.getKeybinding().getKey().getName().toLowerCase().contains(lastSearch.toLowerCase()));
+                break;
+        }
+        
+        for(GuiNewKeyBindingList.Entry entry : keyBindingList.getAllEntries()) {
+            if(entry instanceof GuiNewKeyBindingList.KeyEntry) {
+                GuiNewKeyBindingList.KeyEntry keyEntry = (GuiNewKeyBindingList.KeyEntry) entry;
+                if(filters.test(keyEntry)) {
+                    keyBindingList.getChildren().add(entry);
+                }
+            }
+        }
+        sortOrder.sort(keyBindingList.getChildren());
+        
+        
+    }
+    
+    /**
+     * Draws the screen and all the components in it.
+     */
+    public void render(int mouseX, int mouseY, float partialTicks) {
+        this.drawDefaultBackground();
+        this.keyBindingList.drawScreen(mouseX, mouseY, partialTicks);
+        this.drawCenteredString(this.fontRenderer, this.screenTitle, this.width / 2, 8, 16777215);
+        boolean flag = false;
+        
+        for(KeyBinding keybinding : this.options.keyBindings) {
+            if(!keybinding.func_197985_l()) {
+                flag = true;
+                break;
+            }
+        }
+        search.drawTextField(mouseX, mouseY, partialTicks);
+        this.buttonReset.enabled = flag;
+        for(int i = 0; i < this.buttons.size(); ++i) {
+            this.buttons.get(i).render(mouseX, mouseY, partialTicks);
+        }
+        
+        for(int j = 0; j < this.labels.size(); ++j) {
+            this.labels.get(j).render(mouseX, mouseY, partialTicks);
+            
+        }
+        String text = I18n.format("options.search");
+        fontRenderer.drawString(text, this.width / 2 - (155 / 2) - (fontRenderer.getStringWidth(text) / 2), this.height - 29 - 39, 16777215);
+    }
+    
+    public boolean mouseClicked(double mx, double my, int mb) {
+        boolean valid;
+        if(this.buttonId != null) {
+            this.options.setKeyBindingCode(this.buttonId, InputMappings.Type.MOUSE.getOrMakeInput(mb));
+            this.buttonId = null;
+            KeyBinding.resetKeyBindingArrayAndHash();
+            valid = true;
+            search.setFocused(false);
+        } else if(mb == 0 && this.keyBindingList.mouseClicked(mx, my, mb)) {
+            this.setDragging(true);
+            this.setFocused(this.keyBindingList);
+            valid = true;
+            search.setFocused(false);
+        } else {
+            valid = search.mouseClicked(mx, my, mb);
+            if(!valid && search.isFocused() && mb == 1) {
+                search.setText("");
+                valid = true;
+            }
+        }
+        
+        if(!valid) {
+            
+            Iterator childIter = this.getChildren().iterator();
+            
+            IGuiEventListener listener;
+            boolean clicked;
+            do
+            {
+                if(!childIter.hasNext()) {
+                    return false;
+                }
+                
+                listener = (IGuiEventListener) childIter.next();
+                clicked = listener.mouseClicked(mx, my, mb);
+            } while(!clicked);
+            
+            this.focusOn(listener);
+            if(mb == 0) {
+                this.setDragging(true);
+            }
+            
+            valid = true;
+        }
+        return valid;
+    }
+    
+    public boolean mouseReleased(double mx, double my, int mb) {
+        if(mb == 0 && this.keyBindingList.mouseReleased(mx, my, mb)) {
+            this.setDragging(false);
+            return true;
+        } else if(search.isFocused()) {
+            return search.mouseReleased(mx, my, mb);
+        } else {
+            this.setDragging(false);
+            return false;
+        }
+    }
+    
+    public boolean keyPressed(int p_keyPressed_1_, int p_keyPressed_2_, int p_keyPressed_3_) {
+        if(search.keyPressed(p_keyPressed_1_, p_keyPressed_2_, p_keyPressed_3_)) {
+            return true;
+        }
+        if(this.buttonId != null) {
+            if(p_keyPressed_1_ == 256) {
+                this.buttonId.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.getActiveModifier(), InputMappings.INPUT_INVALID);
+                this.options.setKeyBindingCode(this.buttonId, InputMappings.INPUT_INVALID);
+            } else {
+                this.buttonId.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.getActiveModifier(), InputMappings.getInputByCode(p_keyPressed_1_, p_keyPressed_2_));
+                this.options.setKeyBindingCode(this.buttonId, InputMappings.getInputByCode(p_keyPressed_1_, p_keyPressed_2_));
+            }
+            
+            if(!net.minecraftforge.client.settings.KeyModifier.isKeyCodeModifier(this.buttonId.getKey()))
+                this.buttonId = null;
+            this.time = Util.milliTime();
+            KeyBinding.resetKeyBindingArrayAndHash();
+            return true;
+        } else {
+            return super.keyPressed(p_keyPressed_1_, p_keyPressed_2_, p_keyPressed_3_);
+        }
+    }
+    
+    
+}

+ 163 - 0
src/main/java/com/blamejared/controlling/client/gui/GuiNewKeyBindingList.java

@@ -0,0 +1,163 @@
+package com.blamejared.controlling.client.gui;
+
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.*;
+import net.minecraft.client.resources.I18n;
+import net.minecraft.client.settings.KeyBinding;
+import net.minecraftforge.api.distmarker.*;
+import org.apache.commons.lang3.ArrayUtils;
+
+import java.util.*;
+
+@OnlyIn(Dist.CLIENT)
+public class GuiNewKeyBindingList extends GuiListExtended<GuiNewKeyBindingList.Entry> {
+    
+    private final GuiControls controlsScreen;
+    private final Minecraft mc;
+    private int maxListLabelWidth;
+    public List<Entry> allEntries;
+    
+    public GuiNewKeyBindingList(GuiControls controls, Minecraft mcIn) {
+        super(mcIn, controls.width + 45, controls.height, 63, controls.height - 80, 20);
+        this.controlsScreen = controls;
+        this.mc = mcIn;
+        allEntries = new ArrayList<>();
+        KeyBinding[] akeybinding = ArrayUtils.clone(mcIn.gameSettings.keyBindings);
+        Arrays.sort(akeybinding);
+        String s = null;
+        
+        for(KeyBinding keybinding : akeybinding) {
+            String s1 = keybinding.getKeyCategory();
+            if(!s1.equals(s)) {
+                s = s1;
+                add(new GuiNewKeyBindingList.CategoryEntry(s1));
+            }
+            
+            int i = mcIn.fontRenderer.getStringWidth(I18n.format(keybinding.getKeyDescription()));
+            if(i > this.maxListLabelWidth) {
+                this.maxListLabelWidth = i;
+            }
+            
+            add(new GuiNewKeyBindingList.KeyEntry(keybinding));
+        }
+        
+    }
+    
+    
+    public List<Entry> getAllEntries() {
+        return allEntries;
+    }
+    
+    public void add(Entry ent) {
+        this.addEntry(ent);
+        allEntries.add(ent);
+    }
+    
+    protected int getScrollBarX() {
+        return super.getScrollBarX() + 35;
+    }
+    
+    /**
+     * Gets the width of the list
+     */
+    public int getListWidth() {
+        return super.getListWidth() + 32;
+    }
+    
+    @OnlyIn(Dist.CLIENT)
+    public class CategoryEntry extends GuiNewKeyBindingList.Entry {
+        
+        private final String labelText;
+        private final int labelWidth;
+        
+        public CategoryEntry(String name) {
+            this.labelText = I18n.format(name);
+            this.labelWidth = GuiNewKeyBindingList.this.mc.fontRenderer.getStringWidth(this.labelText);
+        }
+        
+        public void drawEntry(int entryWidth, int entryHeight, int mouseX, int mouseY, boolean p_194999_5_, float partialTicks) {
+            GuiNewKeyBindingList.this.mc.fontRenderer.drawString(this.labelText, (float) (GuiNewKeyBindingList.this.mc.currentScreen.width / 2 - this.labelWidth / 2), (float) (this.getY() + entryHeight - GuiNewKeyBindingList.this.mc.fontRenderer.FONT_HEIGHT - 1), 16777215);
+        }
+    }
+    
+    @OnlyIn(Dist.CLIENT)
+    public abstract static class Entry extends GuiListExtended.IGuiListEntry<GuiNewKeyBindingList.Entry> {}
+    
+    @OnlyIn(Dist.CLIENT)
+    public class KeyEntry extends GuiNewKeyBindingList.Entry {
+        
+        /**
+         * The keybinding specified for this KeyEntry
+         */
+        private final KeyBinding keybinding;
+        /**
+         * The localized key description for this KeyEntry
+         */
+        private final String keyDesc;
+        private final GuiButton btnChangeKeyBinding;
+        
+        private KeyEntry(final KeyBinding name) {
+            this.keybinding = name;
+            this.keyDesc = I18n.format(name.getKeyDescription());
+            this.btnChangeKeyBinding = new GuiButton(0, 0, 0, 95, 20, I18n.format(name.func_197978_k())) {
+                /**
+                 * Called when the left mouse button is pressed over this button. This method is specific to GuiButton.
+                 */
+                public void onClick(double mouseX, double mouseY) {
+                    GuiNewKeyBindingList.this.controlsScreen.buttonId = name;
+                }
+            };
+        }
+        
+        public void drawEntry(int entryWidth, int entryHeight, int mouseX, int mouseY, boolean p_194999_5_, float partialTicks) {
+            int i = this.getY();
+            int j = this.getX();
+            boolean flag = GuiNewKeyBindingList.this.controlsScreen.buttonId == this.keybinding;
+            GuiNewKeyBindingList.this.mc.fontRenderer.drawString(this.keyDesc, (float) (j + 90 - GuiNewKeyBindingList.this.maxListLabelWidth), (float) (i + entryHeight / 2 - GuiNewKeyBindingList.this.mc.fontRenderer.FONT_HEIGHT / 2), 16777215);
+            this.btnChangeKeyBinding.x = j + 105;
+            this.btnChangeKeyBinding.y = i;
+            this.btnChangeKeyBinding.displayString = this.keybinding.func_197978_k();
+            boolean flag1 = false;
+            boolean keyCodeModifierConflict = true; // less severe form of conflict, like SHIFT conflicting with SHIFT+G
+            if(!this.keybinding.isInvalid()) {
+                for(KeyBinding keybinding : GuiNewKeyBindingList.this.mc.gameSettings.keyBindings) {
+                    if(keybinding != this.keybinding && this.keybinding.func_197983_b(keybinding)) {
+                        flag1 = true;
+                        keyCodeModifierConflict &= keybinding.hasKeyCodeModifierConflict(this.keybinding);
+                    }
+                }
+            }
+            //TODO replace with text formatting when it's fixed
+            if(flag) {
+                this.btnChangeKeyBinding.displayString = "§f" + "> " + "§e" + this.btnChangeKeyBinding.displayString + "§f" + " <";
+            } else if(flag1) {
+                this.btnChangeKeyBinding.displayString = (keyCodeModifierConflict ? "§6" : "§c") + this.btnChangeKeyBinding.displayString;
+            }
+            
+            this.btnChangeKeyBinding.render(mouseX, mouseY, partialTicks);
+        }
+        
+        public boolean mouseClicked(double p_mouseClicked_1_, double p_mouseClicked_3_, int p_mouseClicked_5_) {
+            if(this.btnChangeKeyBinding.mouseClicked(p_mouseClicked_1_, p_mouseClicked_3_, p_mouseClicked_5_)) {
+                return true;
+            }
+            return false;
+        }
+        
+        public boolean mouseReleased(double p_mouseReleased_1_, double p_mouseReleased_3_, int p_mouseReleased_5_) {
+            return this.btnChangeKeyBinding.mouseReleased(p_mouseReleased_1_, p_mouseReleased_3_, p_mouseReleased_5_);
+        }
+        
+        public KeyBinding getKeybinding() {
+            return keybinding;
+        }
+        
+        public String getKeyDesc() {
+            return keyDesc;
+        }
+        
+        public GuiButton getBtnChangeKeyBinding() {
+            return btnChangeKeyBinding;
+        }
+    }
+}

+ 8 - 0
src/main/java/com/blamejared/controlling/client/gui/ISort.java

@@ -0,0 +1,8 @@
+package com.blamejared.controlling.client.gui;
+
+import java.util.List;
+
+public interface ISort {
+    
+    void sort(List<GuiNewKeyBindingList.Entry> entries);
+}

+ 6 - 0
src/main/java/com/blamejared/controlling/client/gui/SearchType.java

@@ -0,0 +1,6 @@
+package com.blamejared.controlling.client.gui;
+
+
+public enum SearchType {
+    NAME, KEY, CATEGORY;
+}

+ 38 - 0
src/main/java/com/blamejared/controlling/client/gui/SortOrder.java

@@ -0,0 +1,38 @@
+package com.blamejared.controlling.client.gui;
+
+import java.util.List;
+
+public enum SortOrder {
+    NONE(entries -> {
+    }), AZ(entries -> {
+        entries.sort((o1, o2) -> ((GuiNewKeyBindingList.KeyEntry) o1).getKeyDesc().compareTo(((GuiNewKeyBindingList.KeyEntry) o2).getKeyDesc()));
+    }), ZA(entries -> {
+        entries.sort((o1, o2) -> ((GuiNewKeyBindingList.KeyEntry) o2).getKeyDesc().compareTo(((GuiNewKeyBindingList.KeyEntry) o1).getKeyDesc()));
+    });
+    
+    private ISort sorter;
+    
+    SortOrder(ISort sorter) {
+        this.sorter = sorter;
+    }
+    
+    public SortOrder cycle() {
+        return SortOrder.values()[(this.ordinal() + 1) % SortOrder.values().length];
+    }
+    
+    public void sort(List<GuiNewKeyBindingList.Entry> list) {
+        this.sorter.sort(list);
+    }
+    
+    public String getName() {
+        switch(this) {
+            default:
+            case NONE:
+                return "None";
+            case AZ:
+                return "A->Z";
+            case ZA:
+                return "Z->A";
+        }
+    }
+}

+ 26 - 0
src/main/java/com/blamejared/controlling/events/ClientEventHandler.java

@@ -0,0 +1,26 @@
+package com.blamejared.controlling.events;
+
+import com.blamejared.controlling.client.gui.GuiNewControls;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.gui.*;
+import net.minecraftforge.client.event.GuiOpenEvent;
+import net.minecraftforge.eventbus.api.SubscribeEvent;
+
+import java.lang.reflect.Field;
+
+public class ClientEventHandler {
+    
+    @SubscribeEvent
+    public void openGui(GuiOpenEvent event) {
+        try {
+            if(event.getGui() instanceof GuiControls && !(event.getGui() instanceof GuiNewControls)) {
+                GuiControls gui = (GuiControls) event.getGui();
+                Field field = gui.getClass().getDeclaredField("parentScreen");
+                field.setAccessible(true);
+                event.setGui(new GuiNewControls((GuiScreen) field.get(gui), Minecraft.getInstance().gameSettings));
+            }
+        } catch(Exception e) {
+            e.printStackTrace();
+        }
+    }
+}

+ 6 - 0
src/main/java/com/blamejared/controlling/reference/Reference.java

@@ -0,0 +1,6 @@
+package com.blamejared.controlling.reference;
+
+public class Reference {
+    
+    public static final String MODID = "controlling";
+}

+ 0 - 36
src/main/java/us/getfluxed/controlsearch/Control.java

@@ -1,36 +0,0 @@
-package us.getfluxed.controlsearch;
-
-import net.minecraftforge.fml.common.Mod;
-import net.minecraftforge.fml.common.SidedProxy;
-import net.minecraftforge.fml.common.event.FMLInitializationEvent;
-import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
-import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
-import us.getfluxed.controlsearch.proxy.CommonProxy;
-
-import static us.getfluxed.controlsearch.reference.Reference.*;
-
-/**
- * Created by Jared on 8/28/2016.
- */
-@Mod(modid = MODID, name = NAME, version = VERSION, clientSideOnly = true)
-public class Control {
-
-    @SidedProxy(clientSide = "us.getfluxed.controlsearch.proxy.ClientProxy", serverSide = "us.getfluxed.controlsearch.proxy.CommonProxy")
-    public static CommonProxy PROXY;
-
-    @Mod.EventHandler
-    public void preInit(FMLPreInitializationEvent e) {
-        PROXY.registerEvents();
-    }
-
-    @Mod.EventHandler
-    public void init(FMLInitializationEvent e) {
-
-    }
-
-    @Mod.EventHandler
-    public void postInit(FMLPostInitializationEvent e) {
-
-    }
-
-}

+ 0 - 35
src/main/java/us/getfluxed/controlsearch/client/gui/EnumSortingType.java

@@ -1,35 +0,0 @@
-package us.getfluxed.controlsearch.client.gui;
-
-public enum EnumSortingType {
-    
-    DEFAULT, AZ, ZA;
-    
-    
-    public EnumSortingType cycle() {
-        switch(this) {
-            case DEFAULT:
-                return AZ;
-            case AZ:
-                return ZA;
-            case ZA:
-                return DEFAULT;
-            default:
-                return DEFAULT;
-        }
-    }
-    
-    public String getName(){
-        switch(this) {
-            case DEFAULT:
-                return "Default";
-            case AZ:
-                return "A->Z";
-            case ZA:
-                return "Z->A";
-            default:
-                return "Default";
-        }
-    }
-    
-    
-}

+ 0 - 509
src/main/java/us/getfluxed/controlsearch/client/gui/GuiNewControls.java

@@ -1,509 +0,0 @@
-package us.getfluxed.controlsearch.client.gui;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.*;
-import net.minecraft.client.resources.I18n;
-import net.minecraft.client.settings.*;
-import net.minecraftforge.client.settings.KeyModifier;
-import net.minecraftforge.fml.client.config.GuiCheckBox;
-import org.lwjgl.input.*;
-
-import java.io.IOException;
-import java.util.*;
-
-public class GuiNewControls extends GuiControls {
-    
-    private static final GameSettings.Options[] OPTIONS_ARR = new GameSettings.Options[]{GameSettings.Options.INVERT_MOUSE, GameSettings.Options.SENSITIVITY, GameSettings.Options.TOUCHSCREEN, GameSettings.Options.AUTO_JUMP};
-    /**
-     * A reference to the screen object that created this. Used for navigating between screens.
-     */
-    private final GuiScreen parentScreen;
-    /**
-     * Reference to the GameSettings object.
-     */
-    private final GameSettings options;
-    /**
-     * The ID of the button that has been pressed.
-     */
-    private GuiButton buttonReset;
-    
-    private GuiTextField search;
-    private String lastFilterText = "";
-    
-    private boolean conflicts = false;
-    private boolean none = false;
-    private boolean toggleFreeKeys = false;
-    
-    private EnumSortingType sortingType = EnumSortingType.DEFAULT;
-    
-    public GuiButton buttonConflict;
-    public GuiButton buttonNone;
-    public GuiButton buttonSorting;
-    public GuiButton buttonToggleKeys;
-    
-    public GuiCheckBox boxSearchCategory;
-    public GuiCheckBox boxSearchKey;
-    
-    
-    public GuiNewControls(GuiScreen screen, GameSettings settings) {
-        super(screen, settings);
-        this.parentScreen = screen;
-        this.options = settings;
-    }
-    
-    /**
-     * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
-     * window resizes, the buttonList is cleared beforehand.
-     */
-    public void initGui() {
-        this.conflicts = false;
-        this.none = false;
-        this.sortingType = EnumSortingType.DEFAULT;
-        this.keyBindingList = new GuiNewKeyBindingList(this, this.mc);
-        this.buttonList.add(new GuiButton(200, this.width / 2 - 155, this.height - 29, 150, 20, translate("gui.done")));
-        this.buttonReset = this.addButton(new GuiButton(201, this.width / 2 - 155 + 160, this.height - 29, 155, 20, translate("controls.resetAll")));
-        this.screenTitle = translate("controls.title");
-        int i = 0;
-        
-        for(GameSettings.Options gamesettings$options : OPTIONS_ARR) {
-            if(gamesettings$options.getEnumFloat()) {
-                this.buttonList.add(new GuiOptionSlider(gamesettings$options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, 18 + 24 * (i >> 1), gamesettings$options));
-            } else {
-                this.buttonList.add(new GuiOptionButton(gamesettings$options.returnEnumOrdinal(), this.width / 2 - 155 + i % 2 * 160, 18 + 24 * (i >> 1), gamesettings$options, this.options.getKeyBinding(gamesettings$options)));
-            }
-            ++i;
-        }
-        
-        search = new GuiTextField(0, mc.fontRendererObj, this.width / 2 - 154, this.height - 29 - 23, 148, 18);
-        search.setCanLoseFocus(true);
-        buttonConflict = new GuiButton(2906, this.width / 2 - 155 + 160, this.height - 29 - 24, 150 / 2, 20, translate("options.showConflicts"));
-        buttonNone = new GuiButton(2907, this.width / 2 - 155 + 160 + 80, this.height - 29 - 24, 150 / 2, 20, translate("options.showNone"));
-        buttonSorting = new GuiButton(2908, this.width / 2 - 155 + 160 + 80, this.height - 29 - 24 - 24, 150 / 2, 20, translate("options.sort") + ": " + sortingType.getName());
-        boxSearchCategory = new GuiCheckBox(2909, this.width / 2 - (155 / 2) + 20, this.height - 29 - 37, translate("options.category"), false);
-        boxSearchKey = new GuiCheckBox(2910, this.width / 2 - (155 / 2) + 20, this.height - 29 - 50, translate("options.key"), false);
-        buttonToggleKeys = new GuiButton(2911, this.width / 2 - 155 + 160, this.height - 29 - 24 - 24, 150 / 2, 20, translate("options.toggleFree"));
-        this.buttonList.add(buttonConflict);
-        this.buttonList.add(buttonNone);
-        this.buttonList.add(buttonSorting);
-        this.buttonList.add(boxSearchCategory);
-        this.buttonList.add(boxSearchKey);
-        this.buttonList.add(buttonToggleKeys);
-    
-    }
-    
-    @Override
-    public void updateScreen() {
-        search.updateCursorCounter();
-        if(!search.getText().equals(lastFilterText)) {
-            refreshKeys();
-        }
-    }
-    
-    public void refreshKeys() {
-        LinkedList<GuiListExtended.IGuiListEntry> workingList = getAllEntries();
-        LinkedList<GuiListExtended.IGuiListEntry> newList = getEmptyList();
-        if(none) {
-            LinkedList<GuiListExtended.IGuiListEntry> unbound = new LinkedList<>();
-            for(GuiListExtended.IGuiListEntry entry : workingList) {
-                if(entry instanceof GuiNewKeyBindingList.KeyEntry) {
-                    GuiNewKeyBindingList.KeyEntry ent = (GuiNewKeyBindingList.KeyEntry) entry;
-                    if(ent.getKeybinding().getKeyCode() == 0) {
-                        unbound.add(ent);
-                    }
-                }
-            }
-            workingList = unbound;
-        } else if(conflicts) {
-            LinkedList<GuiListExtended.IGuiListEntry> conflicts = new LinkedList<>();
-            for(GuiListExtended.IGuiListEntry entry : workingList) {
-                if(entry instanceof GuiNewKeyBindingList.KeyEntry) {
-                    GuiNewKeyBindingList.KeyEntry ent = (GuiNewKeyBindingList.KeyEntry) entry;
-                    if(ent.getKeybinding().getKeyCode() == 0) {
-                        continue;
-                    }
-                    for(GuiListExtended.IGuiListEntry entry1 : ((GuiNewKeyBindingList) keyBindingList).getListEntriesAll()) {
-                        if(!entry.equals(entry1))
-                            if(entry1 instanceof GuiNewKeyBindingList.KeyEntry) {
-                                GuiNewKeyBindingList.KeyEntry ent1 = (GuiNewKeyBindingList.KeyEntry) entry1;
-                                if(ent1.getKeybinding().getKeyCode() == 0) {
-                                    continue;
-                                }
-                                if(ent.getKeybinding().conflicts(ent1.getKeybinding())) {
-                                    if(!conflicts.contains(ent))
-                                        conflicts.add(ent);
-                                    if(!conflicts.contains(ent1))
-                                        conflicts.add(ent1);
-                                }
-                            }
-                    }
-                    
-                }
-            }
-            workingList = conflicts;
-        }
-        boolean searched = false;
-        if(!search.getText().isEmpty()) {
-            
-            for(GuiListExtended.IGuiListEntry entry : workingList) {
-                if(!isKeyEntry(entry)) {
-                    continue;
-                }
-                GuiNewKeyBindingList.KeyEntry ent = (GuiNewKeyBindingList.KeyEntry) entry;
-                String compareStr = translate(ent.getKeybinding().getKeyDescription()).toLowerCase();
-                if(boxSearchCategory.isChecked()) {
-                    compareStr = translate(ent.getKeybinding().getKeyCategory()).toLowerCase();
-                }
-                if(boxSearchKey.isChecked()) {
-                    compareStr = translate(ent.getKeybinding().getDisplayName()).toLowerCase();
-                }
-                
-                if(compareStr.contains(search.getText().toLowerCase())) {
-                    newList.add(entry);
-                }
-            }
-            searched = true;
-        }
-        lastFilterText = search.getText();
-        if(!searched) {
-            newList = workingList;
-        }
-        newList = sort(newList, sortingType);
-        setEntries(newList);
-        
-    }
-    
-    
-    public LinkedList<GuiListExtended.IGuiListEntry> sort(LinkedList<GuiListExtended.IGuiListEntry> list, EnumSortingType type) {
-        if(sortingType != EnumSortingType.DEFAULT) {
-            LinkedList<GuiListExtended.IGuiListEntry> filteredList = getEmptyList();
-            for(GuiListExtended.IGuiListEntry entry : list) {
-                if(isKeyEntry(entry)) {
-                    filteredList.add(entry);
-                }
-            }
-            filteredList.sort((o1, o2) -> {
-                if(o1 instanceof GuiNewKeyBindingList.KeyEntry && o2 instanceof GuiNewKeyBindingList.KeyEntry) {
-                    GuiNewKeyBindingList.KeyEntry ent1 = (GuiNewKeyBindingList.KeyEntry) o1;
-                    GuiNewKeyBindingList.KeyEntry ent2 = (GuiNewKeyBindingList.KeyEntry) o2;
-                    if(type == EnumSortingType.AZ) {
-                        return translate(ent1.getKeybinding().getKeyDescription()).compareTo(translate(ent2.getKeybinding().getKeyDescription()));
-                    } else if(type == EnumSortingType.ZA) {
-                        return translate(ent2.getKeybinding().getKeyDescription()).compareTo(translate(ent1.getKeybinding().getKeyDescription()));
-                    }
-                    
-                }
-                return -1;
-            });
-            return filteredList;
-        }
-        return list;
-    }
-    
-    
-    public LinkedList<GuiListExtended.IGuiListEntry> getAllEntries() {
-        return ((GuiNewKeyBindingList) keyBindingList).getListEntriesAll();
-    }
-    
-    public LinkedList<GuiListExtended.IGuiListEntry> getEmptyList() {
-        return new LinkedList<>();
-    }
-    
-    public void setEntries(LinkedList<GuiListExtended.IGuiListEntry> entries) {
-        ((GuiNewKeyBindingList) keyBindingList).setListEntries(entries);
-    }
-    
-    public boolean isKeyEntry(GuiListExtended.IGuiListEntry entry) {
-        return entry instanceof GuiNewKeyBindingList.KeyEntry;// || entry instanceof GuiKeyBindingList.KeyEntry; Vanilla class doesn't have the methods we need and reflection / AT would be tedious
-    }
-    
-    
-    public String translate(String text) {
-        return I18n.format(text);
-    }
-    
-    /**
-     * Handles mouse input.
-     */
-    public void handleMouseInput() throws IOException {
-        superSuperHandleMouseInput();
-        this.keyBindingList.handleMouseInput();
-    }
-    
-    /**
-     * Handles mouse input.
-     */
-    public void superSuperHandleMouseInput() {
-        int i = Mouse.getEventX() * this.width / this.mc.displayWidth;
-        int j = this.height - Mouse.getEventY() * this.height / this.mc.displayHeight - 1;
-        int k = Mouse.getEventButton();
-        
-        if(Mouse.getEventButtonState()) {
-            if(this.mc.gameSettings.touchscreen && this.touchValue++ > 0) {
-                return;
-            }
-            
-            this.eventButton = k;
-            this.lastMouseEvent = Minecraft.getSystemTime();
-            this.mouseClicked(i, j, this.eventButton);
-        } else if(k != -1) {
-            if(this.mc.gameSettings.touchscreen && --this.touchValue > 0) {
-                return;
-            }
-            
-            this.eventButton = -1;
-            this.mouseReleased(i, j, k);
-        } else if(this.eventButton != -1 && this.lastMouseEvent > 0L) {
-            long l = Minecraft.getSystemTime() - this.lastMouseEvent;
-            this.mouseClickMove(i, j, this.eventButton, l);
-        }
-    }
-    
-    /**
-     * Called by the controls from the buttonList when activated. (Mouse pressed for buttons)
-     */
-    protected void actionPerformed(GuiButton button) {
-        if(button.id == 200) {
-            this.mc.displayGuiScreen(this.parentScreen);
-        } else if(button.id == 201) {
-            for(KeyBinding keybinding : this.mc.gameSettings.keyBindings) {
-                keybinding.setToDefault();
-            }
-            KeyBinding.resetKeyBindingArrayAndHash();
-            toggleFreeKeys = false;
-        } else if(button.id < 100 && button instanceof GuiOptionButton) {
-            this.options.setOptionValue(((GuiOptionButton) button).returnEnumOptions(), 1);
-            button.displayString = this.options.getKeyBinding(GameSettings.Options.getEnumOptions(button.id));
-        } else if(button.id == 2906) {
-            toggleFreeKeys = false;
-            none = false;
-            buttonNone.displayString = translate("options.showNone");
-            if(!conflicts) {
-                conflicts = true;
-                buttonConflict.displayString = translate("options.showAll");
-                refreshKeys();
-            } else {
-                conflicts = false;
-                buttonConflict.displayString = translate("options.showConflicts");
-                refreshKeys();
-            }
-        } else if(button.id == 2907) {
-            toggleFreeKeys = false;
-            conflicts = false;
-            buttonConflict.displayString = translate("options.showConflicts");
-            if(!none) {
-                none = true;
-                buttonNone.displayString = translate("options.showAll");
-                refreshKeys();
-            } else {
-                none = false;
-                buttonNone.displayString = translate("options.showNone");
-                refreshKeys();
-            }
-        } else if(button.id == 2908) {
-            toggleFreeKeys = false;
-            sortingType = sortingType.cycle();
-            buttonSorting.displayString = translate("options.sort") + ": " + sortingType.getName();
-            refreshKeys();
-        } else if(button.id == 2909) {
-            toggleFreeKeys = false;
-            boxSearchKey.setIsChecked(false);
-            refreshKeys();
-        } else if(button.id == 2910) {
-            toggleFreeKeys = false;
-            boxSearchCategory.setIsChecked(false);
-            refreshKeys();
-        } else if(button.id == 2911) {
-            buttonToggleKeys.displayString = translate("options.toggleFree");
-            toggleFreeKeys = !toggleFreeKeys;
-        }
-    }
-    
-    /**
-     * Called when the mouse is clicked. Args : mouseX, mouseY, clickedButton
-     */
-    protected void mouseClicked(int mouseX, int mouseY, int mouseButton) {
-        if(this.buttonId != null) {
-            this.buttonId.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.getActiveModifier(), -100 + mouseButton);
-            this.options.setOptionKeyBinding(this.buttonId, -100 + mouseButton);
-            this.buttonId = null;
-            KeyBinding.resetKeyBindingArrayAndHash();
-        } else if(mouseButton != 0 || !this.keyBindingList.mouseClicked(mouseX, mouseY, mouseButton)) {
-            superSuperMouseClicked(mouseX, mouseY, mouseButton);
-        }
-        search.mouseClicked(mouseX, mouseY, mouseButton);
-        if(mouseButton == 1 && mouseX >= search.xPosition && mouseX < search.xPosition + search.width && mouseY >= search.yPosition && mouseY < search.yPosition + search.height) {
-            search.setText("");
-        }
-    }
-    
-    /**
-     * Called when the mouse is clicked. Args : mouseX, mouseY, clickedButton
-     */
-    protected void superSuperMouseClicked(int mouseX, int mouseY, int mouseButton) {
-        if(mouseButton == 0) {
-            for(int i = 0; i < this.buttonList.size(); ++i) {
-                GuiButton guibutton = this.buttonList.get(i);
-                
-                if(guibutton.mousePressed(this.mc, mouseX, mouseY)) {
-                    net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent.Pre event = new net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent.Pre(this, guibutton, this.buttonList);
-                    if(net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event))
-                        break;
-                    guibutton = event.getButton();
-                    this.selectedButton = guibutton;
-                    guibutton.playPressSound(this.mc.getSoundHandler());
-                    this.actionPerformed(guibutton);
-                    if(this.equals(this.mc.currentScreen))
-                        net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.ActionPerformedEvent.Post(this, event.getButton(), this.buttonList));
-                }
-            }
-        }
-    }
-    
-    /**
-     * Called when a mouse button is released.
-     */
-    protected void mouseReleased(int mouseX, int mouseY, int state) {
-        if(state != 0 || !this.keyBindingList.mouseReleased(mouseX, mouseY, state)) {
-            superSuperMouseReleased(mouseX, mouseY, state);
-        }
-    }
-    
-    protected void superSuperMouseReleased(int mouseX, int mouseY, int state) {
-        if(this.selectedButton != null && state == 0) {
-            this.selectedButton.mouseReleased(mouseX, mouseY);
-            this.selectedButton = null;
-        }
-    }
-    
-    /**
-     * Fired when a key is typed (except F11 which toggles full screen). This is the equivalent of
-     * KeyListener.keyTyped(KeyEvent e). Args : character (character on the key), keyCode (lwjgl Keyboard key code)
-     */
-    protected void keyTyped(char typedChar, int keyCode) {
-        if(this.buttonId != null) {
-            if(keyCode == 1) {
-                this.buttonId.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.NONE, 0);
-                this.options.setOptionKeyBinding(this.buttonId, 0);
-            } else if(keyCode != 0) {
-                this.buttonId.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.getActiveModifier(), keyCode);
-                this.options.setOptionKeyBinding(this.buttonId, keyCode);
-            } else if(typedChar > 0) {
-                this.buttonId.setKeyModifierAndCode(net.minecraftforge.client.settings.KeyModifier.getActiveModifier(), typedChar + 256);
-                this.options.setOptionKeyBinding(this.buttonId, typedChar + 256);
-            }
-            if(!KeyModifier.isKeyCodeModifier(keyCode)) {
-                this.buttonId = null;
-            }
-            this.time = Minecraft.getSystemTime();
-            KeyBinding.resetKeyBindingArrayAndHash();
-        } else {
-            if(search.isFocused())
-                search.textboxKeyTyped(typedChar, keyCode);
-            else {
-                superSuperKeyTyped(typedChar, keyCode);
-            }
-        }
-    }
-    
-    protected void superSuperKeyTyped(char typedChar, int keyCode) {
-        if(keyCode == 1) {
-            this.mc.displayGuiScreen(null);
-            
-            if(this.mc.currentScreen == null) {
-                this.mc.setIngameFocus();
-            }
-        }
-    }
-    
-    /**
-     * Draws the screen and all the components in it.
-     */
-    public void drawScreen(int mouseX, int mouseY, float partialTicks) {
-        this.drawDefaultBackground();
-        this.keyBindingList.drawScreen(mouseX, mouseY, partialTicks);
-        this.drawCenteredString(this.fontRendererObj, this.screenTitle, this.width / 2, 8, 16777215);
-        this.drawCenteredString(this.fontRendererObj, translate("options.search"), this.width / 2 - (155 / 2), this.height - 29 - 39, 16777215);
-        boolean flag = false;
-        
-        for(KeyBinding keybinding : this.options.keyBindings) {
-            if(!keybinding.isSetToDefaultValue()) {
-                flag = true;
-                break;
-            }
-        }
-        
-        this.buttonReset.enabled = flag;
-        superSuperDrawScreen(mouseX, mouseY, partialTicks);
-        search.drawTextBox();
-        
-        if(toggleFreeKeys) {
-            drawRect(keyBindingList.left, keyBindingList.top, keyBindingList.right, keyBindingList.bottom , 0xFF000000);
-            LinkedList<Integer> keyCodes = new LinkedList<>();
-            for(int i = 2; i < 256; i++) {
-                keyCodes.add(i);
-            }
-            keyCodes.add(-98);
-            keyCodes.add(-99);
-            keyCodes.add(-100);
-            
-            List<Integer> removed = new ArrayList<>();
-            ((GuiNewKeyBindingList) keyBindingList).getListEntriesAll().forEach(i -> {
-                if(i instanceof GuiNewKeyBindingList.KeyEntry) {
-                    removed.add(((GuiNewKeyBindingList.KeyEntry) i).getKeybinding().getKeyCode());
-                }
-            });
-            int[] rem = new int[]{0xDB, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x70, 0x71, 0x29, 0x79, 0x57, 0x7B, 0x7D, 0x8D, 0x90, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x9C, 0xA7, 0xB3, 0xC5, 0x91, 0xC4, 0xDA};
-            for(int i : rem) {
-                removed.add(i);
-            }
-            
-            keyCodes.forEach(i -> {
-                if(i >= 0)
-                    if(Keyboard.getKeyName(i) == null || Keyboard.getKeyName(i).isEmpty()) {
-                        removed.add(i);
-                    }
-            });
-            keyCodes.removeAll(removed);
-            Collections.sort(keyCodes);
-            final int[] x = {0};
-            final int[] y = {0};
-            final int[] count = {0};
-            fontRendererObj.drawString(translate("options.availableKeys") + ":", width / 2, keyBindingList.top + 2, 0xFFFFFF);
-            keyCodes.forEach(key -> {
-                if(key >= 0) {
-                    fontRendererObj.drawString(Keyboard.getKeyName(key), keyBindingList.left + (x[0] * 65), keyBindingList.top + 12 + (y[0]++ * fontRendererObj.FONT_HEIGHT), 0xFF55FF);
-                } else {
-                    switch(key + 100) {
-                        case 0:
-                            fontRendererObj.drawString("Button 1", keyBindingList.left + (x[0] * 65), keyBindingList.top + 12 + (y[0]++ * fontRendererObj.FONT_HEIGHT), 0x55FF55);
-                            break;
-                        case 1:
-                            fontRendererObj.drawString("Button 2", keyBindingList.left + (x[0] * 65), keyBindingList.top + 12 + (y[0]++ * fontRendererObj.FONT_HEIGHT), 0x55FF55);
-                            break;
-                        case 2:
-                            fontRendererObj.drawString("Button 3", keyBindingList.left + (x[0] * 65), keyBindingList.top + 12 + (y[0]++ * fontRendererObj.FONT_HEIGHT), 0x55FF55);
-                            break;
-                        
-                    }
-                }
-                count[0]++;
-                if(count[0] > keyBindingList.height / 30) {
-                    count[0] = 0;
-                    x[0]++;
-                    y[0] = 0;
-                }
-            });
-        }
-    }
-    
-    public void superSuperDrawScreen(int mouseX, int mouseY, float partialTicks) {
-        for(GuiButton aButtonList : this.buttonList) {
-            aButtonList.func_191745_a(this.mc, mouseX, mouseY, partialTicks);
-        }
-        
-        for(GuiLabel aLabelList : this.labelList) {
-            aLabelList.drawLabel(this.mc, mouseX, mouseY);
-        }
-    }
-    
-}

+ 0 - 229
src/main/java/us/getfluxed/controlsearch/client/gui/GuiNewKeyBindingList.java

@@ -1,229 +0,0 @@
-package us.getfluxed.controlsearch.client.gui;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.*;
-import net.minecraft.client.resources.I18n;
-import net.minecraft.client.settings.KeyBinding;
-import net.minecraft.util.text.TextFormatting;
-import net.minecraftforge.fml.relauncher.*;
-import org.apache.commons.lang3.ArrayUtils;
-
-import java.util.*;
-
-@SideOnly(Side.CLIENT)
-public class GuiNewKeyBindingList extends GuiKeyBindingList {
-    
-    private final GuiNewControls controlsScreen;
-    private final Minecraft mc;
-    private LinkedList<IGuiListEntry> listEntries;
-    private LinkedList<IGuiListEntry> listEntriesAll;
-    
-    private int maxListLabelWidth;
-    
-    public GuiNewKeyBindingList(GuiNewControls controls, Minecraft mcIn) {
-        super(controls, mcIn);
-        this.controlsScreen = controls;
-        this.mc = mcIn;
-        this.width = controls.width + 45;
-        this.height = controls.height + 80;
-        this.top = 63;
-        this.bottom = controls.height - 80;
-        KeyBinding[] akeybinding = ArrayUtils.clone(mcIn.gameSettings.keyBindings);
-        listEntries = new LinkedList<>();
-        listEntriesAll = new LinkedList<>();
-        
-        Arrays.sort(akeybinding);
-        int i = 0;
-        String s = null;
-        
-        for(KeyBinding keybinding : akeybinding) {
-            String s1 = keybinding.getKeyCategory();
-            
-            if(!s1.equals(s)) {
-                s = s1;
-                if(!s1.endsWith(".hidden")) {
-                    this.listEntries.add(new GuiNewKeyBindingList.CategoryEntry(s1));
-                    this.listEntriesAll.add(new GuiNewKeyBindingList.CategoryEntry(s1));
-                }
-            }
-            
-            int j = mcIn.fontRendererObj.getStringWidth(I18n.format(keybinding.getKeyDescription()));
-            
-            if(j > this.maxListLabelWidth) {
-                this.maxListLabelWidth = j;
-            }
-            if(!s1.endsWith(".hidden")) {
-                this.listEntries.add(new GuiNewKeyBindingList.KeyEntry(keybinding));
-                this.listEntriesAll.add(new GuiNewKeyBindingList.KeyEntry(keybinding));
-            }
-        }
-    }
-    
-    protected int getSize() {
-        return this.listEntries.size();
-    }
-    
-    /**
-     * Gets the IGuiListEntry object for the given index
-     */
-    public GuiListExtended.IGuiListEntry getListEntry(int index) {
-        return this.listEntries.get(index);
-    }
-    
-    protected int getScrollBarX() {
-        return super.getScrollBarX() + 35;
-    }
-    
-    /**
-     * Gets the width of the list
-     */
-    public int getListWidth() {
-        return super.getListWidth() + 32;
-    }
-    
-    @SideOnly(Side.CLIENT)
-    public class CategoryEntry implements GuiListExtended.IGuiListEntry {
-        
-        public final String labelText;
-        private final int labelWidth;
-        
-        public CategoryEntry(String name) {
-            this.labelText = I18n.format(name);
-            this.labelWidth = GuiNewKeyBindingList.this.mc.fontRendererObj.getStringWidth(this.labelText);
-        }
-        
-        @Override
-        public void func_192633_a(int p_192633_1_, int p_192633_2_, int p_192633_3_, float p_192633_4_) {
-        }
-        
-        @Override
-        public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float p_192634_9_) {
-            GuiNewKeyBindingList.this.mc.fontRendererObj.drawString(this.labelText, GuiNewKeyBindingList.this.mc.currentScreen.width / 2 - this.labelWidth / 2, y + slotHeight - GuiNewKeyBindingList.this.mc.fontRendererObj.FONT_HEIGHT - 1, 16777215);
-        }
-        
-        /**
-         * Called when the mouse is clicked within this entry. Returning true means that something within this entry was
-         * clicked and the list should not be dragged.
-         */
-        public boolean mousePressed(int slotIndex, int mouseX, int mouseY, int mouseEvent, int relativeX, int relativeY) {
-            return false;
-        }
-        
-        /**
-         * Fired when the mouse button is released. Arguments: index, x, y, mouseEvent, relativeX, relativeY
-         */
-        public void mouseReleased(int slotIndex, int x, int y, int mouseEvent, int relativeX, int relativeY) {
-        }
-        
-    }
-    
-    @SideOnly(Side.CLIENT)
-    public class KeyEntry implements GuiListExtended.IGuiListEntry {
-        
-        /**
-         * The keybinding specified for this KeyEntry
-         */
-        private final KeyBinding keybinding;
-        /**
-         * The localized key description for this KeyEntry
-         */
-        private final String keyDesc;
-        private final GuiButton btnChangeKeyBinding;
-        private final GuiButton btnReset;
-        
-        private KeyEntry(KeyBinding name) {
-            this.keybinding = name;
-            this.keyDesc = I18n.format(name.getKeyDescription());
-            this.btnChangeKeyBinding = new GuiButton(0, 0, 0, 95, 20, I18n.format(name.getKeyDescription()));
-            this.btnReset = new GuiButton(0, 0, 0, 50, 20, I18n.format("controls.reset"));
-        }
-        
-        @Override
-        public void func_192633_a(int p_192633_1_, int p_192633_2_, int p_192633_3_, float p_192633_4_) {
-        }
-        
-        @Override
-        public void func_192634_a(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isSelected, float p_192634_9_) {
-            boolean flag = GuiNewKeyBindingList.this.controlsScreen.buttonId == this.keybinding;
-            GuiNewKeyBindingList.this.mc.fontRendererObj.drawString(this.keyDesc, x + 90 - GuiNewKeyBindingList.this.maxListLabelWidth, y + slotHeight / 2 - GuiNewKeyBindingList.this.mc.fontRendererObj.FONT_HEIGHT / 2, 16777215);
-            //            GuiNewKeyBindingList.this.mc.fontRendererObj.drawString(String.format("(%s)", I18n.format(keybinding.getKeyCategory())), x - 45 - GuiNewKeyBindingList.this.maxListLabelWidth, y + slotHeight / 2 - GuiNewKeyBindingList.this.mc.fontRendererObj.FONT_HEIGHT / 2, 16777215);
-            btnReset.visible = !keybinding.isSetToDefaultValue();
-            this.btnReset.xPosition = x + 210;
-            this.btnReset.yPosition = y;
-            this.btnReset.enabled = !this.keybinding.isSetToDefaultValue();
-            
-            this.btnChangeKeyBinding.xPosition = x + 105;
-            this.btnChangeKeyBinding.yPosition = y;
-            this.btnChangeKeyBinding.displayString = this.keybinding.getDisplayName();
-            
-            boolean flag1 = false;
-            boolean keyCodeModifierConflict = true; // less severe form of conflict, like SHIFT conflicting with SHIFT+G
-            
-            if(this.keybinding.getKeyCode() != 0) {
-                for(KeyBinding keybinding : GuiNewKeyBindingList.this.mc.gameSettings.keyBindings) {
-                    if(keybinding != this.keybinding && keybinding.conflicts(this.keybinding)) {
-                        flag1 = true;
-                        keyCodeModifierConflict &= keybinding.hasKeyCodeModifierConflict(this.keybinding);
-                    }
-                }
-            }
-            
-            if(flag) {
-                this.btnChangeKeyBinding.displayString = TextFormatting.WHITE + "> " + TextFormatting.YELLOW + this.btnChangeKeyBinding.displayString + TextFormatting.WHITE + " <";
-            } else if(flag1) {
-                this.btnChangeKeyBinding.displayString = (keyCodeModifierConflict ? TextFormatting.GOLD : TextFormatting.RED) + this.btnChangeKeyBinding.displayString;
-            }
-            this.btnChangeKeyBinding.func_191745_a(GuiNewKeyBindingList.this.mc, mouseX, mouseY, p_192634_9_);
-            this.btnReset.func_191745_a(GuiNewKeyBindingList.this.mc, mouseX, mouseY, p_192634_9_);
-            //            if(mouseX >= x + 90 - GuiNewKeyBindingList.this.maxListLabelWidth && mouseX <= x + listWidth) {
-            if(mouseY >= y && mouseY <= y + slotHeight) {
-                mc.fontRendererObj.drawString(I18n.format(keybinding.getKeyCategory()), mouseX + 10, mouseY, 0xFFFFFF);
-            }
-            //            }
-            
-            
-        }
-        
-        /**
-         * Called when the mouse is clicked within this entry. Returning true means that something within this entry was
-         * clicked and the list should not be dragged.
-         */
-        public boolean mousePressed(int slotIndex, int mouseX, int mouseY, int mouseEvent, int relativeX, int relativeY) {
-            if(this.btnChangeKeyBinding.mousePressed(GuiNewKeyBindingList.this.mc, mouseX, mouseY)) {
-                GuiNewKeyBindingList.this.controlsScreen.buttonId = this.keybinding;
-                return true;
-            } else if(this.btnReset.mousePressed(GuiNewKeyBindingList.this.mc, mouseX, mouseY)) {
-                this.keybinding.setToDefault();
-                GuiNewKeyBindingList.this.mc.gameSettings.setOptionKeyBinding(this.keybinding, this.keybinding.getKeyCodeDefault());
-                KeyBinding.resetKeyBindingArrayAndHash();
-                return true;
-            } else {
-                return false;
-            }
-        }
-        
-        /**
-         * Fired when the mouse button is released. Arguments: index, x, y, mouseEvent, relativeX, relativeY
-         */
-        public void mouseReleased(int slotIndex, int x, int y, int mouseEvent, int relativeX, int relativeY) {
-            this.btnChangeKeyBinding.mouseReleased(x, y);
-            this.btnReset.mouseReleased(x, y);
-        }
-        
-        public KeyBinding getKeybinding() {
-            return keybinding;
-        }
-    }
-    
-    public LinkedList<IGuiListEntry> getListEntries() {
-        return listEntries;
-    }
-    
-    public LinkedList<IGuiListEntry> getListEntriesAll() {
-        return listEntriesAll;
-    }
-    
-    public void setListEntries(LinkedList<IGuiListEntry> listEntries) {
-        this.listEntries = listEntries;
-    }
-}

+ 0 - 23
src/main/java/us/getfluxed/controlsearch/events/ClientEventHandler.java

@@ -1,23 +0,0 @@
-package us.getfluxed.controlsearch.events;
-
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.GuiControls;
-import net.minecraftforge.client.event.GuiOpenEvent;
-import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
-import us.getfluxed.controlsearch.client.gui.GuiNewControls;
-
-/**
- * Created by Jared on 8/28/2016.
- */
-public class ClientEventHandler {
-
-    @SubscribeEvent
-    public void guiInit(GuiOpenEvent e) {
-        if (e.getGui() instanceof GuiControls && !(e.getGui() instanceof GuiNewControls)) {
-            e.setGui(new GuiNewControls(Minecraft.getMinecraft().currentScreen, Minecraft.getMinecraft().gameSettings));
-        }
-    }
-
-
-
-}

+ 0 - 11
src/main/java/us/getfluxed/controlsearch/events/CommonEventHandler.java

@@ -1,11 +0,0 @@
-package us.getfluxed.controlsearch.events;
-
-import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
-import net.minecraftforge.fml.common.gameevent.TickEvent;
-
-/**
- * Created by Jared on 8/28/2016.
- */
-public class CommonEventHandler {
-
-}

+ 0 - 16
src/main/java/us/getfluxed/controlsearch/proxy/ClientProxy.java

@@ -1,16 +0,0 @@
-package us.getfluxed.controlsearch.proxy;
-
-import net.minecraftforge.common.MinecraftForge;
-import us.getfluxed.controlsearch.events.ClientEventHandler;
-
-/**
- * Created by Jared on 8/28/2016.
- */
-public class ClientProxy extends CommonProxy {
-    @Override
-    public void registerEvents() {
-        super.registerEvents();
-        MinecraftForge.EVENT_BUS.register(new ClientEventHandler());
-    }
-}
-

+ 0 - 15
src/main/java/us/getfluxed/controlsearch/proxy/CommonProxy.java

@@ -1,15 +0,0 @@
-package us.getfluxed.controlsearch.proxy;
-
-import net.minecraftforge.common.MinecraftForge;
-import us.getfluxed.controlsearch.events.CommonEventHandler;
-
-/**
- * Created by Jared on 8/28/2016.
- */
-public class CommonProxy {
-
-    public void registerEvents() {
-        MinecraftForge.EVENT_BUS.register(new CommonEventHandler());
-    }
-
-}

+ 0 - 13
src/main/java/us/getfluxed/controlsearch/reference/Reference.java

@@ -1,13 +0,0 @@
-package us.getfluxed.controlsearch.reference;
-
-/**
- * Created by Jared on 8/28/2016.
- */
-public class Reference {
-
-    public static final String MODID = "controlling";
-    public static final String NAME = "Controlling";
-    public static final String VERSION = "3.0.6";
-
-
-}

+ 0 - 4
src/main/resources/META-INF/MANIFEST.MF

@@ -1,4 +0,0 @@
-Manifest-Version: 1.0
-Ant-Version: Apache Ant 1.8.3
-Created-By: 1.6.0_45-b06 (Sun Microsystems Inc.)
-FMLAT: controlsearch_at.cfg

+ 0 - 10
src/main/resources/META-INF/controlling_at.cfg

@@ -1,10 +0,0 @@
-public net.minecraft.client.gui.GuiControls field_146494_r # keyBindingList
-public net.minecraft.client.gui.GuiKeyBindingList field_148190_m # listEntries
-public net.minecraft.client.gui.Gui func_73733_a(IIIIII)V #drawGradient
-public net.minecraft.client.gui.Gui field_73735_i #zLevel
-public net.minecraft.client.gui.GuiScreen field_146292_n # buttonList
-
-public net.minecraft.client.gui.GuiScreen field_146290_a # selectedButton
-public net.minecraft.client.gui.GuiScreen field_146298_h # touchValue
-public net.minecraft.client.gui.GuiScreen field_146287_f # eventButton
-public net.minecraft.client.gui.GuiScreen field_146288_g # lastMouseEvent

+ 40 - 0
src/main/resources/META-INF/mods.toml

@@ -0,0 +1,40 @@
+# This is an example mods.toml file. It contains the data relating to the loading mods.
+# There are several mandatory fields (#mandatory), and many more that are optional (#optional).
+# The overall format is standard TOML format, v0.5.0.
+# Note that there are a couple of TOML lists in this file.
+# Find more information on toml format here:  https://github.com/toml-lang/toml
+# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
+modLoader="javafml" #mandatory
+# A version range to match for said mod loader - for regular FML @Mod it will be the minecraft version (without the 1.)
+loaderVersion="[13,)" #mandatory
+# A URL to refer people to when problems occur with this mod
+issueTrackerURL="https://github.com/jaredlll08/Controlling/issues" #optional
+# A URL for the "homepage" for this mod, displayed in the mod UI
+displayURL="https://minecraft.curseforge.com/projects/controlling" #optional
+# A text field displayed in the mod UI
+authors="Jaredlll08" #optional
+# A list of mods - how many allowed here is determined by the individual mod loader
+[[mods]] #mandatory
+# The modid of the mod
+modId="controlling" #mandatory
+# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
+version="4.0.0" #mandatory
+ # A display name for the mod
+displayName="Controlling" #mandatory
+# The description text for the mod (multi line!) (#mandatory)
+description='''
+Adds the ability to search for keybinds using their name in the KeyBinding menu, this allows players to easily find a key binding in the menu.
+'''
+
+# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
+[[dependencies.controlling]] #optional
+    # the modid of the dependency
+    modId="forge" #mandatory
+    # Does this dependency have to exist - if not, ordering below must be specified
+    mandatory=true #mandatory
+    # The version range of the dependency
+    versionRange="[14.23.2.0,)" #mandatory
+    # An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
+    ordering="NONE"
+    # Side this dependency is applied on - BOTH, CLIENT or SERVER
+    side="BOTH"

+ 8 - 0
src/main/resources/assets/controlling/lang/de_DE.json

@@ -0,0 +1,8 @@
+{
+  "options.search": "Suchen",
+  "options.showAll": "Alle anzeigen",
+  "options.showConflicts": "Konflikte anzeigen",
+  "options.showNone": "Unbenutze anzeigen",
+  "options.availableKeys": "Verfügbare Tasten",
+  "options.sort": "Sortieren nach"
+}

+ 0 - 6
src/main/resources/assets/controlling/lang/de_DE.lang

@@ -1,6 +0,0 @@
-options.search=Suchen
-options.showAll=Alle anzeigen
-options.showConflicts=Konflikte anzeigen
-options.showNone=Unbenutze anzeigen
-options.availableKeys=Verfügbare Tasten
-options.sort=Sortieren nach

+ 11 - 0
src/main/resources/assets/controlling/lang/en_US.json

@@ -0,0 +1,11 @@
+{
+  "options.search": "Search",
+  "options.showAll": "Show All",
+  "options.showConflicts": "Show Conflicts",
+  "options.showNone": "Show Unbound",
+  "options.availableKeys": "Available Keys",
+  "options.sort": "Sort",
+  "options.category": "Category",
+  "options.key": "Key",
+  "options.toggleFree": "Toggle Free"
+}

+ 0 - 9
src/main/resources/assets/controlling/lang/en_US.lang

@@ -1,9 +0,0 @@
-options.search=Search
-options.showAll=Show All
-options.showConflicts=Show Conflicts
-options.showNone=Show Unbound
-options.availableKeys=Available Keys
-options.sort=Sort
-options.category=Category
-options.key=Key
-options.toggleFree=Toggle Free

+ 8 - 0
src/main/resources/assets/controlling/lang/ru_RU.json

@@ -0,0 +1,8 @@
+{
+  "options.search": "Поиск",
+  "options.showAll": "Показать все",
+  "options.showConflicts": "Показать конфликты",
+  "options.showNone": "Показать несвязанные",
+  "options.availableKeys": "Доступные кнопки",
+  "options.sort": "Сортировать"
+}

+ 0 - 6
src/main/resources/assets/controlling/lang/ru_RU.lang

@@ -1,6 +0,0 @@
-options.search=Поиск
-options.showAll=Показать все
-options.showConflicts=Показать конфликты
-options.showNone=Показать несвязанные
-options.availableKeys=Доступные кнопки
-options.sort=Сортировать

+ 11 - 0
src/main/resources/assets/controlling/lang/tr_TR.json

@@ -0,0 +1,11 @@
+{
+  "options.search": "Arama",
+  "options.showAll": "Hepsini Göster",
+  "options.showConflicts": "Çakışmaları Göster",
+  "options.showNone": "Atanmamışları Göster",
+  "options.availableKeys": "Kullanılabilir Tuşlar",
+  "options.sort": "Tür",
+  "options.category": "Kategori",
+  "options.key": "Anahtar",
+  "options.toggleFree": "Serbest Geçiş"
+}

+ 0 - 9
src/main/resources/assets/controlling/lang/tr_TR.lang

@@ -1,9 +0,0 @@
-options.search=Arama
-options.showAll=Hepsini Göster
-options.showConflicts=Çakışmaları Göster
-options.showNone=Atanmamışları Göster
-options.availableKeys=Kullanılabilir Tuşlar
-options.sort=Tür
-options.category=Kategori
-options.key=Anahtar
-options.toggleFree=Serbest Geçiş

+ 10 - 0
src/main/resources/assets/controlling/lang/zh_CN.json

@@ -0,0 +1,10 @@
+{
+  "options.search": "搜索",
+  "options.showAll": "显示全部",
+  "options.showConflicts": "显示冲突部分",
+  "options.showNone": "显示未绑定部分",
+  "options.availableKeys": "可用的快捷键",
+  "options.sort": "种类",
+  "options.category": "范畴",
+  "options.key": "键"
+}

+ 0 - 8
src/main/resources/assets/controlling/lang/zh_CN.lang

@@ -1,8 +0,0 @@
-options.search=搜索
-options.showAll=显示全部
-options.showConflicts=显示冲突部分
-options.showNone=显示未绑定部分
-options.availableKeys=可用的快捷键
-options.sort=种类
-options.category=范畴
-options.key=键

+ 0 - 16
src/main/resources/mcmod.info

@@ -1,16 +0,0 @@
-[
-{
-  "modid": "controlling",
-  "name": "Controlling",
-  "description": "Gives people more Control of the key binding screen.",
-  "version": "${version}",
-  "mcversion": "${mcversion}",
-  "url": "",
-  "updateUrl": "",
-  "authorList": ["Jaredlll08"],
-  "credits": "",
-  "logoFile": "",
-  "screenshots": [],
-  "dependencies": []
-}
-]

+ 7 - 0
src/main/resources/pack.mcmeta

@@ -0,0 +1,7 @@
+{
+    "pack": {
+        "description": "controlling resources",
+        "pack_format": 4,
+        "_comment": "A pack_format of 4 requires json lang files. Note: we require v4 pack meta for all mods."
+    }
+}