From 68e7508b71a9ee57f6de57d11b375d1bb690b244 Mon Sep 17 00:00:00 2001 From: orifu Date: Sun, 2 Jun 2024 03:09:39 +0100 Subject: [PATCH 1/8] initial 1.21 port --- .gitignore | 136 ++++-------------- build.gradle | 2 +- gradle.properties | 10 +- .../ramel/client/RamelConfigScreen.java | 15 +- .../io/ix0rai/ramel/client/RamelModMenu.java | 2 + 5 files changed, 44 insertions(+), 121 deletions(-) diff --git a/.gitignore b/.gitignore index 3c37caf..d90f121 100644 --- a/.gitignore +++ b/.gitignore @@ -1,118 +1,34 @@ -# User-specific stuff -.idea/ - -*.iml -*.ipr -*.iws - -# IntelliJ +# Gradle +.gradle/ +build/ out/ -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Compiled class file -*.class - -# Log file -*.log - -# BlueJ files -*.ctxt - -# Package Files # -*.jar -*.war -*.nar -*.ear -*.zip -*.tar.gz -*.rar - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - -*~ - -# temporary files which can be created if a process still has a handle open of a deleted file -.fuse_hidden* - -# KDE directory preferences -.directory - -# Linux trash folder which might appear on any partition or disk -.Trash-* - -# .nfs files are created when an open file is removed but is still being accessed -.nfs* +classes/ -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# Windows thumbnail cache files -Thumbs.db -Thumbs.db:encryptable -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk +# Quilt Loom +remappedSrc/ +run/ -.gradle -build/ +# Eclipse +*.launch -# Ignore Gradle GUI config -gradle-app.setting +# IntelliJ Idea +.idea/ +*.iml +*.ipr +*.iws -# Cache of project -.gradletasknamecache +# Fleet +.fleet/ -**/build/ +# Visual Studio Code +.settings/ +.vscode/ +bin/ +.classpath +.project -# Common working directory -run/ +# Eclipse JDT LS +workspace/ -# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) -!gradle-wrapper.jar +# macOS +*.DS_Store \ No newline at end of file diff --git a/build.gradle b/build.gradle index 99d6c5f..4f74817 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,7 @@ dependencies { minecraft("com.mojang:minecraft:${project.minecraft_version}") mappings("org.quiltmc:quilt-mappings:${project.minecraft_version}+build.${project.quilt_mappings}:intermediary-v2") modImplementation("net.fabricmc:fabric-loader:${project.loader_version}") - modImplementation("com.terraformersmc:modmenu:${project.modmenu_version}") + // modImplementation("com.terraformersmc:modmenu:${project.modmenu_version}") implementation("folk.sisby:kaleido-config:0.3.1+1.3.1") include("folk.sisby:kaleido-config:0.3.1+1.3.1") diff --git a/gradle.properties b/gradle.properties index ffb0eae..cc46a6a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,12 +1,12 @@ # Done to increase the memory available to gradle. org.gradle.jvmargs=-Xmx1G -minecraft_version=1.20.6 -quilt_mappings=6 -loader_version=0.15.6 -fabric_version=0.97.8+1.20.6 +minecraft_version=1.21-pre1 +quilt_mappings=1 +loader_version=0.15.11 +fabric_version=0.99.4+1.21 modmenu_version=10.0.0-beta.1 -mod_version = 1.0.3+mc1.20.6 +mod_version = 1.0.4+mc1.21 maven_group = io.ix0rai archives_base_name = ramel diff --git a/src/main/java/io/ix0rai/ramel/client/RamelConfigScreen.java b/src/main/java/io/ix0rai/ramel/client/RamelConfigScreen.java index 769f90e..704016f 100644 --- a/src/main/java/io/ix0rai/ramel/client/RamelConfigScreen.java +++ b/src/main/java/io/ix0rai/ramel/client/RamelConfigScreen.java @@ -8,7 +8,7 @@ import net.fabricmc.api.Environment; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.screen.Screen; -import net.minecraft.client.gui.screen.option.SimpleOptionsScreen; +import net.minecraft.client.gui.screen.option.GameOptionsScreen; import net.minecraft.client.option.GameOptions; import net.minecraft.client.option.Option; import net.minecraft.text.Text; @@ -17,12 +17,17 @@ import java.util.stream.StreamSupport; @Environment(EnvType.CLIENT) -public class RamelConfigScreen extends SimpleOptionsScreen { +public class RamelConfigScreen extends GameOptionsScreen { @SuppressWarnings("unchecked") public RamelConfigScreen(@Nullable Screen parent) { - super(parent, MinecraftClient.getInstance().options, Text.translatable("ramel.config.title"), - StreamSupport.stream(Config.INSTANCE.values().spliterator(), false).map(value -> createOptional((TrackedValue) value)).toArray(Option[]::new) - ); + super(parent, MinecraftClient.getInstance().options, Text.translatable("ramel.config.title")); + } + + @Override + protected void method_60325() { // addOptions + // this.list + this.field_51824.addEntries(StreamSupport.stream(Config.INSTANCE.values().spliterator(), false) + .map(value -> createOptional((TrackedValue) value)).toArray(Option[]::new)); } @SuppressWarnings("all") diff --git a/src/main/java/io/ix0rai/ramel/client/RamelModMenu.java b/src/main/java/io/ix0rai/ramel/client/RamelModMenu.java index 8318bbd..6215e4c 100644 --- a/src/main/java/io/ix0rai/ramel/client/RamelModMenu.java +++ b/src/main/java/io/ix0rai/ramel/client/RamelModMenu.java @@ -1,3 +1,4 @@ +/* package io.ix0rai.ramel.client; import com.terraformersmc.modmenu.api.ConfigScreenFactory; @@ -12,3 +13,4 @@ public ConfigScreenFactory getModConfigScreenFactory() { return RamelConfigScreen::new; } } +*/ From 4c323cc437b3a0aca06c52a92645519020817783 Mon Sep 17 00:00:00 2001 From: orifu Date: Sun, 2 Jun 2024 03:29:08 +0100 Subject: [PATCH 2/8] add /ramel client command to access config --- build.gradle | 3 +-- .../java/io/ix0rai/ramel/RamelClient.java | 20 +++++++++++++++++++ .../ramel/client/RamelConfigScreen.java | 5 +++-- src/main/resources/fabric.mod.json | 4 ++++ 4 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 src/main/java/io/ix0rai/ramel/RamelClient.java diff --git a/build.gradle b/build.gradle index 4f74817..9079bc1 100644 --- a/build.gradle +++ b/build.gradle @@ -22,12 +22,11 @@ dependencies { minecraft("com.mojang:minecraft:${project.minecraft_version}") mappings("org.quiltmc:quilt-mappings:${project.minecraft_version}+build.${project.quilt_mappings}:intermediary-v2") modImplementation("net.fabricmc:fabric-loader:${project.loader_version}") + modImplementation("net.fabricmc.fabric-api:fabric-api:${project.fabric_version}") // modImplementation("com.terraformersmc:modmenu:${project.modmenu_version}") implementation("folk.sisby:kaleido-config:0.3.1+1.3.1") include("folk.sisby:kaleido-config:0.3.1+1.3.1") - - modRuntimeOnly("net.fabricmc.fabric-api:fabric-api:${project.fabric_version}") } processResources { diff --git a/src/main/java/io/ix0rai/ramel/RamelClient.java b/src/main/java/io/ix0rai/ramel/RamelClient.java new file mode 100644 index 0000000..1049bc7 --- /dev/null +++ b/src/main/java/io/ix0rai/ramel/RamelClient.java @@ -0,0 +1,20 @@ +package io.ix0rai.ramel; + +import io.ix0rai.ramel.client.RamelConfigScreen; +import net.fabricmc.api.ClientModInitializer; +import net.fabricmc.fabric.api.client.command.v2.ClientCommandManager; +import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback; +import net.minecraft.client.MinecraftClient; + +public class RamelClient implements ClientModInitializer { + @Override + public void onInitializeClient() { + ClientCommandRegistrationCallback.EVENT.register((dispatcher, buildCtx) -> dispatcher.register( + ClientCommandManager.literal("ramel").executes(ctx -> { + MinecraftClient client = ctx.getSource().getClient(); + client.send(() -> client.setScreen(new RamelConfigScreen(null))); + return 1; + }) + )); + } +} diff --git a/src/main/java/io/ix0rai/ramel/client/RamelConfigScreen.java b/src/main/java/io/ix0rai/ramel/client/RamelConfigScreen.java index 704016f..2eedcb6 100644 --- a/src/main/java/io/ix0rai/ramel/client/RamelConfigScreen.java +++ b/src/main/java/io/ix0rai/ramel/client/RamelConfigScreen.java @@ -18,15 +18,16 @@ @Environment(EnvType.CLIENT) public class RamelConfigScreen extends GameOptionsScreen { - @SuppressWarnings("unchecked") public RamelConfigScreen(@Nullable Screen parent) { super(parent, MinecraftClient.getInstance().options, Text.translatable("ramel.config.title")); } @Override + @SuppressWarnings("unchecked") protected void method_60325() { // addOptions // this.list - this.field_51824.addEntries(StreamSupport.stream(Config.INSTANCE.values().spliterator(), false) + assert this.field_51824 != null; + this.field_51824.addEntries(StreamSupport.stream(Config.INSTANCE.values().spliterator(), false) .map(value -> createOptional((TrackedValue) value)).toArray(Option[]::new)); } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 2f9fa40..5714b18 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -18,6 +18,9 @@ "icon": "assets/ramel/icon.png", "environment": "*", "entrypoints": { + "client": [ + "io.ix0rai.ramel.RamelClient" + ], "modmenu": [ "io.ix0rai.ramel.client.RamelModMenu" ] @@ -29,6 +32,7 @@ "depends": { "fabricloader": ">=0.15.6", + "fabric-api": "*", "minecraft": ">=1.20.6" }, From 8fe5533c931f0e8b2f23c924ee4576779b105642 Mon Sep 17 00:00:00 2001 From: orifu Date: Sun, 2 Jun 2024 03:39:28 +0100 Subject: [PATCH 3/8] oops --- src/main/resources/fabric.mod.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 5714b18..3023c0a 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -33,7 +33,7 @@ "depends": { "fabricloader": ">=0.15.6", "fabric-api": "*", - "minecraft": ">=1.20.6" + "minecraft": ">=1.21-" }, "custom": { From ffd954ef59253b20ff5ca5faf2b4578230e5ecc8 Mon Sep 17 00:00:00 2001 From: orifu Date: Sun, 2 Jun 2024 14:46:47 +0100 Subject: [PATCH 4/8] idk if i should add the jar lol. sorry actions --- build.gradle | 7 +++++-- gradle.properties | 2 +- .../java/io/ix0rai/ramel/RamelClient.java | 20 ------------------- .../io/ix0rai/ramel/client/RamelModMenu.java | 2 -- src/main/resources/fabric.mod.json | 4 ---- 5 files changed, 6 insertions(+), 29 deletions(-) delete mode 100644 src/main/java/io/ix0rai/ramel/RamelClient.java diff --git a/build.gradle b/build.gradle index 9079bc1..619bbf8 100644 --- a/build.gradle +++ b/build.gradle @@ -11,6 +11,8 @@ repositories { maven { url = "https://maven.quiltmc.org/repository/release/" } maven { url = "https://maven.terraformersmc.com/releases/" } maven { url = "https://repo.sleeping.town/" } + + flatDir { dirs 'lib' } } configurations { @@ -22,11 +24,12 @@ dependencies { minecraft("com.mojang:minecraft:${project.minecraft_version}") mappings("org.quiltmc:quilt-mappings:${project.minecraft_version}+build.${project.quilt_mappings}:intermediary-v2") modImplementation("net.fabricmc:fabric-loader:${project.loader_version}") - modImplementation("net.fabricmc.fabric-api:fabric-api:${project.fabric_version}") - // modImplementation("com.terraformersmc:modmenu:${project.modmenu_version}") + modImplementation("com.terraformersmc:modmenu:${project.modmenu_version}") implementation("folk.sisby:kaleido-config:0.3.1+1.3.1") include("folk.sisby:kaleido-config:0.3.1+1.3.1") + + modRuntimeOnly("net.fabricmc.fabric-api:fabric-api:${project.fabric_version}") } processResources { diff --git a/gradle.properties b/gradle.properties index cc46a6a..ca75150 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ minecraft_version=1.21-pre1 quilt_mappings=1 loader_version=0.15.11 fabric_version=0.99.4+1.21 -modmenu_version=10.0.0-beta.1 +modmenu_version=unknown mod_version = 1.0.4+mc1.21 maven_group = io.ix0rai diff --git a/src/main/java/io/ix0rai/ramel/RamelClient.java b/src/main/java/io/ix0rai/ramel/RamelClient.java deleted file mode 100644 index 1049bc7..0000000 --- a/src/main/java/io/ix0rai/ramel/RamelClient.java +++ /dev/null @@ -1,20 +0,0 @@ -package io.ix0rai.ramel; - -import io.ix0rai.ramel.client.RamelConfigScreen; -import net.fabricmc.api.ClientModInitializer; -import net.fabricmc.fabric.api.client.command.v2.ClientCommandManager; -import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback; -import net.minecraft.client.MinecraftClient; - -public class RamelClient implements ClientModInitializer { - @Override - public void onInitializeClient() { - ClientCommandRegistrationCallback.EVENT.register((dispatcher, buildCtx) -> dispatcher.register( - ClientCommandManager.literal("ramel").executes(ctx -> { - MinecraftClient client = ctx.getSource().getClient(); - client.send(() -> client.setScreen(new RamelConfigScreen(null))); - return 1; - }) - )); - } -} diff --git a/src/main/java/io/ix0rai/ramel/client/RamelModMenu.java b/src/main/java/io/ix0rai/ramel/client/RamelModMenu.java index 6215e4c..8318bbd 100644 --- a/src/main/java/io/ix0rai/ramel/client/RamelModMenu.java +++ b/src/main/java/io/ix0rai/ramel/client/RamelModMenu.java @@ -1,4 +1,3 @@ -/* package io.ix0rai.ramel.client; import com.terraformersmc.modmenu.api.ConfigScreenFactory; @@ -13,4 +12,3 @@ public ConfigScreenFactory getModConfigScreenFactory() { return RamelConfigScreen::new; } } -*/ diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 3023c0a..9d52289 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -18,9 +18,6 @@ "icon": "assets/ramel/icon.png", "environment": "*", "entrypoints": { - "client": [ - "io.ix0rai.ramel.RamelClient" - ], "modmenu": [ "io.ix0rai.ramel.client.RamelModMenu" ] @@ -32,7 +29,6 @@ "depends": { "fabricloader": ">=0.15.6", - "fabric-api": "*", "minecraft": ">=1.21-" }, From bb6caed461d4ed8d80a1b726f3d8e4686b6c1ec2 Mon Sep 17 00:00:00 2001 From: orifu Date: Wed, 5 Jun 2024 01:44:31 +0100 Subject: [PATCH 5/8] update to 1.21 pre release 2 --- build.gradle | 2 -- gradle.properties | 6 +++--- src/main/java/io/ix0rai/ramel/client/RamelConfigScreen.java | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 619bbf8..99d6c5f 100644 --- a/build.gradle +++ b/build.gradle @@ -11,8 +11,6 @@ repositories { maven { url = "https://maven.quiltmc.org/repository/release/" } maven { url = "https://maven.terraformersmc.com/releases/" } maven { url = "https://repo.sleeping.town/" } - - flatDir { dirs 'lib' } } configurations { diff --git a/gradle.properties b/gradle.properties index ca75150..50f2d17 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,11 +1,11 @@ # Done to increase the memory available to gradle. org.gradle.jvmargs=-Xmx1G -minecraft_version=1.21-pre1 -quilt_mappings=1 +minecraft_version=1.21-pre2 +quilt_mappings=3 loader_version=0.15.11 fabric_version=0.99.4+1.21 -modmenu_version=unknown +modmenu_version=11.0.0-beta.1 mod_version = 1.0.4+mc1.21 maven_group = io.ix0rai diff --git a/src/main/java/io/ix0rai/ramel/client/RamelConfigScreen.java b/src/main/java/io/ix0rai/ramel/client/RamelConfigScreen.java index 2eedcb6..573b8b4 100644 --- a/src/main/java/io/ix0rai/ramel/client/RamelConfigScreen.java +++ b/src/main/java/io/ix0rai/ramel/client/RamelConfigScreen.java @@ -26,8 +26,8 @@ public RamelConfigScreen(@Nullable Screen parent) { @SuppressWarnings("unchecked") protected void method_60325() { // addOptions // this.list - assert this.field_51824 != null; - this.field_51824.addEntries(StreamSupport.stream(Config.INSTANCE.values().spliterator(), false) + assert this.field_51824 != null; + this.field_51824.addEntries(StreamSupport.stream(Config.INSTANCE.values().spliterator(), false) .map(value -> createOptional((TrackedValue) value)).toArray(Option[]::new)); } From f2caefcfc875338532aa31f41405e1ef4205cff3 Mon Sep 17 00:00:00 2001 From: orifu Date: Sun, 9 Jun 2024 12:52:53 +0100 Subject: [PATCH 6/8] 1.21-pre4 --- gradle.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 50f2d17..f37efe1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,10 +1,10 @@ # Done to increase the memory available to gradle. org.gradle.jvmargs=-Xmx1G -minecraft_version=1.21-pre2 -quilt_mappings=3 +minecraft_version=1.21-pre4 +quilt_mappings=1 loader_version=0.15.11 -fabric_version=0.99.4+1.21 +fabric_version=0.100.0+1.21 modmenu_version=11.0.0-beta.1 mod_version = 1.0.4+mc1.21 From 2d36ac1c7e0d4b2cafbd5374ae9bb8cd90bbb8dd Mon Sep 17 00:00:00 2001 From: orifu Date: Wed, 12 Jun 2024 22:04:46 +0100 Subject: [PATCH 7/8] its nearly time --- gradle.properties | 6 +++--- src/main/resources/fabric.mod.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index f37efe1..9a3c00a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,10 +1,10 @@ # Done to increase the memory available to gradle. org.gradle.jvmargs=-Xmx1G -minecraft_version=1.21-pre4 -quilt_mappings=1 +minecraft_version=1.21-rc1 +quilt_mappings=2 loader_version=0.15.11 -fabric_version=0.100.0+1.21 +fabric_version=0.100.1+1.21 modmenu_version=11.0.0-beta.1 mod_version = 1.0.4+mc1.21 diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 9d52289..319f61c 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -28,7 +28,7 @@ ], "depends": { - "fabricloader": ">=0.15.6", + "fabricloader": ">=0.15.11", "minecraft": ">=1.21-" }, From a155e17120e312af7339ad1291ca56eac523ad47 Mon Sep 17 00:00:00 2001 From: ix0rai Date: Thu, 13 Jun 2024 19:17:14 -0500 Subject: [PATCH 8/8] 1.21 --- gradle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 9a3c00a..14c565b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,8 +1,8 @@ # Done to increase the memory available to gradle. org.gradle.jvmargs=-Xmx1G -minecraft_version=1.21-rc1 -quilt_mappings=2 +minecraft_version=1.21 +quilt_mappings=1 loader_version=0.15.11 fabric_version=0.100.1+1.21 modmenu_version=11.0.0-beta.1