diff --git a/README.md b/README.md index c5920175..523acacb 100644 --- a/README.md +++ b/README.md @@ -341,6 +341,7 @@ All changes are toggleable via config files. * **Memory Leak Fix:** Fixes a client-side memory leak when wearing Void Fortress armor * **The Erebus** * **Preserved Blocks Fix:** Prevents HWYLA/TOP crashes with preserved blocks + * **Fix Quake Hammer Texture:** Fixes the Quake Hammer using the incorrect config option to control its size * **The Farlanders** * **Duplication Fixes:** Fixes various duplication exploits * **Thermal Expansion** diff --git a/src/main/java/mod/acgaming/universaltweaks/config/UTConfigMods.java b/src/main/java/mod/acgaming/universaltweaks/config/UTConfigMods.java index a0fc6dfa..6c66ddbf 100644 --- a/src/main/java/mod/acgaming/universaltweaks/config/UTConfigMods.java +++ b/src/main/java/mod/acgaming/universaltweaks/config/UTConfigMods.java @@ -390,6 +390,11 @@ public static class ErebusCategory @Config.Name("Preserved Blocks Fix") @Config.Comment("Prevents HWYLA/TOP crashes with preserved blocks") public boolean utEBPreservedBlocksToggle = true; + + @Config.RequiresMcRestart + @Config.Name("Fix Quake Hammer Texture") + @Config.Comment("Fixes the Quake Hammer using the incorrect config option to control its size") + public boolean utFixQuakeHammerTexture = true; } public static class ExtraUtilitiesCategory diff --git a/src/main/java/mod/acgaming/universaltweaks/core/UTMixinLoader.java b/src/main/java/mod/acgaming/universaltweaks/core/UTMixinLoader.java index a528a617..b3975cff 100644 --- a/src/main/java/mod/acgaming/universaltweaks/core/UTMixinLoader.java +++ b/src/main/java/mod/acgaming/universaltweaks/core/UTMixinLoader.java @@ -52,6 +52,7 @@ public class UTMixinLoader implements ILateMixinLoader put("mixins.mods.elenaidodge2.json", () -> loaded("elenaidodge2")); put("mixins.mods.epicsiegemod.json", () -> loaded("epicsiegemod")); put("mixins.mods.erebus.json", () -> loaded("erebus")); + put("mixins.mods.erebus.quakehammer.json", () -> loaded("erebus") && UTConfigMods.EREBUS.utFixQuakeHammerTexture); put("mixins.mods.extrautilities.breakcreativemill.json", () -> loaded("extrautils2") && UTConfigMods.EXTRA_UTILITIES.utFixCreativeMillHarvestability); put("mixins.mods.extrautilities.dupes.json", () -> loaded("extrautils2") && UTConfigMods.EXTRA_UTILITIES.utDuplicationFixesToggle); put("mixins.mods.extrautilities.mutabledrops.json", () -> loaded("extrautils2") && UTConfigMods.EXTRA_UTILITIES.utMutableBlockDrops); diff --git a/src/main/java/mod/acgaming/universaltweaks/mods/erebus/quakehammer/mixin/UTQuakeHammerMixin.java b/src/main/java/mod/acgaming/universaltweaks/mods/erebus/quakehammer/mixin/UTQuakeHammerMixin.java new file mode 100644 index 00000000..a85d9c46 --- /dev/null +++ b/src/main/java/mod/acgaming/universaltweaks/mods/erebus/quakehammer/mixin/UTQuakeHammerMixin.java @@ -0,0 +1,19 @@ +package mod.acgaming.universaltweaks.mods.erebus.quakehammer.mixin; + +import erebus.core.handler.configs.ConfigHandler; +import mod.acgaming.universaltweaks.config.UTConfigMods; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Redirect; + +// Courtesy of WaitingIdly +@Mixin(value = ConfigHandler.class, remap = false) +public class UTQuakeHammerMixin +{ + @Redirect(method = "syncConfigs", at = @At(value = "FIELD", target = "Lerebus/core/handler/configs/ConfigHandler;hammer_renderSize:F", ordinal = 1)) + private void utFixRenderSize(ConfigHandler configHandler, float original) + { + if (!UTConfigMods.EREBUS.utFixQuakeHammerTexture) return; + configHandler.getHammer_renderSizeChargedMultiplier = original; + } +} \ No newline at end of file diff --git a/src/main/resources/mixins.mods.erebus.quakehammer.json b/src/main/resources/mixins.mods.erebus.quakehammer.json new file mode 100644 index 00000000..60b07a8c --- /dev/null +++ b/src/main/resources/mixins.mods.erebus.quakehammer.json @@ -0,0 +1,7 @@ +{ + "package": "mod.acgaming.universaltweaks.mods.erebus.quakehammer.mixin", + "refmap": "universaltweaks.refmap.json", + "minVersion": "0.8", + "compatibilityLevel": "JAVA_8", + "mixins": ["UTQuakeHammerMixin"] +} \ No newline at end of file