Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,8 @@ Available in flavors [**Cleanroom**](https://www.curseforge.com/minecraft/modpac
* **Gaia Dimension**
* **Fix Restructurer Crash:** Safely access a nullable value when checking recipes in the Restructurer
* **HammerLib**
* **Optimized ItemColorHelper Rendering** Optimizes HammerLib's item color rendering performance, increasing FPS when rendering ItemStacks
* **Optimized ItemColorHelper Rendering:** Optimizes HammerLib's item color rendering performance, increasing FPS when rendering ItemStacks
* **Skip Checking URL:** Prevent checking the stopmodreposts api, as it is blocked in some regions and can cause timeouts or significant delays in starting
* **HWYLA**
* **Keybindings Fix:** Fixes crashes in all menus when changing HWYLA keybindings to unsupported values
* **Immersive Engineering**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1051,6 +1051,11 @@ public static class HammerLibCategory
@Config.Name("Optimized ItemColorHelper Rendering")
@Config.Comment("Optimizes HammerLib's item color rendering performance, increasing FPS when rendering ItemStacks")
public boolean utOptimizeItemColorHelper = true;

@Config.RequiresMcRestart
@Config.Name("Skip Checking URL")
@Config.Comment("Prevent checking the stopmodreposts api, as it is blocked in some regions and can cause timeouts or significant delays in starting")
public boolean utSkipURLCheck = false;
}

public static class ImmersiveEngineeringCategory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public class UTMixinLoader implements ILateMixinLoader
put("mixins/mods/mixins.electroblobswizardry.json", c -> c.isModPresent("ebwizardry") && c.isModPresent("conarm") && UTConfigMods.ELECTROBLOBS_WIZARDRY.utConstructsArmoryFixToggle);
put("mixins/mods/mixins.enderio.itemrender.json", c -> c.isModPresent("enderio") && UTConfigMods.ENDER_IO.utReplaceItemRenderer);
put("mixins/mods/mixins.fpsreducer.json", c -> c.isModPresent("fpsreducer") && UTConfigMods.FPS_REDUCER.utCorrectFpsValue);
put("mixins/mods/mixins.hammerlib.json", c -> c.isModPresent("hammercore") && UTConfigMods.HAMMER_LIB.utOptimizeItemColorHelper);
put("mixins/mods/mixins.hammerlib.color.json", c -> c.isModPresent("hammercore") && UTConfigMods.HAMMER_LIB.utOptimizeItemColorHelper);
put("mixins/mods/mixins.hammerlib.url.json", c -> c.isModPresent("hammercore") && UTConfigMods.HAMMER_LIB.utSkipURLCheck);
put("mixins/mods/mixins.hwyla.json", c -> c.isModPresent("waila"));
put("mixins/mods/mixins.ironchests.json", c -> c.isModPresent("ironchest") && UTConfigMods.IRON_CHESTS.utReplaceItemRenderer);
put("mixins/mods/mixins.modularmagic.nullingredient.json", c -> c.isModPresent("modularmagic") && UTConfigMods.MODULAR_MAGIC.utEnsureIngredientNotNull);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package mod.acgaming.universaltweaks.mods.hammerlib.mixin;

import java.util.ArrayList;
import java.util.List;

import com.zeitheron.hammercore.utils.java.io.win32.ModSourceAdapter;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Mutable;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

// Courtesy of WaitingIdly
@Mixin(value = ModSourceAdapter.class, remap = false)
public abstract class UTModSourceAdapterMixin
{
@Mutable
@Shadow
@Final
public static List<ModSourceAdapter.IllegalSite> ILLEGAL_SITES;

/**
* @author WaitingIdly
* @reason Prevent timeouts when attempting to load the url
* from a location that has it blocked.
*/
@Inject(method = "<clinit>", at = @At("HEAD"), cancellable = true)
private static void utSkipURLCheck(CallbackInfo ci)
{
ILLEGAL_SITES = new ArrayList<>();
ci.cancel();
}
}
7 changes: 7 additions & 0 deletions src/main/resources/mixins/mods/mixins.hammerlib.url.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"package": "mod.acgaming.universaltweaks.mods.hammerlib.mixin",
"refmap": "universaltweaks.refmap.json",
"minVersion": "0.8",
"compatibilityLevel": "JAVA_8",
"client": ["UTModSourceAdapterMixin"]
}
Loading