Cosmetic Armor Reworked

Cosmetic Armor Reworked

113M Downloads

1.19.2, Can't startup in dev env on server

DBotThePony opened this issue ยท 0 comments

commented
[20:12:31] [main/ERROR] [ne.mi.fm.ja.FMLModContainer/LOADING]: Caught exception during event RegisterEvent dispatch for modid cosmeticarmorreworked
java.lang.BootstrapMethodError: java.lang.RuntimeException: Attempted to load class net/minecraft/client/player/LocalPlayer for invalid dist DEDICATED_SERVER
	at lain.mods.cos.impl.ModObjects.lambda$static$0(ModObjects.java:16) ~[CosmeticArmorReworked-1.19.2-v1_mapped_official_1.19.2.jar%23209!/:1.19.2-v1] {re:classloading}
	at net.minecraftforge.fml.DistExecutor.validateSafeReferent(DistExecutor.java:238) ~[fmlcore-1.19.2-43.1.32.jar%23205!/:?] {}
	at net.minecraftforge.fml.DistExecutor.safeRunForDist(DistExecutor.java:182) ~[fmlcore-1.19.2-43.1.32.jar%23205!/:?] {}
	at lain.mods.cos.impl.ModObjects.<clinit>(ModObjects.java:16) ~[CosmeticArmorReworked-1.19.2-v1_mapped_official_1.19.2.jar%23209!/:1.19.2-v1] {re:classloading}
	at lain.mods.cos.init.forge.ForgeCosmeticArmorReworked.lambda$static$0(ForgeCosmeticArmorReworked.java:28) ~[CosmeticArmorReworked-1.19.2-v1_mapped_official_1.19.2.jar%23209!/:1.19.2-v1] {re:classloading}
	at net.minecraftforge.registries.DeferredRegister.lambda$addEntries$1(DeferredRegister.java:388) ~[forge-1.19.2-43.1.32_mapped_official_1.19.2-recomp.jar%23200%23207!/:?] {re:classloading}
	at net.minecraftforge.registries.RegisterEvent.register(RegisterEvent.java:59) ~[forge-1.19.2-43.1.32_mapped_official_1.19.2-recomp.jar%23200%23207!/:?] {re:classloading,pl:eventbus:A}
	at net.minecraftforge.registries.DeferredRegister.addEntries(DeferredRegister.java:388) ~[forge-1.19.2-43.1.32_mapped_official_1.19.2-recomp.jar%23200%23207!/:?] {re:classloading}

You can try to change public static final InventoryManager invMan = DistExecutor.safeRunForDist(() -> InventoryManagerClient::new, () -> InventoryManager::new); to public static final InventoryManager invMan = DistExecutor.unsafeRunForDist(() -> InventoryManagerClient::new, () -> InventoryManager::new);

which will remove suppliers' validations (validation happens only in dev env)