Jump to content

IllegalStateException - Entity already tracked


WildBamaBoy

Recommended Posts

Users are getting random crashes while entities in my mod are following them around. I have also began getting this type of error but in a different context.

 

I have this error report from a user whose game crashed while my entity was set to follow them. No mention of my mod, but it only happens when it is installed and an entity is following them.

---- Minecraft Crash Report ----
// Hey, that tickles! Hehehe!

Time: 11/18/12 11:37 AM
Description: Exception getting block type in world

java.lang.IllegalStateException: Entity is already tracked!
    at ii.a(EntityTracker.java:161)
    at ii.a(EntityTracker.java:115)
    at ij.a(SourceFile:24)
    at xv.a(World.java:1514)
    at in.a(WorldServer.java:819)
    at xv.a(World.java:3722)
    at zs.c(Chunk.java:1023)
    at im.c(ChunkProviderServer.java:134)
    at im.d(ChunkProviderServer.java:150)
    at xv.e(World.java:498)
    at xv.a(World.java:381)
    at or.f(SourceFile:287)
    at or.m(SourceFile:273)
    at or.a(SourceFile:63)
    at ou.a(SourceFile:48)
    at in.b(WorldServer.java:142)
    at net.minecraft.server.MinecraftServer.r(MinecraftServer.java:657)
    at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:587)
    at bdo.q(IntegratedServer.java:110)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:494)
    at fy.run(SourceFile:856)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
    at ii.a(EntityTracker.java:161)
    at ii.a(EntityTracker.java:115)
    at ij.a(SourceFile:24)
    at xv.a(World.java:1514)
    at in.a(WorldServer.java:819)
    at xv.a(World.java:3722)
    at zs.c(Chunk.java:1023)
    at im.c(ChunkProviderServer.java:134)
    at im.d(ChunkProviderServer.java:150)
    at xv.e(World.java:498)

-- Requested block coordinates --
Details:
    Found chunk: true
    Location: World: (203,65,-810), Chunk: (at 11,4,6 in 12,-51; contains blocks 192,0,-816 to 207,255,-801), Region: (0,-2; contains chunks 0,-64 to 31,-33, blocks 0,0,-1024 to 511,255,-513)
Stacktrace:
    at xv.a(World.java:381)
    at or.f(SourceFile:287)
    at or.m(SourceFile:273)
    at or.a(SourceFile:63)
    at ou.a(SourceFile:48)
    at in.b(WorldServer.java:142)

-- Affected level --
Details:
    Level name: Blah Bhah Chirp
    All players: 1 total; [iq['Fishcat'/74, l='Blah Bhah Chirp', x=370.59, y=64.42, z=-805.48]]
    Chunk stats: ServerChunkCache: 544 Drop: 0
    Level seed: -7685121701639027226
    Level generator: ID 01 - flat, ver 0. Features enabled: true
    Level generator options: 2;7,3x1,52x24,8x12;2;stronghold,biome_1,village,decoration,dungeon,mineshaft
    Level spawn location: World: (320,4,-780), Chunk: (at 0,0,4 in 20,-49; contains blocks 320,0,-784 to 335,255,-769), Region: (0,-2; contains chunks 0,-64 to 31,-33, blocks 0,0,-1024 to 511,255,-513)
    Level time: 29589 game time, 29589 day time
    Level dimension: 0
    Level storage version: 0x04ABD - Anvil
    Level weather: Rain time: 133145 (now: false), thunder time: 32026 (now: false)
    Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true
Stacktrace:
    at net.minecraft.server.MinecraftServer.r(MinecraftServer.java:657)
    at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:587)
    at bdo.q(IntegratedServer.java:110)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:494)
    at fy.run(SourceFile:856)

-- System Details --
Details:
    Minecraft Version: 1.4.4
    Operating System: Windows 7 (x86) version 6.1
    Java Version: 1.7.0_07, Oracle Corporation
    Java VM Version: Java HotSpot™ Client VM (mixed mode), Oracle Corporation
    Memory: 257555760 bytes (245 MB) / 519110656 bytes (495 MB) up to 1037959168 bytes (989 MB)
    JVM Flags: 2 total; -Xms512m -Xmx1024m
    AABB Pool Size: 1446 (80976 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP v7.21 FML v4.4.4.442 Minecraft Forge 6.3.0.372 4 mods loaded, 4 mods active
    mcp [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available
    FML [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available
    Forge [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available
    MCA [Minecraft Comes Alive] (mca.zip) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available
    Profiler Position: N/A (disabled)
    Vec3 Pool Size: 238 (13328 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    Player Count: 1 / 8; [iq['Fishcat'/74, l='Blah Bhah Chirp', x=370.59, y=64.42, z=-805.48]]
    Type: Integrated Server (map_client.txt)
    Is Modded: Definitely; Client brand changed to 'forge,fml'

 

I'm also getting this crash, but it's when I try to spawn in an entity using an event hook. The purpose of this event hook is to remove the old "Testificate" villagers when they spawn and replace them with my own version of villagers.

 

EDIT: This happened on only one world so far, but that world would not load again even without the event hook running.

 

@ForgeSubscribe
public void entityJoinedWorldEventHandler(EntityJoinWorldEvent event)
{
	if (!event.world.isRemote)
	{
		if (MCA.instance.worldPropertiesManager != null)
		{
			if (MCA.instance.worldPropertiesManager.worldProperties.overwriteTestificates)
			{
				if (event.entity instanceof EntityVillager)
				{
					event.setCanceled(true);

					EntityVillager villager = (EntityVillager)event.entity;
					EntityVillagerAdult newVillager = new EntityVillagerAdult(event.world, villager.getProfession());
					newVillager.setPositionAndRotation(villager.posX, villager.posY, villager.posZ, villager.rotationYaw, villager.rotationPitch);

					event.world.spawnEntityInWorld(newVillager);
					villager.setDead();
				}
			}
		}
	}
}

 

But I get this error while the game loads:

2012-11-18 14:56:06 [iNFO] [sTDERR] java.lang.IllegalStateException: Entity is already tracked!
2012-11-18 14:56:06 [iNFO] [sTDERR] 	at net.minecraft.src.EntityTracker.addEntityToTracker(EntityTracker.java:161)
2012-11-18 14:56:06 [iNFO] [sTDERR] 	at net.minecraft.src.EntityTracker.addEntityToTracker(EntityTracker.java:115)
2012-11-18 14:56:06 [iNFO] [sTDERR] 	at net.minecraft.src.WorldManager.obtainEntitySkin(WorldManager.java:30)
2012-11-18 14:56:06 [iNFO] [sTDERR] 	at net.minecraft.src.World.obtainEntitySkin(World.java:1514)
2012-11-18 14:56:06 [iNFO] [sTDERR] 	at net.minecraft.src.WorldServer.obtainEntitySkin(WorldServer.java:819)
2012-11-18 14:56:06 [iNFO] [sTDERR] 	at net.minecraft.src.World.addLoadedEntities(World.java:3722)
2012-11-18 14:56:06 [iNFO] [sTDERR] 	at net.minecraft.src.Chunk.onChunkLoad(Chunk.java:1023)
2012-11-18 14:56:06 [iNFO] [sTDERR] 	at net.minecraft.src.ChunkProviderServer.loadChunk(ChunkProviderServer.java:134)
2012-11-18 14:56:06 [iNFO] [sTDERR] 	at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:313)
2012-11-18 14:56:06 [iNFO] [sTDERR] 	at net.minecraft.src.IntegratedServer.loadAllWorlds(IntegratedServer.java:71)
2012-11-18 14:56:06 [iNFO] [sTDERR] 	at net.minecraft.src.IntegratedServer.startServer(IntegratedServer.java:87)
2012-11-18 14:56:06 [iNFO] [sTDERR] 	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:456)
2012-11-18 14:56:06 [iNFO] [sTDERR] 	at net.minecraft.src.ThreadMinecraftServer.run(ThreadMinecraftServer.java:17)

 

Why is this happening?

Link to comment
Share on other sites

Make sure that EntityVillagerAdult doesn't extend EntityVillager?

 

Looks like an entity is being registered too many times with the EntityTracker.

Protip: try and find answers yourself before asking on the forum.

It's pretty likely that there is an answer.

 

Was I helpful? Give me a thank you!

 

 

width=635 height=903http://bit.ly/HZ03zy[/img]

 

 

Tired of waiting for mods to port to bukkit?

use BukkitForge! (now with a working version of WorldEdit!)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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