diff --git a/README.md b/README.md index b220bdd..1273a04 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ There are no dependencies, but [Mod Menu](https://modrinth.com/mod/modmenu), [No * Vault buttons * Integration with VoxelMap and Xaero's World Map/Minimap * Clicking on a residence will teleport you to that residence - * Automatic[^1] world detection and map confirmation/creation + * Automatic world detection and map confirmation/creation (Voxel only) * And more to come :) ## Maven/Development @@ -43,5 +43,3 @@ dependencies { ## Disclaimer This mod is not sponsored by nor affiliated with Empire Minecraft, Starlis LLC, or Mojang Studios. It has been approved for use on Empire Minecraft in accordance with its [approved mod](https://mods.emc.gs) policies. - -[^1]: Fully automatic with VoxelMap. Xaero's users must still manually create the world, but the name will automatically be filled in. diff --git a/build.gradle b/build.gradle index 2a5c9a4..49362d5 100644 --- a/build.gradle +++ b/build.gradle @@ -9,27 +9,23 @@ plugins { } String mod_version = loom.modVersion -String release_title = null -String changeLog = null +String release_title = "Fix many bugs and introduce a couple more" +String changeLog = "There are still many known bugs! Be patient, I am working on fixing them, but wanted to get this hotfix out.\n" + + "- Hotbar placement is strange\n" + + "- Map name detection has been temporarily removed for Xaero's users\n" + + "- Other things I'm forgetting\n" + + "Hopefully nothing too game-breaking! :P" -/// Minecraft & Fabric /// String mc_version = "1.17.1" String mc_version_major = "1.17" String yarn_mappings = "63" // https://fabricmc.net/versions.html String loader_version = "0.12.4" // https://fabricmc.net/versions.html String fabric_version = "0.41.3" // https://fabricmc.net/versions.html - -/// Useful annotations /// -String lombok_version = "1.18.22" // https://mvnrepository.com/artifact/org.projectlombok/lombok - -/// Compat /// String modmenu_version = "2.0.14" // https://modrinth.com/mod/modmenu/versions +String lombok_version = "1.18.22" // https://mvnrepository.com/artifact/org.projectlombok/lombok String voxel_version = "1.10.15" // https://www.curseforge.com/minecraft/mc-mods/voxelmap/files/all String xmm_version = "21.20.0" // https://www.curseforge.com/minecraft/mc-mods/xaeros-minimap/files/all String xwm_version = "1.18.0" // https://www.curseforge.com/minecraft/mc-mods/xaeros-world-map/files/all -String gbl_version = "1.3.4" // https://minecraft.guntram.de/maven/de/guntram/mcmod/GBfabrictools/maven-metadata.xml -String crowdin_version = "1.3" // https://minecraft.guntram.de/maven/de/guntram/mcmod/crowdin-translate/maven-metadata.xml -String echests_version = "0.36.1-1.7.0" // https://api.modrinth.com/maven/maven/modrinth/easierchests/maven-metadata.xml archivesBaseName = "emcutils" version = mc_version + "-" + mod_version + System.getenv().SNAPSHOT @@ -46,14 +42,6 @@ repositories { includeGroup "xaero" } } - maven { - url "https://api.modrinth.com/maven" - content { includeGroup "maven.modrinth" } - } - maven { - url "https://minecraft.guntram.de/maven/" - content { includeGroup "de.guntram.mcmod" } - } } // Comment this line out if you have good internet @@ -62,7 +50,6 @@ idea { module { downloadJavadoc = false } } loom { accessWidenerPath = file("src/main/resources/emcutils.tsv") } dependencies { - /// Minecraft & Fabric /// minecraft "com.mojang:minecraft:${mc_version}" mappings "net.fabricmc:yarn:${mc_version}+build.${yarn_mappings}:v2" modImplementation "net.fabricmc:fabric-loader:${loader_version}" @@ -71,29 +58,16 @@ dependencies { include(modImplementation(fabricApi.module("fabric-$it", "${fabric_version}+${mc_version_major}"))) } - /// Useful annotations /// implementation annotationProcessor("org.projectlombok:lombok:${lombok_version}") - /// Compat /// - - // Mod Menu modImplementation ("com.terraformersmc:modmenu:${modmenu_version}") { exclude group: "net.fabricmc.fabric-api" exclude group: "net.fabricmc" } - // Map mods modApi "com.mamiyaotaru:voxelmap:${voxel_version}+${mc_version_major}" modApi "xaero:minimap:${xmm_version}+${mc_version_major}" modApi "xaero:map:${xwm_version}+${mc_version_major}" - - // EasierChests - modApi("de.guntram.mcmod:GBfabrictools:${gbl_version}+${mc_version_major}") { - exclude group: "net.fabricmc.fabric-api" - exclude group: "net.fabricmc" - } - modApi "de.guntram.mcmod:crowdin-translate:${crowdin_version}+${mc_version_major}" - modApi "maven.modrinth:easierchests:${mc_version}-fabric${echests_version}" } tasks.withType(JavaCompile) { it.options.encoding = "UTF-8" } diff --git a/src/main/java/dev/frydae/emcutils/mixins/EMCMixinPlugin.java b/src/main/java/dev/frydae/emcutils/mixins/EMCMixinPlugin.java index 0419f29..c31dba1 100644 --- a/src/main/java/dev/frydae/emcutils/mixins/EMCMixinPlugin.java +++ b/src/main/java/dev/frydae/emcutils/mixins/EMCMixinPlugin.java @@ -39,7 +39,6 @@ public class EMCMixinPlugin implements IMixinConfigPlugin { public boolean shouldApplyMixin(@NotNull String targetClassName, String mixinClassName) { if (mixinClassName.contains("voxelMap")) return FabricLoader.getInstance().isModLoaded("voxelmap"); if (mixinClassName.contains("xaero")) return FabricLoader.getInstance().isModLoaded("xaeroworldmap"); - if (mixinClassName.contains("easierChests")) return FabricLoader.getInstance().isModLoaded("easierchests"); return true; } diff --git a/src/main/java/dev/frydae/emcutils/mixins/MinecraftClientMixin.java b/src/main/java/dev/frydae/emcutils/mixins/MinecraftClientMixin.java index 5de4af7..857c807 100644 --- a/src/main/java/dev/frydae/emcutils/mixins/MinecraftClientMixin.java +++ b/src/main/java/dev/frydae/emcutils/mixins/MinecraftClientMixin.java @@ -44,7 +44,7 @@ public abstract class MinecraftClientMixin { @Shadow private Window window; - @Inject(at = @At("INVOKE"), method = "setScreen", cancellable = true) + @Inject(method = "setScreen", at = @At("HEAD"), cancellable = true) public void onOpenScreen(@Nullable Screen screen, CallbackInfo ci) { if (!(screen instanceof VaultScreen)) { return; diff --git a/src/main/java/dev/frydae/emcutils/mixins/easierChests/HandledScreensMixin.java b/src/main/java/dev/frydae/emcutils/mixins/easierChests/HandledScreensMixin.java deleted file mode 100644 index 609dcf1..0000000 --- a/src/main/java/dev/frydae/emcutils/mixins/easierChests/HandledScreensMixin.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2021 MrFrydae - * Copyright (c) 2021 wafflecoffee - * Copyright (c) 2021 djlawler - * Copyright (c) 2020 TeamMidnightDust (MidnightConfig only) - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -package dev.frydae.emcutils.mixins.easierChests; - -import de.guntram.mcmod.easierchests.ExtendedGuiChest; -import dev.frydae.emcutils.features.VaultScreen; -import net.minecraft.client.MinecraftClient; -import net.minecraft.client.gui.screen.ingame.HandledScreens; -import net.minecraft.screen.GenericContainerScreenHandler; -import net.minecraft.screen.ScreenHandlerType; -import net.minecraft.text.Text; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Pseudo; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Pseudo -@Mixin(HandledScreens.class) -public abstract class HandledScreensMixin { - @Inject(method = "open", at = @At("HEAD"), cancellable = true) - private static void checkVaultScreen(ScreenHandlerType type, MinecraftClient client, int any, Text component, CallbackInfo ci) { - if (type == VaultScreen.GENERIC_9X7) { - GenericContainerScreenHandler container = (GenericContainerScreenHandler) type.create(any, client.player.getInventory()); - ExtendedGuiChest screen = new ExtendedGuiChest(container, client.player.getInventory(), component, container.getRows()); - client.player.currentScreenHandler = container; - client.setScreen(screen); - ci.cancel(); - } - } -} diff --git a/src/main/java/dev/frydae/emcutils/mixins/xaero/GuiMapNameMixin.java b/src/main/java/dev/frydae/emcutils/mixins/xaero/GuiMapNameMixin.java index aec3247..d9ea20f 100644 --- a/src/main/java/dev/frydae/emcutils/mixins/xaero/GuiMapNameMixin.java +++ b/src/main/java/dev/frydae/emcutils/mixins/xaero/GuiMapNameMixin.java @@ -25,6 +25,8 @@ package dev.frydae.emcutils.mixins.xaero; +public abstract class GuiMapNameMixin {} +/* import dev.frydae.emcutils.utils.Util; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Pseudo; @@ -39,8 +41,10 @@ public abstract class GuiMapNameMixin { @Shadow(remap = false) private String currentNameFieldContent; - @Inject(method = "init", at = @At(value = "HEAD"), remap = false) + FIXME: This is currently broken to all hell and crashes the game and I have absolutely zero clue why + @Inject(method = "init()V", at = @At(value = "HEAD"), remap = false) public void setSubworldName(CallbackInfo ci) { if (Util.isOnEMC) this.currentNameFieldContent = Util.getCurrentServer().getName().toLowerCase() + " - " + Util.getWorld(); } } +*/ \ No newline at end of file diff --git a/src/main/resources/emcutils.mixins.json b/src/main/resources/emcutils.mixins.json index 66aa780..90d29a9 100644 --- a/src/main/resources/emcutils.mixins.json +++ b/src/main/resources/emcutils.mixins.json @@ -14,11 +14,9 @@ "PlayerListHudAccessor", "PlayerListHudMixin", "ScreenMixin", - "easierChests.HandledScreensMixin", "voxelMap.GuiPersistentMapMixin", "voxelMap.GuiWaypointsMixin", "voxelMap.VoxelMapMixin", - "xaero.GuiMapNameMixin", "xaero.ModSettingsMixin", "xaero.SupportXaeroMinimapMixin" ], diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index a8b90cd..8448bba 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -1,18 +1,18 @@ { "schemaVersion": 1, "id": "emcutils", - "version": "2.3.1-alpha.build.10", + "version": "2.3.1", "name": "Empire Minecraft Utilities", "description": "A collection of various utilities for the Empire Minecraft server.", "authors": [ - "MrFrydae" + "MrFrydae", + "wafflecoffee" ], "contributors": [ - "wafflecoffee", "BlockHead_56" ], "contact": { - "homepage": "https://emc.gs/t/84361", + "homepage": "https://emc.gs/t/84930", "sources": "https://github.com/wafflecoffee/Empire-Minecraft-Utilities", "issues": "https://github.com/wafflecoffee/Empire-Minecraft-Utilities/issues" }, @@ -36,7 +36,7 @@ "fabric-api-base": "*", "fabric-item-api-v1": "*", "fabric-networking-api-v1": "*", - "minecraft": "~1.17.1" + "minecraft": ">=1.17.1" }, "suggests": { "modmenu": ">=2.0.14",