removed the performance killing colour event thing

This commit is contained in:
alterNERDtive 2023-06-19 01:49:31 +02:00
parent 3cb5ab8c7d
commit cc8c142a2b
Signed by: alterNERDtive
GPG key ID: 547787A4FE6533F1
3 changed files with 27 additions and 1 deletions

View file

@ -38,6 +38,8 @@ public class Configuration {
public static ConfigValue<Integer> JUNKMGMT_T3; public static ConfigValue<Integer> JUNKMGMT_T3;
public static ConfigValue<Integer> JUNKMGMT_T4; public static ConfigValue<Integer> JUNKMGMT_T4;
public static BooleanValue COLOURLESS;
static { static {
Builder builder = new Builder(); Builder builder = new Builder();
setupConfig(builder); setupConfig(builder);
@ -104,12 +106,14 @@ public class Configuration {
// Bug fixes // Bug fixes
builder.push("Fixes"); builder.push("Fixes");
builder.comment("Fix fake player research (e.g. Router + Botany Pots interaction, AE2 auto crafting, …) (CURRENTLY NON-FUNCTIONAL)"); builder.comment("Fix fake player research (e.g. Router + Botany Pots interaction, AE2 auto crafting, …)");
FAKE_PLAYER_FIX = builder.define("fakePlayerResearchFix", true); FAKE_PLAYER_FIX = builder.define("fakePlayerResearchFix", true);
builder.comment("Fix Routers unable to place Vault Rocks on your Vaultar"); builder.comment("Fix Routers unable to place Vault Rocks on your Vaultar");
ROUTER_VAULTAR_FIX = builder.define("routerVaultarFix", true); ROUTER_VAULTAR_FIX = builder.define("routerVaultarFix", true);
builder.comment("Fix №5 fragments of all relics having half the weight"); builder.comment("Fix №5 fragments of all relics having half the weight");
FRAGMENT_WEIGHT_FIX = builder.define("fragmentFix", true); FRAGMENT_WEIGHT_FIX = builder.define("fragmentFix", true);
builder.comment("Fix performance issues when determining item colours (WARNING: will make jewels and unidentified gear go white)");
COLOURLESS = builder.define("colourPerformanceFix", true);
builder.pop(); builder.pop();
} }
} }

View file

@ -0,0 +1,21 @@
package tv.alterNERD.VaultModTweaks.integration.mixin;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;
import iskallia.vault.event.ClientInitEvents;
import iskallia.vault.init.ModModels;
import net.minecraftforge.client.event.ColorHandlerEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import tv.alterNERD.VaultModTweaks.Configuration;
@Mixin(ClientInitEvents.class)
public class MixinClientInitEvents {
@Overwrite(remap = false)
@SubscribeEvent
public static void onColorHandlerRegister(ColorHandlerEvent.Item event) {
if (!Configuration.COLOURLESS.get()) {
ModModels.registerItemColors(event.getItemColors());
}
}
}

View file

@ -4,6 +4,7 @@
"compatibilityLevel": "JAVA_17", "compatibilityLevel": "JAVA_17",
"refmap": "mixins.the_vault_tweaks.refmap.json", "refmap": "mixins.the_vault_tweaks.refmap.json",
"mixins": [ "mixins": [
"MixinClientInitEvents",
"MixinCrystalBuddingConfig", "MixinCrystalBuddingConfig",
"MixinEnchantmentEntry", "MixinEnchantmentEntry",
"MixinExpertisesGuiConfig", "MixinExpertisesGuiConfig",