Jared 4 жил өмнө
parent
commit
a32a514af9

+ 3 - 3
build.gradle

@@ -43,7 +43,7 @@ repositories {
 }
 
 minecraft {
-    mappings channel: 'snapshot', version: '20200712-1.16.1'
+    mappings channel: 'snapshot', version: '20200820-1.16.1'
     accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
 
     runs {
@@ -96,7 +96,7 @@ task genGitChangelog() {
 }
 
 dependencies {
-    minecraft 'net.minecraftforge:forge:1.16.2-33.0.7'
+    minecraft 'net.minecraftforge:forge:1.16.3-34.0.5'
 }
 
 jar {
@@ -207,7 +207,7 @@ task updateVersionTracker {
         def body = [
                 'author'        : "${project.findProperty('versionTrackerAuthor')}",
                 'projectName'   : "controlling",
-                'gameVersion'   : "1.16.2",
+                'gameVersion'   : "1.16.3",
                 'projectVersion': "${version}",
                 'homepage'      : "${project.findProperty('versionTrackerHomepage')}",
                 'uid'           : "${project.findProperty('versionTrackerKey')}"

+ 1 - 1
src/main/java/com/blamejared/controlling/Controlling.java

@@ -28,7 +28,7 @@ public class Controlling {
                 URLConnection urlConnection = url.openConnection();
                 urlConnection.setConnectTimeout(15000);
                 urlConnection.setReadTimeout(15000);
-                urlConnection.setRequestProperty("User-Agent", "Controlling|1.16.2");
+                urlConnection.setRequestProperty("User-Agent", "Controlling|1.16.3");
                 try(BufferedReader reader = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()))) {
                     PATRON_LIST = reader.lines().filter(s -> !s.isEmpty()).collect(Collectors.toSet());
                 }

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

@@ -70,7 +70,7 @@ public class GuiNewControls extends ControlsScreen {
 
         this.keyBindingList = new GuiNewKeyBindingList(this, this.minecraft);
         this.children.add(this.keyBindingList);
-        this.setFocused(this.keyBindingList);
+        this.setListener(this.keyBindingList);
         this.addButton(new Button(this.width / 2 - 155 + 160, this.height - 29, 150, 20, new TranslationTextComponent("gui.done"), (p_213126_1_) -> GuiNewControls.this.minecraft.displayGuiScreen(GuiNewControls.this.parentScreen)));
 
         this.buttonReset = this.addButton(new Button(this.width / 2 - 155, this.height - 29, 150, 20, new TranslationTextComponent("controls.resetAll"), (p_213126_1_) -> {
@@ -188,9 +188,9 @@ public class GuiNewControls extends ControlsScreen {
     public void filterKeys() {
 
         lastSearch = search.getText();
-        keyBindingList.children().clear();
+        keyBindingList.getEventListeners().clear();
         if (lastSearch.isEmpty() && displayMode == DisplayMode.ALL && sortOrder == SortOrder.NONE) {
-            keyBindingList.children().addAll(((GuiNewKeyBindingList) keyBindingList).getAllEntries());
+            keyBindingList.getEventListeners().addAll(((GuiNewKeyBindingList) keyBindingList).getAllEntries());
             return;
         }
         this.keyBindingList.setScrollAmount(0);
@@ -214,16 +214,16 @@ public class GuiNewControls extends ControlsScreen {
                 if (entry instanceof GuiNewKeyBindingList.KeyEntry) {
                     GuiNewKeyBindingList.KeyEntry keyEntry = (GuiNewKeyBindingList.KeyEntry) entry;
                     if (filters.test(keyEntry)) {
-                        keyBindingList.children().add(entry);
+                        keyBindingList.getEventListeners().add(entry);
                     }
                 } else {
-                    keyBindingList.children().add(entry);
+                    keyBindingList.getEventListeners().add(entry);
                 }
             } else {
                 if (entry instanceof GuiNewKeyBindingList.KeyEntry) {
                     GuiNewKeyBindingList.KeyEntry keyEntry = (GuiNewKeyBindingList.KeyEntry) entry;
                     if (filters.test(keyEntry)) {
-                        keyBindingList.children().add(entry);
+                        keyBindingList.getEventListeners().add(entry);
                     }
                 }
             }
@@ -232,11 +232,11 @@ public class GuiNewControls extends ControlsScreen {
         if (searchType == SearchType.CATEGORY && sortOrder == SortOrder.NONE && displayMode == DisplayMode.ALL) {
             Set<GuiNewKeyBindingList.CategoryEntry> categories = new LinkedHashSet<>();
 
-            for (KeyBindingList.Entry entry : keyBindingList.children()) {
+            for (KeyBindingList.Entry entry : keyBindingList.getEventListeners()) {
                 if (entry instanceof GuiNewKeyBindingList.CategoryEntry) {
                     GuiNewKeyBindingList.CategoryEntry centry = (GuiNewKeyBindingList.CategoryEntry) entry;
                     categories.add(centry);
-                    for (KeyBindingList.Entry child : keyBindingList.children()) {
+                    for (KeyBindingList.Entry child : keyBindingList.getEventListeners()) {
                         if (child instanceof GuiNewKeyBindingList.KeyEntry) {
                             GuiNewKeyBindingList.KeyEntry childEntry = (GuiNewKeyBindingList.KeyEntry) child;
                             if (childEntry.getKeybinding().getKeyCategory().equals(centry.getName())) {
@@ -246,9 +246,9 @@ public class GuiNewControls extends ControlsScreen {
                     }
                 }
             }
-            keyBindingList.children().removeAll(categories);
+            keyBindingList.getEventListeners().removeAll(categories);
         }
-        sortOrder.sort(keyBindingList.children());
+        sortOrder.sort(keyBindingList.getEventListeners());
 
 
     }
@@ -297,7 +297,7 @@ public class GuiNewControls extends ControlsScreen {
             search.setFocused2(false);
         } else if (mb == 0 && this.keyBindingList.mouseClicked(mx, my, mb)) {
             this.setDragging(true);
-            this.setFocused(this.keyBindingList);
+            this.setListener(this.keyBindingList);
             valid = true;
             search.setFocused2(false);
         } else {
@@ -310,9 +310,9 @@ public class GuiNewControls extends ControlsScreen {
 
         if (!valid) {
 
-            for (IGuiEventListener iguieventlistener : this.children()) {
+            for (IGuiEventListener iguieventlistener : this.getEventListeners()) {
                 if (iguieventlistener.mouseClicked(mx, my, mb)) {
-                    this.setFocused(iguieventlistener);
+                    this.setListener(iguieventlistener);
                     if (mb == 0) {
                         this.setDragging(true);
                     }

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

@@ -32,7 +32,7 @@ public class GuiNewKeyBindingList extends KeyBindingList {
         this.x1 = controls.width + 45;
         this.controlsScreen = controls;
         this.mc = mcIn;
-        children().clear();
+        getEventListeners().clear();
         allEntries = new ArrayList<>();
         KeyBinding[] akeybinding = ArrayUtils.clone(mcIn.gameSettings.keyBindings);
         Arrays.sort(akeybinding);
@@ -64,7 +64,7 @@ public class GuiNewKeyBindingList extends KeyBindingList {
     }
 
     public void add(Entry ent) {
-        children().add(ent);
+        getEventListeners().add(ent);
         allEntries.add(ent);
     }
 
@@ -94,7 +94,7 @@ public class GuiNewKeyBindingList extends KeyBindingList {
         }
 
         @Override
-        public List<? extends IGuiEventListener> children() {
+        public List<? extends IGuiEventListener> getEventListeners() {
             return ImmutableList.of();
         }
 
@@ -181,7 +181,7 @@ public class GuiNewKeyBindingList extends KeyBindingList {
             }
         }
 
-        public List<? extends IGuiEventListener> children() {
+        public List<? extends IGuiEventListener> getEventListeners() {
             return ImmutableList.of(this.btnChangeKeyBinding, this.btnResetKeyBinding);
         }
 

+ 2 - 2
src/main/resources/META-INF/mods.toml

@@ -1,5 +1,5 @@
 modLoader="javafml" #mandatory
-loaderVersion="[32,)" #mandatory
+loaderVersion="[34,)" #mandatory
 issueTrackerURL="https://github.com/jaredlll08/Controlling/issues" #optional
 displayURL="https://minecraft.curseforge.com/projects/controlling" #optional
 authors="Jaredlll08" #optional
@@ -8,7 +8,7 @@ license="MIT"
 modId="controlling" #mandatory
 version="${file.jarVersion}" #mandatory
 displayName="Controlling" #mandatory
-updateJSONURL="https://updates.blamejared.com/get?n=controlling&gv=1.16.2"
+updateJSONURL="https://updates.blamejared.com/get?n=controlling&gv=1.16.3"
 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.
 '''