Skip to content

Commit 2e9b979

Browse files
committed
- Bug fix: Fixed class loading destroying other mods ability to load
1 parent 5e25a92 commit 2e9b979

File tree

2 files changed

+7
-44
lines changed

2 files changed

+7
-44
lines changed

changelog.md

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,7 @@
1-
# Version 2.1.4
1+
# Version 2.1.5 - HOTFIX
22

33
![TARDIS Refined](https://wiki.tardisrefined.net/TARDIS-Refined-Wiki/tardis_refined_v2_1.png)
44

5-
#### Interiors
6-
- Added Interior: Hartnell
7-
- Added Interior: Pertwee
8-
- Updated Interior: Copper
9-
- Updated Interior: Mesh
10-
- Updated Interior: Mechanical
11-
- Updated Interior: Refurbished
12-
13-
#### Enhancements
14-
- Enhancement: Added tooltips to various screens to indicate which mod added content
15-
- Enhancement: Players can now sleep in the TARDIS (No spawnpoint setting)
16-
- Enhancement: Doors can now be placed at 2x2 rendering by shift right-clicking when placing
17-
- Enhancement: Addon Mod Developers now get a more descriptive message when they have not registered models for Consoles/Shells
18-
19-
#### Commands
20-
- Added Sub-Command: Summon
215

226
#### Bug Fix
23-
- Bug fix: Export Desktop command no longer errors when a user uses upper case characters
24-
- Bug fix: Fixed Console Configurator not rendering consoles when they have boot up animations
25-
- Bug fix: Fixed Console Configurator looking for null patterns when sourcing a model
26-
- Bug fix: Fixed Game crashing when removing mods that add consoles or shells, they will not default to Factory Console / Factory Shell when removed
27-
- Bug fix: Sodium compatibility on Fabric
7+
- Bug fix: Fixed class loading destroying other mods ability to load

common/src/main/java/whocraft/tardis_refined/TRMixinPlugin.java

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,13 @@
33
import org.objectweb.asm.tree.ClassNode;
44
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin;
55
import org.spongepowered.asm.mixin.extensibility.IMixinInfo;
6-
import org.spongepowered.asm.service.MixinService;
6+
import whocraft.tardis_refined.common.util.Platform;
77

8-
import java.io.IOException;
98
import java.util.List;
109
import java.util.Set;
1110

1211
public class TRMixinPlugin implements IMixinConfigPlugin {
1312

14-
public static final boolean HAS_SODIUM;
15-
16-
static {
17-
HAS_SODIUM = hasClass("net.caffeinemc.mods.sodium.client.render.immediate.model.EntityRenderer")
18-
|| hasClass("me.jellysquid.mods.sodium.client.render.immediate.model.EntityRenderer");
19-
}
20-
21-
private static boolean hasClass(String name) {
22-
try {
23-
// This does *not* load the class!
24-
MixinService.getService().getBytecodeProvider().getClassNode(name);
25-
return true;
26-
} catch (ClassNotFoundException | IOException e) {
27-
return false;
28-
}
29-
}
30-
3113
@Override
3214
public void onLoad(String mixinPackage) {
3315

@@ -42,13 +24,14 @@ public String getRefMapperConfig() {
4224
public boolean shouldApplyMixin(String targetClassName, String mixinClassName) {
4325

4426
if (mixinClassName.contains("whocraft.tardis_refined.mixin.render.SodiumFixMixin")) {
45-
TardisRefined.LOGGER.info("Checking for Sodium, found: {}", HAS_SODIUM);
27+
boolean isSodiumInstalled = Platform.isModLoaded("sodium");
28+
TardisRefined.LOGGER.info("Checking for Sodium, found: {}", isSodiumInstalled);
4629

47-
if(HAS_SODIUM){
30+
if(isSodiumInstalled){
4831
TardisRefined.LOGGER.info("Sodium Detected, enabling {}", mixinClassName);
4932
}
5033

51-
return HAS_SODIUM;
34+
return isSodiumInstalled;
5235
}
5336

5437
return true;

0 commit comments

Comments
 (0)