Jump to content

Tracking custom Entity? Despawn?


Recommended Posts

I'm currenly working on adding a custom mob to the game. It will spawn using an egg but it willl despawn within like 4 seconds. I also get this error in my console when I try spawning in the mob.


2013-06-14 16:13:16 [iNFO] [sTDERR] net.minecraft.util.ReportedException: Adding entity to track
2013-06-14 16:13:16 [iNFO] [sTDERR] 	at net.minecraft.entity.EntityTracker.addEntityToTracker(EntityTracker.java:225)
2013-06-14 16:13:16 [iNFO] [sTDERR] 	at cpw.mods.fml.common.registry.EntityRegistry.tryTrackingEntity(EntityRegistry.java:363)
2013-06-14 16:13:16 [iNFO] [sTDERR] 	at net.minecraft.entity.EntityTracker.addEntityToTracker(EntityTracker.java:66)
2013-06-14 16:13:16 [iNFO] [sTDERR] 	at net.minecraft.world.WorldManager.onEntityCreate(WorldManager.java:37)
2013-06-14 16:13:16 [iNFO] [sTDERR] 	at net.minecraft.world.World.obtainEntitySkin(World.java:1585)
2013-06-14 16:13:16 [iNFO] [sTDERR] 	at net.minecraft.world.WorldServer.obtainEntitySkin(WorldServer.java:935)
2013-06-14 16:13:16 [iNFO] [sTDERR] 	at net.minecraft.world.World.spawnEntityInWorld(World.java:1573)
2013-06-14 16:13:16 [iNFO] [sTDERR] 	at net.minecraft.item.ItemMonsterPlacer.spawnCreature(ItemMonsterPlacer.java:120)
2013-06-14 16:13:16 [iNFO] [sTDERR] 	at net.minecraft.item.ItemMonsterPlacer.onItemUse(ItemMonsterPlacer.java:76)
2013-06-14 16:13:16 [iNFO] [sTDERR] 	at net.minecraft.item.ItemStack.tryPlaceItemIntoWorld(ItemStack.java:149)
2013-06-14 16:13:16 [iNFO] [sTDERR] 	at net.minecraft.item.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:425)
2013-06-14 16:13:16 [iNFO] [sTDERR] 	at net.minecraft.network.NetServerHandler.handlePlace(NetServerHandler.java:553)
2013-06-14 16:13:16 [iNFO] [sTDERR] 	at net.minecraft.network.packet.Packet15Place.processPacket(Packet15Place.java:79)
2013-06-14 16:13:16 [iNFO] [sTDERR] 	at net.minecraft.network.MemoryConnection.processReadPackets(MemoryConnection.java:89)
2013-06-14 16:13:16 [iNFO] [sTDERR] 	at net.minecraft.network.NetServerHandler.networkTick(NetServerHandler.java:134)
2013-06-14 16:13:16 [iNFO] [sTDERR] 	at net.minecraft.network.NetworkListenThread.networkTick(NetworkListenThread.java:53)
2013-06-14 16:13:16 [iNFO] [sTDERR] 	at net.minecraft.server.integrated.IntegratedServerListenThread.networkTick(IntegratedServerListenThread.java:109)
2013-06-14 16:13:16 [iNFO] [sTDERR] 	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:675)
2013-06-14 16:13:16 [iNFO] [sTDERR] 	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:571)
2013-06-14 16:13:16 [iNFO] [sTDERR] 	at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:127)
2013-06-14 16:13:16 [iNFO] [sTDERR] 	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:469)
2013-06-14 16:13:16 [iNFO] [sTDERR] 	at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
2013-06-14 16:13:16 [iNFO] [sTDERR] Caused by: java.lang.IllegalStateException: Entity is already tracked!
2013-06-14 16:13:16 [iNFO] [sTDERR] 	at net.minecraft.entity.EntityTracker.addEntityToTracker(EntityTracker.java:205)
2013-06-14 16:13:16 [iNFO] [sTDERR] 	... 21 more



As you can see none of the error says anything about my class.





Here is where I load the wizard and all the good stuff about it.


    EntityRegistry.registerModEntity(EntityWizard.class, "Wizard", 2, this, 80, 3, true);
    EntityRegistry.addSpawn(EntityWizard.class, 5, 2, 6, EnumCreatureType.creature, BiomeGenBase.plains, BiomeGenBase.beach, BiomeGenBase.jungle);
    LanguageRegistry.instance().addStringLocalization("entity.Wizard.name", "Wizard");


I'm going to  try changing the tracker range to 100 and the updateFrequency to 10. Please give me some help.

Link to comment
Share on other sites

can we see al of your entity registrations? (all those lines where you register all of your entities)

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Link to comment
Share on other sites

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.

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.

  • Create New...

Important Information

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