CraftTweaker

CraftTweaker

151M Downloads

CT automatically loads java class even if zenscript dependencies are not fulfilled

kotakotik22 opened this issue ยท 1 comments

commented

Issue description

My theory: CT loads the class when automatically registered and because it's extending a non-existing class, everything crashes
It would probably be fine if one of the fields/methods/whatever used a non-existing class

An idea to fix it: Make it easier to add classes to load manually (unprivate the zen class registry or something), then people could check themselves if the mod is loaded using ModList and register the class if it is

Steps to reproduce

Add an addon for CT
Create a java class extending any class from that addon
Add the addon to@ZenRegister(modDeps = {"modid"}) on your class
Launch with CT but without the addon
And crash from ClassNotFoundException

Script used

No response

The crafttweaker.log file

No response

Minecraft version

1.16

Forge version

36.1.16

CraftTweaker version

7.1.0.91

Other relevant information

No response

The latest.log file

No response

commented

My current workaround, a wrapper for my builder: https://gist.github.com/61bce4227cef6cd288778183c2145b47

new GearBuilder(new BlockBuilder()).builder.build("andesite_gear");