Skip to content

Commit

Permalink
Merge pull request #437 from WaitingIdly/quake-hammer
Browse files Browse the repository at this point in the history
Fix tiny Quake Hammer Texture
  • Loading branch information
ACGaming authored Apr 12, 2024
2 parents 1dffe37 + b06183c commit d1ab83e
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
}
}
7 changes: 7 additions & 0 deletions src/main/resources/mixins.mods.erebus.quakehammer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"package": "mod.acgaming.universaltweaks.mods.erebus.quakehammer.mixin",
"refmap": "universaltweaks.refmap.json",
"minVersion": "0.8",
"compatibilityLevel": "JAVA_8",
"mixins": ["UTQuakeHammerMixin"]
}

0 comments on commit d1ab83e

Please sign in to comment.