Преглед на файлове

Fixed languages, version push! close #32

Jared преди 6 години
родител
ревизия
2fa6f3dcec

+ 3 - 4
build.gradle

@@ -14,15 +14,14 @@ buildscript {
 apply plugin: 'net.minecraftforge.gradle'
 apply plugin: 'eclipse'
 
-version = '5.0.1' +
-        ''
+version = '5.0.3'
 group = 'com.blamejared.controlling'
 archivesBaseName = 'Controlling'
 
 sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
 
 minecraft {
-    mappings channel: 'snapshot', version: '20190608-1.14.2'
+    mappings channel: 'snapshot', version: '20190621-1.14.2'
     accessTransformer = file('build/resources/main/META-INF/accesstransformer.cfg')
 
     runs {
@@ -50,7 +49,7 @@ minecraft {
 }
 
 dependencies {
-    minecraft 'net.minecraftforge:forge:1.14.2-26.0.6'
+    minecraft 'net.minecraftforge:forge:1.14.3-27.0.13'
 }
 
 jar {

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

@@ -47,11 +47,11 @@ public class GuiNewControls extends ControlsScreen {
         this.addButton(new Button(this.width / 2 - 155, 18, 150, 20, I18n.format("options.mouse_settings"), (p_213126_1_) -> {
             this.minecraft.displayGuiScreen(new MouseSettingsScreen(this));
         }));
-        this.addButton(AbstractOption.field_216719_z.func_216586_a(this.minecraft.gameSettings, this.width / 2 - 155 + 160, 18, 150));
+        this.addButton(AbstractOption.AUTO_JUMP.createWidget(this.minecraft.gameSettings, this.width / 2 - 155 + 160, 18, 150));
         
-        this.field_146494_r = new GuiNewKeyBindingList(this, this.minecraft);
-        this.children.add(this.field_146494_r);
-        this.setFocused(this.field_146494_r);
+        this.keyBindingList = new GuiNewKeyBindingList(this, this.minecraft);
+        this.children.add(this.keyBindingList);
+        this.setFocused(this.keyBindingList);
         this.addButton(new Button(this.width / 2 - 155 + 160, this.height - 29, 150, 20, I18n.format("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, I18n.format("controls.resetAll"), (p_213126_1_) -> {
@@ -128,12 +128,14 @@ public class GuiNewControls extends ControlsScreen {
     }
     
     public void filterKeys() {
+        
         lastSearch = search.getText();
-        field_146494_r.children().clear();
+        keyBindingList.children().clear();
         if(lastSearch.isEmpty() && displayMode == DisplayMode.ALL && sortOrder == SortOrder.NONE) {
-            field_146494_r.children().addAll(((GuiNewKeyBindingList) field_146494_r).getAllEntries());
+            keyBindingList.children().addAll(((GuiNewKeyBindingList) keyBindingList).getAllEntries());
             return;
         }
+        this.keyBindingList.setScrollAmount(0);
         Predicate<GuiNewKeyBindingList.KeyEntry> filters = displayMode.getPredicate();
         
         
@@ -149,15 +151,15 @@ public class GuiNewControls extends ControlsScreen {
                 break;
         }
         
-        for(GuiNewKeyBindingList.Entry entry : ((GuiNewKeyBindingList) field_146494_r).getAllEntries()) {
+        for(GuiNewKeyBindingList.Entry entry : ((GuiNewKeyBindingList) keyBindingList).getAllEntries()) {
             if(entry instanceof GuiNewKeyBindingList.KeyEntry) {
                 GuiNewKeyBindingList.KeyEntry keyEntry = (GuiNewKeyBindingList.KeyEntry) entry;
                 if(filters.test(keyEntry)) {
-                    field_146494_r.children().add(entry);
+                    keyBindingList.children().add(entry);
                 }
             }
         }
-        sortOrder.sort(field_146494_r.children());
+        sortOrder.sort(keyBindingList.children());
         
         
     }
@@ -167,7 +169,7 @@ public class GuiNewControls extends ControlsScreen {
      */
     public void render(int mouseX, int mouseY, float partialTicks) {
         this.renderBackground();
-        this.field_146494_r.render(mouseX, mouseY, partialTicks);
+        this.keyBindingList.render(mouseX, mouseY, partialTicks);
         this.drawCenteredString(this.font, this.title.getFormattedText(), this.width / 2, 8, 16777215);
         boolean flag = false;
         
@@ -194,12 +196,12 @@ public class GuiNewControls extends ControlsScreen {
             this.buttonId = null;
             KeyBinding.resetKeyBindingArrayAndHash();
             valid = true;
-            search.setFocused(false);
-        } else if(mb == 0 && this.field_146494_r.mouseClicked(mx, my, mb)) {
+            search.setFocused2(false);
+        } else if(mb == 0 && this.keyBindingList.mouseClicked(mx, my, mb)) {
             this.setDragging(true);
-            this.setFocused(this.field_146494_r);
+            this.setFocused(this.keyBindingList);
             valid = true;
-            search.setFocused(false);
+            search.setFocused2(false);
         } else {
             valid = search.mouseClicked(mx, my, mb);
             if(!valid && search.isFocused() && mb == 1) {
@@ -229,7 +231,7 @@ public class GuiNewControls extends ControlsScreen {
     }
     
     public boolean mouseReleased(double mx, double my, int mb) {
-        if(mb == 0 && this.field_146494_r.mouseReleased(mx, my, mb)) {
+        if(mb == 0 && this.keyBindingList.mouseReleased(mx, my, mb)) {
             this.setDragging(false);
             return true;
         } else if(search.isFocused()) {
@@ -246,7 +248,7 @@ public class GuiNewControls extends ControlsScreen {
         }
         if(search.isFocused()) {
             if(p_keyPressed_1_ == 256) {
-                search.setFocused(false);
+                search.setFocused2(false);
                 return true;
             }
         }

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

@@ -92,7 +92,7 @@ public class GuiNewKeyBindingList extends KeyBindingList {
         }
         
         public void render(int p_render_1_, int p_render_2_, int p_render_3_, int p_render_4_, int p_render_5_, int p_render_6_, int p_render_7_, boolean p_render_8_, float p_render_9_) {
-            GuiNewKeyBindingList.this.minecraft.fontRenderer.drawString(this.labelText, (float) (GuiNewKeyBindingList.this.minecraft.field_71462_r.width / 2 - this.labelWidth / 2), (float) (p_render_2_ + p_render_5_ - 9 - 1), 16777215);
+            GuiNewKeyBindingList.this.minecraft.fontRenderer.drawString(this.labelText, (float) (GuiNewKeyBindingList.this.minecraft.currentScreen.width / 2 - this.labelWidth / 2), (float) (p_render_2_ + p_render_5_ - 9 - 1), 16777215);
         }
     }
     

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

@@ -19,7 +19,7 @@ public class ClientEventHandler {
         try {
             if(event.getGui() instanceof ControlsScreen && !(event.getGui() instanceof GuiNewControls)) {
                 ControlsScreen gui = (ControlsScreen) event.getGui();
-                event.setGui(new GuiNewControls(gui.field_146496_h, Minecraft.getInstance().gameSettings));
+                event.setGui(new GuiNewControls(gui.parentScreen, Minecraft.getInstance().gameSettings));
             }
         } catch(Exception e) {
             e.printStackTrace();

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

@@ -1,11 +1,11 @@
 modLoader="javafml" #mandatory
-loaderVersion="[25,)" #mandatory
+loaderVersion="[27,)" #mandatory
 issueTrackerURL="https://github.com/jaredlll08/Controlling/issues" #optional
 displayURL="https://minecraft.curseforge.com/projects/controlling" #optional
 authors="Jaredlll08" #optional
 [[mods]] #mandatory
 modId="controlling" #mandatory
-version="5.0.1" #mandatory
+version="5.0.3" #mandatory
 displayName="Controlling" #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.
@@ -17,7 +17,7 @@ Adds the ability to search for keybinds using their name in the KeyBinding menu,
     # Does this dependency have to exist - if not, ordering below must be specified
     mandatory=true #mandatory
     # The version range of the dependency
-    versionRange="[25,)" #mandatory
+    versionRange="[27,)" #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

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


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


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

@@ -0,0 +1,11 @@
+{
+  "options.search": "Chercher",
+  "options.showAll": "Tout",
+  "options.showConflicts": "Conflits",
+  "options.showNone": "Non-liées",
+  "options.availableKeys": "Touches disp.",
+  "options.sort": "Tri",
+  "options.category": "Catégorie",
+  "options.key": "Touche",
+  "options.toggleFree": "Touches disp."
+}

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


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


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