Just Enough Resources (JER)

Just Enough Resources (JER)

163M Downloads

1.20.1 error in logs 'Failed loading villager cartographer registered at cartographer'

Lothrazar opened this issue ยท 1 comments

commented

Hi. Not a crash or anything but i noticed this in the logs

Mod version 1.4.0.222
Forge 47.1.3
jei-1.20.1-forge-15.2.0.23

[07:16:44] [Render thread/WARN]: Exception caught when registering villager
java.lang.NullPointerException: Cannot invoke "net.minecraft.world.entity.Entity.m_9236_()" because "p_219708_" is null
	at net.minecraft.world.entity.npc.VillagerTrades$TreasureMapForEmeralds.m_213663_(VillagerTrades.java:878) ~[client-1.20.1-20230612.114412-srg.jar%23358!/:?]
	at jeresources.collection.TradeList.addMerchantRecipe(TradeList.java:58) ~[JustEnoughResources-1.20.1-1.4.0.222.jar%23311!/:1.4.0.222]
	at jeresources.collection.TradeList.addITradeList(TradeList.java:69) ~[JustEnoughResources-1.20.1-1.4.0.222.jar%23311!/:1.4.0.222]
	at jeresources.entry.AbstractVillagerEntry.addITradeLists(AbstractVillagerEntry.java:30) ~[JustEnoughResources-1.20.1-1.4.0.222.jar%23311!/:1.4.0.222]
	at jeresources.entry.AbstractVillagerEntry.<init>(AbstractVillagerEntry.java:23) ~[JustEnoughResources-1.20.1-1.4.0.222.jar%23311!/:1.4.0.222]
	at jeresources.entry.VillagerEntry.<init>(VillagerEntry.java:19) ~[JustEnoughResources-1.20.1-1.4.0.222.jar%23311!/:1.4.0.222]
	at jeresources.util.VillagersHelper.initRegistry(VillagersHelper.java:23) ~[JustEnoughResources-1.20.1-1.4.0.222.jar%23311!/:1.4.0.222]
	at jeresources.compatibility.Compatibility.init(Compatibility.java:33) ~[JustEnoughResources-1.20.1-1.4.0.222.jar%23311!/:1.4.0.222]
	at jeresources.proxy.CommonProxy.initCompatibility(CommonProxy.java:14) ~[JustEnoughResources-1.20.1-1.4.0.222.jar%23311!/:1.4.0.222]
	at jeresources.jei.JEIConfig.registerCategories(JEIConfig.java:98) ~[JustEnoughResources-1.20.1-1.4.0.222.jar%23311!/:1.4.0.222]
	at mezz.jei.library.load.PluginLoader.lambda$createRecipeCategories$3(PluginLoader.java:90) ~[jei-1.20.1-forge-15.2.0.23.jar%23309!/:15.2.0.23]
	at mezz.jei.library.load.PluginCaller.callOnPlugins(PluginCaller.java:27) ~[jei-1.20.1-forge-15.2.0.23.jar%23309!/:15.2.0.23]
	at mezz.jei.library.load.PluginLoader.createRecipeCategories(PluginLoader.java:90) ~[jei-1.20.1-forge-15.2.0.23.jar%23309!/:15.2.0.23]
	at mezz.jei.library.load.PluginLoader.createRecipeManager(PluginLoader.java:119) ~[jei-1.20.1-forge-15.2.0.23.jar%23309!/:15.2.0.23]
	at mezz.jei.library.startup.JeiStarter.start(JeiStarter.java:132) ~[jei-1.20.1-forge-15.2.0.23.jar%23309!/:15.2.0.23]
	at mezz.jei.forge.startup.StartEventObserver.transitionState(StartEventObserver.java:137) ~[jei-1.20.1-forge-15.2.0.23.jar%23309!/:15.2.0.23]
	at mezz.jei.forge.startup.StartEventObserver.onEvent(StartEventObserver.java:100) ~[jei-1.20.1-forge-15.2.0.23.jar%23309!/:15.2.0.23]
	at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:260) ~[eventbus-6.0.5.jar%2387!/:?]
	at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:252) ~[eventbus-6.0.5.jar%2387!/:?]
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) ~[eventbus-6.0.5.jar%2387!/:?]
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) ~[eventbus-6.0.5.jar%2387!/:?]
	at net.minecraft.client.multiplayer.ClientPacketListener.m_5859_(ClientPacketListener.java:1451) ~[client-1.20.1-20230612.114412-srg.jar%23358!/:?]
	at net.minecraft.network.protocol.game.ClientboundUpdateTagsPacket.m_5797_(ClientboundUpdateTagsPacket.java:35) ~[client-1.20.1-20230612.114412-srg.jar%23358!/:?]
	at net.minecraft.network.protocol.game.ClientboundUpdateTagsPacket.m_5797_(ClientboundUpdateTagsPacket.java:11) ~[client-1.20.1-20230612.114412-srg.jar%23358!/:?]
	at net.minecraft.network.protocol.PacketUtils.m_263899_(PacketUtils.java:22) ~[client-1.20.1-20230612.114412-srg.jar%23358!/:?]
	at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:156) ~[client-1.20.1-20230612.114412-srg.jar%23358!/:?]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) ~[client-1.20.1-20230612.114412-srg.jar%23358!/:?]
	at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:130) ~[client-1.20.1-20230612.114412-srg.jar%23358!/:?]
	at net.minecraft.util.thread.BlockableEventLoop.m_18699_(BlockableEventLoop.java:115) ~[client-1.20.1-20230612.114412-srg.jar%23358!/:?]
	at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1106) ~[client-1.20.1-20230612.114412-srg.jar%23358!/:?]
	at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:718) ~[client-1.20.1-20230612.114412-srg.jar%23358!/:?]
	at net.minecraft.client.main.Main.main(Main.java:218) ~[forge-47.1.3.jar:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:111) ~[fmlloader-1.20.1-47.1.3.jar:?]
	at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.clientService(CommonLaunchHandler.java:99) ~[fmlloader-1.20.1-47.1.3.jar:?]
	at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$makeService$0(CommonClientLaunchHandler.java:25) ~[fmlloader-1.20.1-47.1.3.jar:?]
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ~[modlauncher-10.0.9.jar:?]
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~[modlauncher-10.0.9.jar:?]
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~[modlauncher-10.0.9.jar:?]
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:108) ~[modlauncher-10.0.9.jar:?]
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:78) ~[modlauncher-10.0.9.jar:?]
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-10.0.9.jar:?]
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-10.0.9.jar:?]
	at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~[bootstraplauncher-1.1.2.jar:?]```
commented

Error is because merchant trades cannot safely receive a null entity as show below. Instead a fake player might be better to provide.
image

Someone reported to me this error because the null entity also breaks with my mod's trades as well. But this isn't really something I should fix as vanilla is expecting entity to never be null and there's probably other mods besides mine that also do the same.

[22:37:32] [Render thread/WARN]: Exception caught when registering wandering traderr
java.lang.NullPointerException: Cannot invoke "net.minecraft.world.entity.Entity.m_9236_()" because "entity" is null
	at com.telepathicgrunt.repurposedstructures.misc.maptrades.StructureSpecificMaps$TreasureMapForEmeralds.m_213663_(StructureSpecificMaps.java:53) ~[repurposed_structures-7.0.0+1.20-forge.jar%23686!/:?]
	at jeresources.collection.TradeList.addMerchantRecipe(TradeList.java:58) ~[JustEnoughResources-1.20.1-1.4.0.222.jar%23614!/:1.4.0.222]
	at jeresources.collection.TradeList.addITradeList(TradeList.java:69) ~[JustEnoughResources-1.20.1-1.4.0.222.jar%23614!/:1.4.0.222]
	at jeresources.entry.AbstractVillagerEntry.addITradeLists(AbstractVillagerEntry.java:30) ~[JustEnoughResources-1.20.1-1.4.0.222.jar%23614!/:1.4.0.222]
	at jeresources.entry.AbstractVillagerEntry.<init>(AbstractVillagerEntry.java:23) ~[JustEnoughResources-1.20.1-1.4.0.222.jar%23614!/:1.4.0.222]
	at jeresources.entry.WanderingTraderEntry.<init>(WanderingTraderEntry.java:16) ~[JustEnoughResources-1.20.1-1.4.0.222.jar%23614!/:1.4.0.222]
	at jeresources.util.VillagersHelper.initRegistry(VillagersHelper.java:30) ~[JustEnoughResources-1.20.1-1.4.0.222.jar%23614!/:1.4.0.222]
	at jeresources.compatibility.Compatibility.init(Compatibility.java:33) ~[JustEnoughResources-1.20.1-1.4.0.222.jar%23614!/:1.4.0.222]
	at jeresources.proxy.CommonProxy.initCompatibility(CommonProxy.java:14) ~[JustEnoughResources-1.20.1-1.4.0.222.jar%23614!/:1.4.0.222]
	at jeresources.jei.JEIConfig.registerCategories(JEIConfig.java:98) ~[JustEnoughResources-1.20.1-1.4.0.222.jar%23614!/:1.4.0.222]
	```