TransfurVariants Objects issues [IN DEV BUILD]
Foxyas opened this issue ยท 4 comments
When registering a variant that uses another variant as a base you get this issue
-- Head --
Thread: Render thread
Suspected Mods: NONE
Stacktrace:
at java.util.Objects.requireNonNull(Objects.java:334) ~[?:?] {re:mixin}
-- MOD changed_addon --
Details:
Caused by 0: java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method) ~[?:?] {re:mixin}
at java.lang.Class.forName(Class.java:467) ~[?:?] {re:mixin}
at net.minecraftforge.fml.javafmlmod.AutomaticEventSubscriber.lambda$inject$6(AutomaticEventSubscriber.java:61) ~[javafmllanguage-1.18.2-40.2.21.jar%2373!/:?] {}
at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?] {re:mixin}
at net.minecraftforge.fml.javafmlmod.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:48) ~[javafmllanguage-1.18.2-40.2.21.jar%2373!/:?] {}
at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:77) ~[javafmllanguage-1.18.2-40.2.21.jar%2373!/:?] {}
at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:122) ~[fmlcore-1.18.2-40.2.21.jar%2372!/:?] {}
at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[?:?] {}
at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796) ~[?:?] {}
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] {}
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] {}
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] {}
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] {}
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] {}
Mod File: /C:/Users/User/AppData/Roaming/ATLauncher/instances/ChangedMCRPG/mods/changed_addon-2.0.0.jar
Failure message: Changed Addon Plus (changed_addon) has failed to load correctly
java.lang.ExceptionInInitializerError: null
Mod Version: 2.6.0
Mod Issue URL: NOT PROVIDED
Exception message: java.lang.NullPointerException: Registry Object not present: changed:form_latex_snow_leopard/male
Stacktrace:
Line of the code
public static final RegistryObject<TransfurVariant<SnowLeopardMaleOrganicEntity>> ORGANIC_SNOW_LEOPARD_MALE = register("form_biosynth_snow_leopard/male",TransfurVariant.Builder.of(ChangedTransfurVariants.LATEX_SNOW_LEOPARD_MALE.get(),ChangedAddonModEntities.SNOW_LEOPARD_MALE_ORGANIC)
.transfurMode(TransfurMode.REPLICATION).nightVision().breatheMode(TransfurVariant.BreatheMode.NORMAL).reducedFall().jumpStrength(1.3F).addAbility(ChangedAddonAbilitys.CARRY).scares(List.of(Creeper.class)));
You need to use a supplier to create a variant that copies from another. See
ChangedTransfurVariants
for existing examples.
is this? () -> rest of the code