From 68924a2c1fa310556797ab68807b83e6f534b8fa Mon Sep 17 00:00:00 2001 From: Juuxel <6596629+Juuxel@users.noreply.github.com> Date: Wed, 23 Dec 2020 13:40:04 +0200 Subject: Fix labeled slider rendering Changed the MatrixStack translation to direct GL translation via RenderSystem. I've already fixed this bug in the 4.0 branch by using MatrixStacks for texture rendering, but that won't work here. --- src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java index e7f7e3a..0c1a510 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WLabeledSlider.java @@ -167,7 +167,7 @@ public class WLabeledSlider extends WAbstractSlider { int rotMouseY = axis == Axis.HORIZONTAL ? mouseY : mouseX; RenderSystem.pushMatrix(); - matrices.translate(x, y, 0); + RenderSystem.translatef(x, y, 0); if (axis == Axis.VERTICAL) { RenderSystem.translatef(0, height, 0); RenderSystem.rotatef(270, 0, 0, 1); -- cgit From d3c3945430fa30bfc765b70b4f1cb67bc2f600b1 Mon Sep 17 00:00:00 2001 From: Juuxel <6596629+Juuxel@users.noreply.github.com> Date: Sun, 31 Jan 2021 15:07:40 +0200 Subject: Fix renderBackground behaviour being hardcoded to super --- .../java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java | 2 +- .../io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java index 8fc53e1..28887cd 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java @@ -94,7 +94,7 @@ public class CottonClientScreen extends Screen implements TextHoverRendererScree } private void paint(MatrixStack matrices, int mouseX, int mouseY) { - super.renderBackground(matrices); + renderBackground(matrices); if (description!=null) { WPanel root = description.getRootPanel(); diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java index 370bb68..bfda748 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java @@ -251,7 +251,7 @@ public class CottonInventoryScreen extends Handl protected void drawBackground(MatrixStack matrices, float partialTicks, int mouseX, int mouseY) {} //This is just an AbstractContainerScreen thing; most Screens don't work this way. private void paint(MatrixStack matrices, int mouseX, int mouseY) { - super.renderBackground(matrices); + renderBackground(matrices); if (description!=null) { WPanel root = description.getRootPanel(); -- cgit From 19abe0640f1706c52c8b1890ae9d34fe5d96d30d Mon Sep 17 00:00:00 2001 From: Juuxel <6596629+Juuxel@users.noreply.github.com> Date: Sun, 31 Jan 2021 15:16:10 +0200 Subject: Switch overrides from Screen.init(MinecraftClient, int, int) to init() --- .../io/github/cottonmc/cotton/gui/client/CottonClientScreen.java | 7 +++---- .../github/cottonmc/cotton/gui/client/CottonInventoryScreen.java | 9 ++++----- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java index 28887cd..055262e 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonClientScreen.java @@ -1,6 +1,5 @@ package io.github.cottonmc.cotton.gui.client; -import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.text.LiteralText; @@ -48,14 +47,14 @@ public class CottonClientScreen extends Screen implements TextHoverRendererScree } @Override - public void init(MinecraftClient client, int screenWidth, int screenHeight) { - super.init(client, screenWidth, screenHeight); + public void init() { + super.init(); client.keyboard.setRepeatEvents(true); WPanel root = description.getRootPanel(); if (root != null) root.addPainters(); description.addPainters(); - reposition(screenWidth, screenHeight); + reposition(width, height); } @Override diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java index bfda748..5b36a66 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java @@ -1,6 +1,5 @@ package io.github.cottonmc.cotton.gui.client; -import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.screen.ingame.HandledScreen; import net.minecraft.client.render.DiffuseLighting; import net.minecraft.client.util.math.MatrixStack; @@ -61,15 +60,15 @@ public class CottonInventoryScreen extends Handl */ @Override - public void init(MinecraftClient client, int screenWidth, int screenHeight) { - super.init(client, screenWidth, screenHeight); + public void init() { + super.init(); client.keyboard.setRepeatEvents(true); WPanel root = description.getRootPanel(); if (root != null) root.addPainters(); description.addPainters(); - reposition(screenWidth, screenHeight); + reposition(width, height); } @Override @@ -153,7 +152,7 @@ public class CottonInventoryScreen extends Handl } else { //if (super.keyPressed(ch, keyCode, modifiers)) return true; if (description.getFocus()==null) { - if (MinecraftClient.getInstance().options.keyInventory.matchesKey(ch, keyCode)) { + if (client.options.keyInventory.matchesKey(ch, keyCode)) { this.client.player.closeHandledScreen(); return true; } -- cgit From f08f6b804c1fbf4704719b865c112ae6a77dc8c5 Mon Sep 17 00:00:00 2001 From: Juuxel <6596629+Juuxel@users.noreply.github.com> Date: Sun, 31 Jan 2021 15:16:29 +0200 Subject: Automatically generate run configs for the test subproject --- GuiTest/build.gradle | 5 +++-- build.gradle | 3 --- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/GuiTest/build.gradle b/GuiTest/build.gradle index 1cc83d9..c1423b2 100644 --- a/GuiTest/build.gradle +++ b/GuiTest/build.gradle @@ -13,7 +13,8 @@ archivesBaseName = "LibGuiTest" version = rootProject.version group = rootProject.group -minecraft { +loom { + autoGenIDERuns = true } //configurations.modApi { @@ -66,4 +67,4 @@ task sourcesJar(type: Jar, dependsOn: classes) { jar { from "LICENSE" -} \ No newline at end of file +} diff --git a/build.gradle b/build.gradle index acb42bf..1691af2 100644 --- a/build.gradle +++ b/build.gradle @@ -18,9 +18,6 @@ archivesBaseName = project.archives_base_name version = "$project.mod_version+$project.minecraft_version" group = project.maven_group -minecraft { -} - repositories { maven { url "http://server.bbkr.space:8081/artifactory/libs-release" } } -- cgit From 4ccedb4921f913338fb28dcd66ca95595cee2da4 Mon Sep 17 00:00:00 2001 From: Juuxel <6596629+Juuxel@users.noreply.github.com> Date: Sun, 31 Jan 2021 15:33:20 +0200 Subject: Bump version --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 98d9cff..7565f16 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G loader_version=0.10.8 # Mod Properties - mod_version = 3.3.2 + mod_version = 3.3.3 maven_group = io.github.cottonmc archives_base_name = LibGui -- cgit From b8ddfe1663ab9f6534e76dfe4fd13194bd31f0b9 Mon Sep 17 00:00:00 2001 From: Juuxel <6596629+Juuxel@users.noreply.github.com> Date: Sun, 31 Jan 2021 15:40:09 +0200 Subject: Update Gradle and dependencies --- build.gradle | 10 ++++++++-- gradle.properties | 10 +++++----- gradle/wrapper/gradle-wrapper.properties | 2 +- .../cottonmc/cotton/gui/client/modmenu/ModMenuSupport.java | 7 ------- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/build.gradle b/build.gradle index 1691af2..d7c3955 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ plugins { id 'fabric-loom' version '0.5-SNAPSHOT' id 'maven-publish' - id "com.jfrog.artifactory" version "4.9.0" + id "com.jfrog.artifactory" version "4.20.0" id 'checkstyle' } @@ -20,6 +20,12 @@ group = project.maven_group repositories { maven { url "http://server.bbkr.space:8081/artifactory/libs-release" } + maven { + url = "http://maven.terraformersmc.com/releases" + content { + includeGroup "com.terraformersmc" + } + } } dependencies { @@ -30,7 +36,7 @@ dependencies { modImplementation "io.github.cottonmc:Jankson-Fabric:${project.jankson_version}" include "io.github.cottonmc:Jankson-Fabric:${project.jankson_version}" - modRuntime(modCompileOnly("io.github.prospector:modmenu:$project.modmenu_version") { + modRuntime(modCompileOnly("com.terraformersmc:modmenu:$project.modmenu_version") { exclude group: 'net.fabricmc.fabric-api' }) } diff --git a/gradle.properties b/gradle.properties index 7565f16..3761a8e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,9 +3,9 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/use - minecraft_version=1.16.4 - yarn_mappings=1.16.4+build.7 - loader_version=0.10.8 + minecraft_version=1.16.5 + yarn_mappings=1.16.5+build.3 + loader_version=0.11.1 # Mod Properties mod_version = 3.3.3 @@ -13,6 +13,6 @@ org.gradle.jvmargs=-Xmx1G archives_base_name = LibGui # Dependencies - fabric_version=0.28.3+1.16 + fabric_version=0.30.0+1.16 jankson_version=3.0.1+j1.2.0 - modmenu_version=1.14.6+build.31 + modmenu_version=1.14.15 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 290541c..28ff446 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ModMenuSupport.java b/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ModMenuSupport.java index e7c7ece..ccdff93 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ModMenuSupport.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/client/modmenu/ModMenuSupport.java @@ -3,17 +3,10 @@ package io.github.cottonmc.cotton.gui.client.modmenu; import net.minecraft.text.TranslatableText; import io.github.cottonmc.cotton.gui.client.CottonClientScreen; -import io.github.cottonmc.cotton.gui.client.LibGuiClient; import io.github.prospector.modmenu.api.ConfigScreenFactory; import io.github.prospector.modmenu.api.ModMenuApi; public class ModMenuSupport implements ModMenuApi { - - @Override - public String getModId() { - return LibGuiClient.MODID; - } - @Override public ConfigScreenFactory getModConfigScreenFactory() { return screen -> new CottonClientScreen(new TranslatableText("options.libgui.libgui_settings"), new ConfigGui(screen)) { -- cgit