You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Download and install Alex's Caves. (alexscaves-2.0.2)
Download and install Taterzens. ([1.20.1] Taterzens 1.11.7)
Start Minecraft with Forge client.
Create new world with cheats enabled to access Taterzens commands.
Once the world has loaded, type /npc create test. You should receive the "unexpected error" message.
Check C:\Users<user>\AppData\Roaming.minecraft\logs\latest.txt for the message in the Logs section of this issue.
Expected behavior
Expected was the creation of an NPC.
Logs
Logs
[26Jan2025 13:53:54.305] [Server thread/ERROR] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: Exception caught during firing event: Cannot invoke "com.mojang.authlib.GameProfile.getId()" because "p_235876_" is null
Index: 2
Listeners:
0: NORMAL
1: ASM: class com.github.alexthe666.alexsmobs.event.ServerEvents onEntityResize(Lnet/minecraftforge/event/entity/EntityEvent$Size;)V
2: ASM: com.github.alexmodguy.alexscaves.server.event.CommonEvents@553dfa17 resizeEntity(Lnet/minecraftforge/event/entity/EntityEvent$Size;)V
3: ASM: class com.simibubi.create.content.kinetics.deployer.DeployerFakePlayer deployerHasEyesOnHisFeet(Lnet/minecraftforge/event/entity/EntityEvent$Size;)V
4: ASM: noppes.npcs.ForgeEventHandler@76e1d4f6 forgeEntity(Lnet/minecraftforge/eventbus/api/Event;)V
5: ASM: com.talhanation.recruits.PillagerEvents@42713851 raidStartOnBurningOminous(Lnet/minecraftforge/event/entity/EntityEvent;)V
6: ASM: noppes.npcs.ForgeEventHandler@76e1d4f6 forgeEntity(Lnet/minecraftforge/eventbus/api/Event;)V
java.lang.NullPointerException: Cannot invoke "com.mojang.authlib.GameProfile.getId()" because "p_235876_" is null
at TRANSFORMER/[email protected]/net.minecraft.core.UUIDUtil.m_235875_(UUIDUtil.java:98)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.player.Player.(Player.java:178)
at TRANSFORMER/[email protected]/net.minecraft.server.level.ServerPlayer.(ServerPlayer.java:249)
at TRANSFORMER/[email protected]/org.samo_lego.taterzens.npc.TaterzenNPC.constructFakePlayer(TaterzenNPC.java:211)
at TRANSFORMER/[email protected]/org.samo_lego.taterzens.npc.TaterzenNPC.m_20088_(TaterzenNPC.java:418)
at TRANSFORMER/[email protected]/com.github.alexmodguy.alexscaves.server.event.CommonEvents.resizeEntity(CommonEvents.java:107)
at TRANSFORMER/[email protected]/com.github.alexmodguy.alexscaves.server.event.__CommonEvents_resizeEntity_Size.invoke(.dynamic)
at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:73)
at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:315)
at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:296)
at TRANSFORMER/[email protected]/net.minecraftforge.event.ForgeEventFactory.getEntitySizeForge(ForgeEventFactory.java:799)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.Entity.(Entity.java:261)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.LivingEntity.(LivingEntity.java:233)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.Mob.(Mob.java:123)
at TRANSFORMER/[email protected]/net.minecraft.world.entity.PathfinderMob.(PathfinderMob.java:14)
at TRANSFORMER/[email protected]/org.samo_lego.taterzens.npc.TaterzenNPC.(TaterzenNPC.java:160)
at TRANSFORMER/[email protected]/org.samo_lego.taterzens.npc.TaterzenNPC.(TaterzenNPC.java:146)
at TRANSFORMER/[email protected]/org.samo_lego.taterzens.api.TaterzensAPI.createTaterzen(TaterzensAPI.java:135)
at TRANSFORMER/[email protected]/org.samo_lego.taterzens.api.TaterzensAPI.createTaterzen(TaterzensAPI.java:154)
at TRANSFORMER/[email protected]/org.samo_lego.taterzens.commands.NpcCommand.spawnTaterzen(NpcCommand.java:401)
at MC-BOOTSTRAP/[email protected]/com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:264)
at TRANSFORMER/[email protected]/net.minecraft.commands.Commands.m_242674_(Commands.java:257)
at TRANSFORMER/[email protected]/net.minecraft.server.network.ServerGamePacketListenerImpl.m_246958_(ServerGamePacketListenerImpl.java:1244)
at TRANSFORMER/[email protected]/net.minecraft.server.network.ServerGamePacketListenerImpl.m_244885_(ServerGamePacketListenerImpl.java:1221)
at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_18693_(BlockableEventLoop.java:67)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
at TRANSFORMER/[email protected]/net.minecraft.server.TickTask.run(TickTask.java:18)
at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:156)
at TRANSFORMER/[email protected]/net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:770)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:161)
at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:130)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:753)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:747)
at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_18699_(BlockableEventLoop.java:115)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:732)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:665)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:251)
at java.base/java.lang.Thread.run(Thread.java:833)
Additional context
Using the source code provided with this project, I could create a new GameProfile object in the constructFakePlayer() method of TaterzenNPC.java before trying to create a new ServerPlayer object. This was an immediate resolution to the error I was getting; however, depending on the overall code structure, which I have not studied intensely, this could require more updates. Thank you for taking the time to look into this report.
The text was updated successfully, but these errors were encountered:
Describe the bug
The GameProfile is null on NPC creation when certain other mods are present, such as Alex's Caves.
Platform(s)
Fabric
Environment(s)
Singleplayer
Versions
Minecraft 1.20.1
Taterzens 1.11.7
To Reproduce
Steps to reproduce the behavior:
/npc create test
. You should receive the "unexpected error" message.Expected behavior
Expected was the creation of an NPC.
Logs
Logs
[26Jan2025 13:53:54.305] [Server thread/ERROR] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: Exception caught during firing event: Cannot invoke "com.mojang.authlib.GameProfile.getId()" because "p_235876_" is null Index: 2 Listeners: 0: NORMAL 1: ASM: class com.github.alexthe666.alexsmobs.event.ServerEvents onEntityResize(Lnet/minecraftforge/event/entity/EntityEvent$Size;)V 2: ASM: com.github.alexmodguy.alexscaves.server.event.CommonEvents@553dfa17 resizeEntity(Lnet/minecraftforge/event/entity/EntityEvent$Size;)V 3: ASM: class com.simibubi.create.content.kinetics.deployer.DeployerFakePlayer deployerHasEyesOnHisFeet(Lnet/minecraftforge/event/entity/EntityEvent$Size;)V 4: ASM: noppes.npcs.ForgeEventHandler@76e1d4f6 forgeEntity(Lnet/minecraftforge/eventbus/api/Event;)V 5: ASM: com.talhanation.recruits.PillagerEvents@42713851 raidStartOnBurningOminous(Lnet/minecraftforge/event/entity/EntityEvent;)V 6: ASM: noppes.npcs.ForgeEventHandler@76e1d4f6 forgeEntity(Lnet/minecraftforge/eventbus/api/Event;)V java.lang.NullPointerException: Cannot invoke "com.mojang.authlib.GameProfile.getId()" because "p_235876_" is null at TRANSFORMER/[email protected]/net.minecraft.core.UUIDUtil.m_235875_(UUIDUtil.java:98) at TRANSFORMER/[email protected]/net.minecraft.world.entity.player.Player.(Player.java:178) at TRANSFORMER/[email protected]/net.minecraft.server.level.ServerPlayer.(ServerPlayer.java:249) at TRANSFORMER/[email protected]/org.samo_lego.taterzens.npc.TaterzenNPC.constructFakePlayer(TaterzenNPC.java:211) at TRANSFORMER/[email protected]/org.samo_lego.taterzens.npc.TaterzenNPC.m_20088_(TaterzenNPC.java:418) at TRANSFORMER/[email protected]/com.github.alexmodguy.alexscaves.server.event.CommonEvents.resizeEntity(CommonEvents.java:107) at TRANSFORMER/[email protected]/com.github.alexmodguy.alexscaves.server.event.__CommonEvents_resizeEntity_Size.invoke(.dynamic) at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:73) at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:315) at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:296) at TRANSFORMER/[email protected]/net.minecraftforge.event.ForgeEventFactory.getEntitySizeForge(ForgeEventFactory.java:799) at TRANSFORMER/[email protected]/net.minecraft.world.entity.Entity.(Entity.java:261) at TRANSFORMER/[email protected]/net.minecraft.world.entity.LivingEntity.(LivingEntity.java:233) at TRANSFORMER/[email protected]/net.minecraft.world.entity.Mob.(Mob.java:123) at TRANSFORMER/[email protected]/net.minecraft.world.entity.PathfinderMob.(PathfinderMob.java:14) at TRANSFORMER/[email protected]/org.samo_lego.taterzens.npc.TaterzenNPC.(TaterzenNPC.java:160) at TRANSFORMER/[email protected]/org.samo_lego.taterzens.npc.TaterzenNPC.(TaterzenNPC.java:146) at TRANSFORMER/[email protected]/org.samo_lego.taterzens.api.TaterzensAPI.createTaterzen(TaterzensAPI.java:135) at TRANSFORMER/[email protected]/org.samo_lego.taterzens.api.TaterzensAPI.createTaterzen(TaterzensAPI.java:154) at TRANSFORMER/[email protected]/org.samo_lego.taterzens.commands.NpcCommand.spawnTaterzen(NpcCommand.java:401) at MC-BOOTSTRAP/[email protected]/com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:264) at TRANSFORMER/[email protected]/net.minecraft.commands.Commands.m_242674_(Commands.java:257) at TRANSFORMER/[email protected]/net.minecraft.server.network.ServerGamePacketListenerImpl.m_246958_(ServerGamePacketListenerImpl.java:1244) at TRANSFORMER/[email protected]/net.minecraft.server.network.ServerGamePacketListenerImpl.m_244885_(ServerGamePacketListenerImpl.java:1221) at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_18693_(BlockableEventLoop.java:67) at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) at TRANSFORMER/[email protected]/net.minecraft.server.TickTask.run(TickTask.java:18) at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:156) at TRANSFORMER/[email protected]/net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:770) at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:161) at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:130) at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:753) at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:747) at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_18699_(BlockableEventLoop.java:115) at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:732) at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:665) at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:251) at java.base/java.lang.Thread.run(Thread.java:833)Additional context
Using the source code provided with this project, I could create a new GameProfile object in the constructFakePlayer() method of TaterzenNPC.java before trying to create a new ServerPlayer object. This was an immediate resolution to the error I was getting; however, depending on the overall code structure, which I have not studied intensely, this could require more updates. Thank you for taking the time to look into this report.
The text was updated successfully, but these errors were encountered: