Jump to content

Recommended Posts

Posted

I have created a custom init for the mod entity type, a registry handler, client event bus subscriber, then entity model, the entity renderer, and the entity. I do see the entity using tab completion when typing /summon however it fails and says unable to summon entity.

[01:37:02] [Server thread/WARN] [minecraft/EntityType]: Exception loading entity: 
java.lang.NullPointerException: null
	at net.minecraft.entity.ai.attributes.AttributeModifierManager.func_233795_c_(AttributeModifierManager.java:67) ~[forge-1.16.1-32.0.44_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading}
	at net.minecraft.entity.LivingEntity.func_233637_b_(LivingEntity.java:1848) ~[forge-1.16.1-32.0.44_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading}
	at net.minecraft.entity.LivingEntity.getMaxHealth(LivingEntity.java:1609) ~[forge-1.16.1-32.0.44_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading}
	at net.minecraft.entity.LivingEntity.<init>(LivingEntity.java:208) ~[forge-1.16.1-32.0.44_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading}
	at net.minecraft.entity.MobEntity.<init>(MobEntity.java:107) ~[forge-1.16.1-32.0.44_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.entity.CreatureEntity.<init>(CreatureEntity.java:13) ~[forge-1.16.1-32.0.44_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading}
	at net.minecraft.entity.AgeableEntity.<init>(AgeableEntity.java:20) ~[forge-1.16.1-32.0.44_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading}
	at net.minecraft.entity.passive.AnimalEntity.<init>(AnimalEntity.java:36) ~[forge-1.16.1-32.0.44_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading}
	at net.minecraft.entity.passive.TameableEntity.<init>(TameableEntity.java:33) ~[forge-1.16.1-32.0.44_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading}
	at net.minecraft.entity.passive.WolfEntity.<init>(WolfEntity.java:83) ~[forge-1.16.1-32.0.44_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading}
	at com.rena.entities.ExampleEntity.<init>(ExampleEntity.java:23) ~[main/:?] {re:classloading}
	at net.minecraft.entity.EntityType.create(EntityType.java:442) ~[forge-1.16.1-32.0.44_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading}
	at net.minecraft.entity.EntityType.lambda$loadEntityUnchecked$1(EntityType.java:453) ~[forge-1.16.1-32.0.44_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading}
	at java.util.Optional.map(Optional.java:215) ~[?:1.8.0_251] {}
	at net.minecraft.entity.EntityType.loadEntityUnchecked(EntityType.java:452) ~[forge-1.16.1-32.0.44_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading}
	at net.minecraft.entity.EntityType.loadEntity(EntityType.java:510) ~[forge-1.16.1-32.0.44_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading}
	at net.minecraft.entity.EntityType.func_220335_a(EntityType.java:492) ~[forge-1.16.1-32.0.44_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading}
	at net.minecraft.command.impl.SummonCommand.summonEntity(SummonCommand.java:49) ~[forge-1.16.1-32.0.44_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading}
	at net.minecraft.command.impl.SummonCommand.lambda$register$1(SummonCommand.java:33) ~[forge-1.16.1-32.0.44_mapped_snapshot_20200514-1.16-recomp.jar:?] {re:classloading}
	at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:262) ~[brigadier-1.0.17.jar:?] {}
	at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:176) ~[brigadier-1.0.17.jar:?] {}
	at net.minecraft.command.Commands.handleCommand(Commands.java:218) ~[?:?] {re:classloading}
	at net.minecraft.network.play.ServerPlayNetHandler.handleSlashCommand(ServerPlayNetHandler.java:1085) ~[?:?] {re:classloading}
	at net.minecraft.network.play.ServerPlayNetHandler.processChatMessage(ServerPlayNetHandler.java:1065) ~[?:?] {re:classloading}
	at net.minecraft.network.play.client.CChatMessagePacket.processPacket(CChatMessagePacket.java:40) ~[?:?] {re:classloading}
	at net.minecraft.network.play.client.CChatMessagePacket.processPacket(CChatMessagePacket.java:8) ~[?:?] {re:classloading}
	at net.minecraft.network.PacketThreadUtil.lambda$checkThreadAndEnqueue$0(PacketThreadUtil.java:19) ~[?:?] {re:classloading}
	at net.minecraft.util.concurrent.TickDelayedTask.run(TickDelayedTask.java:20) ~[?:?] {re:classloading}
	at net.minecraft.util.concurrent.ThreadTaskExecutor.run(ThreadTaskExecutor.java:139) ~[?:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.util.concurrent.RecursiveEventLoop.run(RecursiveEventLoop.java:22) ~[?:?] {re:classloading}
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:763) ~[?:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:157) ~[?:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.util.concurrent.ThreadTaskExecutor.driveOne(ThreadTaskExecutor.java:109) ~[?:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.driveOneInternal(MinecraftServer.java:746) ~[?:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.driveOne(MinecraftServer.java:740) ~[?:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.util.concurrent.ThreadTaskExecutor.driveUntil(ThreadTaskExecutor.java:122) ~[?:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.runScheduledTasks(MinecraftServer.java:726) ~[?:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:669) ~[?:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.lambda$func_240784_a_$0(MinecraftServer.java:231) ~[?:?] {re:classloading,pl:accesstransformer:B}
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_251] {}
[01:37:02] [Render thread/INFO] [minecraft/NewChatGui]: [CHAT] Unable to summon entity

 

Posted
1 hour ago, StolenBaron said:

Yes, I'm just not sure which part this error is pointing to so I don't know which needs to be uploaded.

Upload your entire mod, preferably as a git repository.

It's sad how much time mods spend saying "x is no longer supported on this forum. Please update to a modern version of Minecraft to receive support".

Posted (edited)

so it tells you your mob does not have the "maximum health" attribute which you will need to set them

 

and Ash has a detailed walk through and explanation on this

 

Edited by poopoodice

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.