mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-11-26 12:35:54 +01:00
Don't apply lithium injection if Moonrise is present
Closes https://github.com/ViaVersion/ViaFabricPlus/issues/620
This commit is contained in:
parent
907576d787
commit
5a470d7ed9
@ -41,6 +41,7 @@ public class ViaFabricPlusMixinPlugin implements IMixinConfigPlugin {
|
||||
public static boolean IPNEXT_PRESENT;
|
||||
public static boolean MORE_CULLING_PRESENT;
|
||||
public static boolean LITHIUM_PRESENT;
|
||||
public static boolean MOONRISE_PRESENT;
|
||||
|
||||
@Override
|
||||
public void onLoad(String mixinPackage) {
|
||||
@ -53,6 +54,7 @@ public class ViaFabricPlusMixinPlugin implements IMixinConfigPlugin {
|
||||
IPNEXT_PRESENT = loader.isModLoaded("inventoryprofilesnext");
|
||||
MORE_CULLING_PRESENT = loader.isModLoaded("moreculling");
|
||||
LITHIUM_PRESENT = loader.isModLoaded("lithium");
|
||||
MOONRISE_PRESENT = loader.isModLoaded("moonrise");
|
||||
|
||||
// Force unload some FabricAPI mixins because FabricAPI overwrites some of the elytra code
|
||||
final Set<String> loadedMixins = RStream.of("org.spongepowered.asm.mixin.transformer.MixinConfig").fields().by("globalMixinList").get();
|
||||
@ -70,7 +72,7 @@ public class ViaFabricPlusMixinPlugin implements IMixinConfigPlugin {
|
||||
public boolean shouldApplyMixin(String targetClassName, String mixinClassName) {
|
||||
return switch (mixinClassName) {
|
||||
case INJECTOR_PACKAGE + COMPAT_PACKAGE + "ipnext.MixinAutoRefillHandler_ItemSlotMonitor" -> IPNEXT_PRESENT;
|
||||
case INJECTOR_PACKAGE + COMPAT_PACKAGE + "lithium.MixinEntity" -> LITHIUM_PRESENT;
|
||||
case INJECTOR_PACKAGE + COMPAT_PACKAGE + "lithium.MixinEntity" -> LITHIUM_PRESENT && !MOONRISE_PRESENT;
|
||||
default -> true;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user