From 91aecab39d680939cf221cccfd35b4544971e6d4 Mon Sep 17 00:00:00 2001 From: Enrico Date: Fri, 31 Mar 2023 23:47:12 +0200 Subject: [PATCH 1/5] Updated to 1.19.4 --- gradle.properties | 12 ++++++------ src/main/java/net/entityoutliner/ui/ColorWidget.java | 7 ------- .../java/net/entityoutliner/ui/EntityListWidget.java | 3 +-- .../java/net/entityoutliner/ui/EntitySelector.java | 1 - 4 files changed, 7 insertions(+), 16 deletions(-) diff --git a/gradle.properties b/gradle.properties index 7bb54f7..62dfb1f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,13 +3,13 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/use - minecraft_version=1.19.3 - yarn_mappings=1.19.3+build.5 - loader_version=0.14.13 + minecraft_version=1.19.4 + yarn_mappings=1.19.4-rc3+build.2 + loader_version=0.14.18 # Mod Properties - mod_version = 1.2.6 + mod_version = 1.2.7 maven_group = net.entityoutliner archives_base_name = entity-outliner @@ -17,5 +17,5 @@ org.gradle.jvmargs=-Xmx1G # Dependencies # currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api - fabric_version=0.73.0+1.19.3 - modmenu_version=5.0.2 + fabric_version=0.76.0+1.19.4 + modmenu_version=6.1.0-rc.4 diff --git a/src/main/java/net/entityoutliner/ui/ColorWidget.java b/src/main/java/net/entityoutliner/ui/ColorWidget.java index 6652977..96c78e0 100644 --- a/src/main/java/net/entityoutliner/ui/ColorWidget.java +++ b/src/main/java/net/entityoutliner/ui/ColorWidget.java @@ -2,12 +2,9 @@ import java.util.Map; -import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.systems.RenderSystem; - import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.screen.narration.NarrationMessageBuilder; import net.minecraft.client.gui.widget.PressableWidget; import net.minecraft.client.util.math.MatrixStack; @@ -44,15 +41,11 @@ public void onPress() { } public void renderButton(MatrixStack matrices, int mouseX, int mouseY, float delta) { - MinecraftClient minecraftClient = MinecraftClient.getInstance(); RenderSystem.setShaderTexture(0, TEXTURE); RenderSystem.enableDepthTest(); RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, this.alpha); RenderSystem.enableBlend(); - RenderSystem.defaultBlendFunc(); - RenderSystem.blendFunc(GlStateManager.SrcFactor.SRC_ALPHA, GlStateManager.DstFactor.ONE_MINUS_SRC_ALPHA); drawTexture(matrices, this.getX(), this.getY(), this.isFocused() ? 20.0F : 0.0F, this.color.ordinal() * 20, 20, 20, 40, 180); - this.renderBackground(matrices, minecraftClient, mouseX, mouseY); } public enum Color { diff --git a/src/main/java/net/entityoutliner/ui/EntityListWidget.java b/src/main/java/net/entityoutliner/ui/EntityListWidget.java index 9a8d31e..a8745fc 100644 --- a/src/main/java/net/entityoutliner/ui/EntityListWidget.java +++ b/src/main/java/net/entityoutliner/ui/EntityListWidget.java @@ -10,7 +10,6 @@ import net.fabricmc.api.Environment; import net.minecraft.client.MinecraftClient; import net.minecraft.client.font.TextRenderer; -import net.minecraft.client.gui.DrawableHelper; import net.minecraft.client.gui.Element; import net.minecraft.client.gui.Selectable; import net.minecraft.client.gui.widget.CheckboxWidget; @@ -152,7 +151,7 @@ public static EntityListWidget.HeaderEntry create(SpawnGroup category, TextRende } public void render(MatrixStack matrices, int i, int j, int k, int l, int m, int n, int o, boolean bl, float f) { - DrawableHelper.drawCenteredText(matrices, this.font, this.title, this.width / 2, j + (this.height / 2) - (this.font.fontHeight / 2), 16777215); + drawCenteredTextWithShadow(matrices, this.font, this.title, this.width / 2, j + (this.height / 2) - (this.font.fontHeight / 2), 16777215); } public List children() { diff --git a/src/main/java/net/entityoutliner/ui/EntitySelector.java b/src/main/java/net/entityoutliner/ui/EntitySelector.java index f6eb31a..b1c7ffe 100644 --- a/src/main/java/net/entityoutliner/ui/EntitySelector.java +++ b/src/main/java/net/entityoutliner/ui/EntitySelector.java @@ -247,7 +247,6 @@ public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) { // Render our search bar this.setFocused(this.searchField); - this.searchField.setTextFieldFocused(true); this.searchField.render(matrices, mouseX, mouseY, delta); // Render buttons From c32c8a6551909acb1a268543f461ffdf623d7102 Mon Sep 17 00:00:00 2001 From: Enrico Date: Sun, 16 Apr 2023 09:51:54 +0200 Subject: [PATCH 2/5] updated dependencies --- build.gradle | 52 ++++++++++++++---------------- gradle.properties | 8 ++--- src/main/resources/fabric.mod.json | 10 +++--- 3 files changed, 33 insertions(+), 37 deletions(-) diff --git a/build.gradle b/build.gradle index e1c4bd1..14834b7 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,8 @@ plugins { - id 'fabric-loom' version '0.11-SNAPSHOT' + id 'fabric-loom' version '1.1.9' id 'maven-publish' } -sourceCompatibility = JavaVersion.VERSION_17 -targetCompatibility = JavaVersion.VERSION_17 - -archivesBaseName = project.archives_base_name version = project.mod_version group = project.maven_group @@ -30,35 +26,41 @@ dependencies { compileOnly 'com.google.code.findbugs:jsr305:+' } +base { + archivesName = project.archives_base_name +} + processResources { inputs.property "version", project.version filesMatching("fabric.mod.json") { expand "version": project.version } - - // from(sourceSets.main.resources.srcDirs) { - // exclude "fabric.mod.json" - // } } -// ensure that the encoding is set to UTF-8, no matter what the system default is -// this fixes some edge cases with special characters not displaying correctly -// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html -tasks.withType(JavaCompile) { - options.encoding = "UTF-8" +tasks.withType(JavaCompile).configureEach { + // Minecraft 1.18 (1.18-pre2) upwards uses Java 17. + it.options.release = 17 + // ensure that the encoding is set to UTF-8, no matter what the system default is + // this fixes some edge cases with special characters not displaying correctly + // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html + it.options.encoding = "UTF-8" } -// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task -// if it is present. -// If you remove this task, sources will not be generated. -task sourcesJar(type: Jar, dependsOn: classes) { - classifier = "sources" - from sourceSets.main.allSource +java { + // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task + // if it is present. + // If you remove this line, sources will not be generated. + withSourcesJar() + + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } jar { - from "LICENSE" + from("LICENSE") { + rename { "${it}_${base.archivesName.get()}"} + } } // configure the maven publication @@ -74,10 +76,4 @@ publishing { } } } - - // select the repositories you want to publish to - repositories { - // uncomment to publish to the local maven - // mavenLocal() - } -} +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 62dfb1f..1818d53 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,8 +4,8 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/use minecraft_version=1.19.4 - yarn_mappings=1.19.4-rc3+build.2 - loader_version=0.14.18 + yarn_mappings=1.19.4+build.2 + loader_version=0.14.19 # Mod Properties @@ -17,5 +17,5 @@ org.gradle.jvmargs=-Xmx1G # Dependencies # currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api - fabric_version=0.76.0+1.19.4 - modmenu_version=6.1.0-rc.4 + fabric_version=0.78.0+1.19.4 + modmenu_version=6.1.0 diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 04d78f5..eb7149b 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -33,11 +33,11 @@ ], "depends": { - "fabricloader": ">=0.7.4", - "fabric": "*", - "fabric-lifecycle-events-v1": "*", - "fabric-key-binding-api-v1": "*", - "minecraft": ">=1.19" + "fabricloader": ">=0.14.17", + "fabric-api": "*", + "minecraft": "~1.19.4", + "java": ">=17", + "modmenu": "6.1.x" }, "suggests": { "flamingo": "*" From 830ee0f9c504acabb07d788a28b83e1a731a49df Mon Sep 17 00:00:00 2001 From: Enrico Date: Thu, 4 May 2023 07:26:02 +0200 Subject: [PATCH 3/5] revert some changes --- build.gradle | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 14834b7..f995b1f 100644 --- a/build.gradle +++ b/build.gradle @@ -58,9 +58,7 @@ java { } jar { - from("LICENSE") { - rename { "${it}_${base.archivesName.get()}"} - } + from "LICENSE" } // configure the maven publication From ca0ce0eb751461133f46794f9682917ae963a6dc Mon Sep 17 00:00:00 2001 From: Enrico Date: Thu, 4 May 2023 07:27:09 +0200 Subject: [PATCH 4/5] bump modmenu version to 6.2 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 1818d53..c11707e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,4 +18,4 @@ org.gradle.jvmargs=-Xmx1G # Dependencies # currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api fabric_version=0.78.0+1.19.4 - modmenu_version=6.1.0 + modmenu_version=6.2.0 From d47572db926a9c53191f34977e31d1f1adcdf877 Mon Sep 17 00:00:00 2001 From: Enrico Date: Thu, 4 May 2023 07:52:41 +0200 Subject: [PATCH 5/5] remove modmenu as required dependency --- src/main/resources/fabric.mod.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index eb7149b..968f083 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -36,8 +36,7 @@ "fabricloader": ">=0.14.17", "fabric-api": "*", "minecraft": "~1.19.4", - "java": ">=17", - "modmenu": "6.1.x" + "java": ">=17" }, "suggests": { "flamingo": "*"