Skip to content

Commit

Permalink
Merge pull request #504 from jchung01/vanilla-tweaks
Browse files Browse the repository at this point in the history
Disable elytra render tweak if OpenMods is present
  • Loading branch information
ACGaming authored Jul 3, 2024
2 parents 0925ad7 + 32c2936 commit 945a3c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ public static class EntitiesCategory

@Config.RequiresMcRestart
@Config.Name("Fixes Invisible Player when Flying with Elytra")
@Config.Comment("Fixes the player model occasionally disappearing when flying with elytra in a straight line in third-person mode")
@Config.Comment
({
"Fixes the player model occasionally disappearing when flying with elytra in a straight line in third-person mode",
"Incompatible with OpenModsLib"
})
public boolean utFixInvisiblePlayerModelWithElytra = true;

@Config.RequiresMcRestart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ public class UTLoadingPlugin implements IFMLLoadingPlugin, IEarlyMixinLoader
put("mixins.tweaks.world.village.json", () -> UTConfigTweaks.WORLD.utVillageDistance != 32);
}
});
public static boolean openModsLoaded;
public static boolean surgeLoaded;
private static final Map<String, Supplier<Boolean>> clientsideMixinConfigs = ImmutableMap.copyOf(new HashMap<String, Supplier<Boolean>>()
{
Expand All @@ -162,7 +163,7 @@ public class UTLoadingPlugin implements IFMLLoadingPlugin, IEarlyMixinLoader
put("mixins.bugfixes.blocks.blockoverlay.json", () -> UTConfigBugfixes.BLOCKS.BLOCK_OVERLAY.utBlockOverlayToggle);
put("mixins.bugfixes.blocks.miningglitch.client.json", () -> UTConfigBugfixes.BLOCKS.MINING_GLITCH.utMiningGlitchToggle);
put("mixins.bugfixes.entities.elytra.json", () -> UTConfigBugfixes.ENTITIES.utElytraDeploymentLandingToggle);
put("mixins.bugfixes.entities.elytrarender.json", () -> UTConfigBugfixes.ENTITIES.utFixInvisiblePlayerModelWithElytra);
put("mixins.bugfixes.entities.elytrarender.json", () -> UTConfigBugfixes.ENTITIES.utFixInvisiblePlayerModelWithElytra && !openModsLoaded);
put("mixins.bugfixes.entities.entitylists.client.json", () -> UTConfigBugfixes.ENTITIES.ENTITY_LISTS.utWorldAdditionsToggle);
put("mixins.bugfixes.entities.villagermantle.json", () -> UTConfigBugfixes.ENTITIES.utVillagerMantleToggle);
put("mixins.bugfixes.misc.depthmask.json", () -> UTConfigBugfixes.MISC.utDepthMaskToggle);
Expand Down Expand Up @@ -229,6 +230,7 @@ public class UTLoadingPlugin implements IFMLLoadingPlugin, IEarlyMixinLoader
Locale.setDefault(Locale.ENGLISH);
}

openModsLoaded = UTReflectionUtil.isClassLoaded("openmods.core.OpenModsClassTransformer");
randomPatchesLoaded = UTReflectionUtil.isClassLoaded("com.therandomlabs.randompatches.core.RPCore");
renderLibLoaded = UTReflectionUtil.isClassLoaded("meldexun.renderlib.RenderLib");
spongeForgeLoaded = UTReflectionUtil.isClassLoaded("org.spongepowered.mod.util.CompatibilityException");
Expand Down

0 comments on commit 945a3c3

Please sign in to comment.