Jump to content

[SOLVED] [1.7.2] Crash-Report Help


TheDav1311

Recommended Posts

---- Minecraft Crash Report ----

// You should try our sister game, Minceraft!

 

Time: 22.07.14 13:18

Description: Exception in server tick loop

 

java.lang.NoClassDefFoundError: net/minecraft/entity/Entity$1

at net.minecraft.entity.Entity.addEntityCrashInfo(Entity.java:2463)

at net.minecraft.entity.Entity.writeToNBT(Entity.java:1578)

at net.minecraft.entity.Entity.writeToNBTOptional(Entity.java:1515)

at net.minecraft.world.chunk.storage.AnvilChunkLoader.writeChunkToNBT(AnvilChunkLoader.java:299)

at net.minecraft.world.chunk.storage.AnvilChunkLoader.saveChunk(AnvilChunkLoader.java:132)

at net.minecraft.world.gen.ChunkProviderServer.safeSaveChunk(ChunkProviderServer.java:229)

at net.minecraft.world.gen.ChunkProviderServer.saveChunks(ChunkProviderServer.java:281)

at net.minecraft.world.WorldServer.saveAllChunks(WorldServer.java:875)

at net.minecraft.server.MinecraftServer.saveAllWorlds(MinecraftServer.java:370)

at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:630)

at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482)

at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:746)

 

My Game crashed last time random with this Error and I can't fix it.

 

The new class since it crash:

 

public class EntityCorpus extends EntityAmbientCreature
{
public String player;
public String team;

public EntityCorpus(World par1World)
{
	super(par1World);
	player = "Steve";   		//Just fillers
	team = "NoTeam";
}

public boolean interact(EntityPlayer entityplayer)
        {
	if(entityplayer.capabilities.isCreativeMode)
	{
		return false;
	}

	if(!entityplayer.worldObj.isRemote)
	{
		for(int m = 0; m < entityplayer.worldObj.playerEntities.size(); m++)
		{
			ChatComponentTranslation cc = new ChatComponentTranslation(team);
			EntityPlayerMP playerMP = (EntityPlayerMP) entityplayer.worldObj.playerEntities.get(m);
 			ChatComponentTranslation cd = new ChatComponentTranslation(player + " was a ");
 			cd.appendSibling(cc);
 			playerMP.addChatComponentMessage(cd);
		}
	}
	return true;
         }

public EntityCorpus(World par1World, double x ,double y, double z)
{
	super(par1World);
	player = "Steve";   		//Just fillers
	team = "NoTeam";
	this.setPosition(x, y, z);
}

protected void applyEntityAttributes()
        {
             super.applyEntityAttributes();
             this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(100.0D);
        }

@Override
public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) 
{
	player = par1NBTTagCompound.getString("player");
	team = par1NBTTagCompound.getString("team");
	super.readFromNBT(par1NBTTagCompound);
}

@Override
public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) 
{
	if(player != null)
		par1NBTTagCompound.setString("player", player);
	if(team != null)
		par1NBTTagCompound.setString("team", team);
	super.writeToNBT(par1NBTTagCompound);
}

public void setPlayer(String player)
{
	this.player = player;
}

public void setTeam(String team)
{
	this.team = team;
}
}

Link to comment
Share on other sites

Hi

 

My guess is that your writeEntityToNBT has a problem - I'm guessing it is a recursive loop -it calls super.writeToNBT , which calls writeEntityToNBT etc.

 

If that doesn't work, try putting a breakpoint into the catch in Entity.writeToNBT, then inspecting throwable to see what is causing the exception.

 

        catch (Throwable throwable)
        {
            CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Saving entity NBT");
            CrashReportCategory crashreportcategory = crashreport.makeCategory("Entity being saved");
            this.addEntityCrashInfo(crashreportcategory);
            throw new ReportedException(crashreport);
        }

 

-TGG

 

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.

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.