Jump to content

[1.7] World crashes on save after I added NBT


david476

Recommended Posts

That says it! Here is my entity file and console after the crash. The entity was working fine before I tried to add NBT.

 

package com.DEBmods.modularships;

import net.minecraft.entity.Entity;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;

public class EntityShipBlock extends Entity{
int controllerid;

public int Xoff;
public int Yoff;
public int Zoff;

public EntityShipBlock(World par1World) {
	super(par1World);
}

public boolean canBePushed()
    {
        return false;
    }

@Override
protected void entityInit() {
}

@Override
protected void readEntityFromNBT(NBTTagCompound var1) {
	var1.getInteger("controllerid");
}

@Override
protected void writeEntityToNBT(NBTTagCompound var1) {
	var1.setInteger("controllerid", this.controllerid);
}

public Entity getController() {
	return this.worldObj.getEntityByID(this.controllerid);
}

//STUFF FOR onUpdate ONLY!!!
public void onUpdate() {
	//Sets up controller files
	/*if (this.controller == null) {
		controller = this.worldObj.getEntityByID(this.controllerid);
	}*/

	//Updates rotation based on the controller
	if (this.getController() != null) {
		this.setRotation(this.getController().rotationYaw, this.getController().rotationPitch);
	}
}
}

 

07:40:01] [server thread/INFO]: Saving and pausing game...
[07:40:09] [server thread/ERROR]: Encountered an unexpected exception
java.lang.NoClassDefFoundError: net/minecraft/entity/Entity$1
at net.minecraft.entity.Entity.addEntityCrashInfo(Entity.java:2463) ~[Entity.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1578) ~[Entity.class:?]
at net.minecraft.server.integrated.IntegratedPlayerList.writePlayerData(IntegratedPlayerList.java:35) ~[integratedPlayerList.class:?]
at net.minecraft.server.management.ServerConfigurationManager.saveAllPlayerData(ServerConfigurationManager.java:915) ~[serverConfigurationManager.class:?]
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:112) ~[integratedServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:742) [MinecraftServer$2.class:?]
[07:40:09] [server thread/ERROR]: This crash report has been saved to: C:\Users\DEB\Desktop\forge-1.7.2-10.12.1.1060 Advanced\Forge\.\crash-reports\crash-2014-04-25_07.40.09-server.txt
[07:40:09] [server thread/INFO]: Stopping server
[07:40:09] [server thread/INFO]: Saving players
[07:40:16] [server thread/ERROR]: Exception stopping the server
java.lang.NoClassDefFoundError: net/minecraft/entity/Entity$1
at net.minecraft.entity.Entity.addEntityCrashInfo(Entity.java:2463) ~[Entity.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1578) ~[Entity.class:?]
at net.minecraft.server.integrated.IntegratedPlayerList.writePlayerData(IntegratedPlayerList.java:35) ~[integratedPlayerList.class:?]
at net.minecraft.server.management.ServerConfigurationManager.saveAllPlayerData(ServerConfigurationManager.java:915) ~[serverConfigurationManager.class:?]
at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:398) ~[MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.stopServer(IntegratedServer.java:255) ~[integratedServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:531) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:742) [MinecraftServer$2.class:?]
[07:40:16] [server thread/INFO] [FML]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded.
---- Minecraft Crash Report ----
// This doesn't make any sense!

Time: 4/25/14 7:40 AM
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.server.integrated.IntegratedPlayerList.writePlayerData(IntegratedPlayerList.java:35)
at net.minecraft.server.management.ServerConfigurationManager.saveAllPlayerData(ServerConfigurationManager.java:915)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:112)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:742)


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

-- System Details --
Details:
Minecraft Version: 1.7.2
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.7.0_51, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 387983336 bytes (370 MB) / 811073536 bytes (773 MB) up to 1905262592 bytes (1817 MB)
JVM Flags: 0 total; 
AABB Pool Size: 2705 (151480 bytes; 0 MB) allocated, 2439 (136584 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.01-pre FML v7.2.156.1060 Minecraft Forge 10.12.1.1060 5 mods loaded, 5 mods active
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
FML{7.2.156.1060} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.1.1060.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Forge{10.12.1.1060} [Minecraft Forge] (forgeSrc-1.7.2-10.12.1.1060.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
examplemod{1.0} [Example Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
deb_modularships{1.0} [deb_modularships] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Profiler Position: N/A (disabled)
Vec3 Pool Size: 333 (18648 bytes; 0 MB) allocated, 273 (15288 bytes; 0 MB) used
Player Count: 1 / 8; [EntityPlayerMP['Player463'/121, l='test 1-', x=1379.50, y=6.35, z=-944.50]]
Type: Integrated Server (map_client.txt)
Is Modded: Definitely; Client brand changed to 'fml,forge'
#@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2014-04-25_07.40.09-server.txt
AL lib: (EE) alc_cleanup: 1 device not closed

Link to comment
Share on other sites

In your update method, you are trying to get the controller using the controllerId which is one if it isn't initialized, so if the entity with entityID 0 doesn't exists, it crashes.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

Now it crashes when I create the entity.

 

new code:

package com.DEBmods.modularships;

import net.minecraft.entity.Entity;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;

public class EntityShipBlock extends Entity{
int controllerid;

public int Xoff;
public int Yoff;
public int Zoff;

public EntityShipBlock(World par1World) {
	super(par1World);
}

public boolean canBePushed()
    {
        return false;
    }

@Override
protected void entityInit() {
}

@Override
protected void readEntityFromNBT(NBTTagCompound var1) {
	this.controllerid = var1.getInteger("controllerid");
}

@Override
protected void writeEntityToNBT(NBTTagCompound var1) {
	var1.setInteger("controllerid", this.controllerid);
}

public Entity getController() {
	return this.worldObj.getEntityByID(this.controllerid);
}

//STUFF FOR onUpdate ONLY!!!
public void onUpdate() {
	//Sets up controller files
	/*if (this.controller == null) {
		controller = this.worldObj.getEntityByID(this.controllerid);
	}*/

	//Updates rotation based on the controller
	if (this.controllerid > 1) {
		this.setRotation(this.getController().rotationYaw, this.getController().rotationPitch);
	}
}
}

 

new crash report:

 

at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
at com.DEBmods.modularships.EntityShipControl.writeEntityToNBT(EntityShipControl.java:43) ~[EntityShipControl.class:?]
at net.minecraft.entity.Entity.writeToNBT(Entity.java:1562) ~[Entity.class:?]
[15:52:30] [Client thread/FATAL]: Reported exception thrown!
net.minecraft.util.ReportedException: Ticking entity
at net.minecraft.world.World.updateEntities(World.java:2079) ~[World.class:?]
at net.minecraft.client.Minecraft.runTick(Minecraft.java:2062) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:994) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:910) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
Caused by: java.lang.NullPointerException
at com.DEBmods.modularships.EntityShipBlock.onUpdate(EntityShipBlock.java:50) ~[EntityShipBlock.class:?]
at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2254) ~[World.class:?]
at net.minecraft.world.World.updateEntity(World.java:2214) ~[World.class:?]
at net.minecraft.world.World.updateEntities(World.java:2064) ~[World.class:?]
... 10 more
---- Minecraft Crash Report ----
// Don't be sad, have a hug! <3

Time: 4/25/14 3:52 PM
Description: Ticking entity

java.lang.NullPointerException: Ticking entity
at com.DEBmods.modularships.EntityShipBlock.onUpdate(EntityShipBlock.java:50)
at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2254)
at net.minecraft.world.World.updateEntity(World.java:2214)
at net.minecraft.world.World.updateEntities(World.java:2064)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:2062)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:994)
at net.minecraft.client.Minecraft.run(Minecraft.java:910)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)


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

-- Head --
Stacktrace:
at com.DEBmods.modularships.EntityShipBlock.onUpdate(EntityShipBlock.java:50)
at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2254)
at net.minecraft.world.World.updateEntity(World.java:2214)

-- Entity being ticked --
Details:
Entity Type: entityshipblock (com.DEBmods.modularships.EntityShipBlock)
Entity ID: 27352
Entity Name: entity.entityshipblock.name
Entity's Exact location: 1378.50, 5.50, -945.50
Entity's Block location: World: (1378,5,-946), Chunk: (at 2,0,14 in 86,-60; contains blocks 1376,0,-960 to 1391,255,-945), Region: (2,-2; contains chunks 64,-64 to 95,-33, blocks 1024,0,-1024 to 1535,255,-513)
Entity's Momentum: 0.00, 0.00, 0.00
Stacktrace:
at net.minecraft.world.World.updateEntities(World.java:2064)

-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityClientPlayerMP['Player481'/121, l='MpServer', x=1378.50, y=7.97, z=-944.50]]
Chunk stats: MultiplayerChunkCache: 225, 225
Level seed: 0
Level generator: ID 01 - flat, ver 0. Features enabled: false
Level generator options: 
Level spawn location: World: (1389,4,-955), Chunk: (at 13,0,5 in 86,-60; contains blocks 1376,0,-960 to 1391,255,-945), Region: (2,-2; contains chunks 64,-64 to 95,-33, blocks 1024,0,-1024 to 1535,255,-513)
Level time: 2931 game time, 2931 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
Forced entities: 59 total; [EntityClientPlayerMP['Player481'/121, l='MpServer', x=1378.50, y=7.97, z=-944.50], EntitySlime['Slime'/2195, l='MpServer', x=1446.53, y=4.32, z=-941.19], EntityShipBlock['entity.entityshipblock.name'/27352, l='MpServer', x=1378.50, y=5.50, z=-945.50], EntitySlime['Slime'/36, l='MpServer', x=1301.93, y=4.95, z=-1014.49], EntitySlime['Slime'/37, l='MpServer', x=1311.66, y=4.00, z=-966.94], EntitySlime['Slime'/41, l='MpServer', x=1308.94, y=4.00, z=-864.28], EntityPig['Pig'/46, l='MpServer', x=1327.47, y=4.00, z=-998.85], EntitySheep['Sheep'/47, l='MpServer', x=1323.78, y=4.00, z=-977.64], EntityChicken['Chicken'/51, l='MpServer', x=1326.63, y=4.00, z=-957.41], EntitySheep['Sheep'/50, l='MpServer', x=1321.03, y=4.00, z=-954.91], EntityChicken['Chicken'/49, l='MpServer', x=1321.19, y=4.00, z=-955.78], EntityPig['Pig'/48, l='MpServer', x=1318.13, y=4.00, z=-987.72], EntitySheep['Sheep'/55, l='MpServer', x=1326.19, y=4.00, z=-938.41], EntitySheep['Sheep'/54, l='MpServer', x=1325.94, y=4.00, z=-941.41], EntityChicken['Chicken'/53, l='MpServer', x=1316.63, y=4.00, z=-934.38], EntitySheep['Sheep'/52, l='MpServer', x=1325.97, y=4.00, z=-936.78], EntitySlime['Slime'/58, l='MpServer', x=1324.50, y=4.00, z=-921.03], EntitySlime['Slime'/57, l='MpServer', x=1311.08, y=4.00, z=-928.69], EntitySheep['Sheep'/56, l='MpServer', x=1327.22, y=4.00, z=-936.97], EntityPig['Pig'/63, l='MpServer', x=1334.72, y=4.00, z=-993.50], EntityShipControl['entity.entityshipcontrol.name'/27330, l='MpServer', x=1378.50, y=5.50, z=-944.50], EntitySlime['Slime'/62, l='MpServer', x=1326.06, y=4.00, z=-1011.16], EntitySheep['Sheep'/68, l='MpServer', x=1329.81, y=4.00, z=-982.31], EntitySheep['Sheep'/69, l='MpServer', x=1331.59, y=4.00, z=-985.50], EntitySheep['Sheep'/70, l='MpServer', x=1332.16, y=4.00, z=-981.81], EntityPig['Pig'/71, l='MpServer', x=1334.06, y=4.00, z=-990.53], EntitySlime['Slime'/23968, l='MpServer', x=1431.60, y=4.00, z=-901.40], EntityPig['Pig'/64, l='MpServer', x=1333.50, y=4.00, z=-986.50], EntityPig['Pig'/65, l='MpServer', x=1338.74, y=4.00, z=-980.22], EntityPig['Pig'/66, l='MpServer', x=1335.44, y=4.00, z=-980.84], EntityPig['Pig'/67, l='MpServer', x=1331.38, y=4.00, z=-977.13], EntitySheep['Sheep'/76, l='MpServer', x=1338.53, y=4.00, z=-939.84], EntitySlime['Slime'/79, l='MpServer', x=1354.04, y=4.00, z=-963.03], EntitySheep['Sheep'/72, l='MpServer', x=1325.39, y=4.00, z=-953.65], EntityChicken['Chicken'/73, l='MpServer', x=1334.63, y=4.00, z=-953.41], EntitySlime['Slime'/74, l='MpServer', x=1346.61, y=5.06, z=-948.59], EntitySheep['Sheep'/75, l='MpServer', x=1342.79, y=4.00, z=-941.69], EntitySlime['Slime'/87, l='MpServer', x=1367.43, y=5.01, z=-1015.19], EntitySlime['Slime'/81, l='MpServer', x=1341.52, y=4.00, z=-917.50], EntitySlime['Slime'/80, l='MpServer', x=1349.73, y=4.00, z=-960.66], EntitySlime['Slime'/83, l='MpServer', x=1358.84, y=4.00, z=-887.38], EntitySlime['Slime'/82, l='MpServer', x=1343.63, y=4.69, z=-894.84], EntityCow['Cow'/93, l='MpServer', x=1365.13, y=4.00, z=-900.91], EntitySlime['Slime'/92, l='MpServer', x=1364.66, y=4.00, z=-912.13], EntityHorse['Horse'/95, l='MpServer', x=1367.50, y=4.00, z=-903.50], EntityCow['Cow'/94, l='MpServer', x=1370.75, y=4.00, z=-899.34], EntitySlime['Slime'/89, l='MpServer', x=1367.21, y=4.32, z=-982.68], EntitySlime['Slime'/88, l='MpServer', x=1368.76, y=4.82, z=-1001.99], EntitySlime['Slime'/91, l='MpServer', x=1380.24, y=4.00, z=-911.94], EntitySlime['Slime'/90, l='MpServer', x=1370.69, y=4.00, z=-978.22], EntityCow['Cow'/100, l='MpServer', x=1363.81, y=4.00, z=-890.84], EntitySheep['Sheep'/98, l='MpServer', x=1363.41, y=4.00, z=-895.13], EntitySheep['Sheep'/99, l='MpServer', x=1374.72, y=4.00, z=-889.56], EntitySlime['Slime'/96, l='MpServer', x=1368.06, y=4.00, z=-909.88], EntityCow['Cow'/97, l='MpServer', x=1362.38, y=4.00, z=-894.03], EntitySlime['Slime'/117, l='MpServer', x=1429.88, y=5.00, z=-963.84], EntitySlime['Slime'/116, l='MpServer', x=1440.06, y=4.00, z=-999.66], EntitySlime['Slime'/115, l='MpServer', x=1392.84, y=4.00, z=-970.65], EntitySlime['Slime'/13937, l='MpServer', x=1392.28, y=4.00, z=-986.72]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:412)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2521)
at net.minecraft.client.Minecraft.run(Minecraft.java:932)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

-- System Details --
Details:
Minecraft Version: 1.7.2
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.7.0_51, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 441762120 bytes (421 MB) / 557842432 bytes (532 MB) up to 1905262592 bytes (1817 MB)
JVM Flags: 0 total; 
AABB Pool Size: 20003 (1120168 bytes; 1 MB) allocated, 1069 (59864 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.01-pre FML v7.2.156.1060 Minecraft Forge 10.12.1.1060 5 mods loaded, 5 mods active
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
FML{7.2.156.1060} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.1.1060.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Forge{10.12.1.1060} [Minecraft Forge] (forgeSrc-1.7.2-10.12.1.1060.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
examplemod{1.0} [Example Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
deb_modularships{1.0} [deb_modularships] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Launched Version: 1.6
LWJGL: 2.9.0
OpenGL: GeForce GTX 550 Ti/PCIe/SSE2 GL version 4.4.0, NVIDIA Corporation
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: []
Current Language: ~~ERROR~~ NullPointerException: null
Profiler Position: N/A (disabled)
Vec3 Pool Size: 361 (20216 bytes; 0 MB) allocated, 132 (7392 bytes; 0 MB) used
Anisotropic Filtering: Off (1)
#@!@# Game crashed! Crash report saved to: #@!@# C:\Users\DEB\Desktop\forge-1.7.2-10.12.1.1060 Advanced\Forge\.\crash-reports\crash-2014-04-25_15.52.30-client.txt
AL lib: (EE) alc_cleanup: 1 device not closed

Link to comment
Share on other sites

Try pre-declaring the variables. If the controllerid is not declared, it's assumed to be null. It seems you have the solution in the current code, but you commented it out.

if (user.hasKnowledgeOfJava) {

    if (user.question.hasCode) {

        return interpetHelpfulResponse(user.getQuestion());

    } else {

        return "Could you post your code please?";

    }

} else {

    return "Learn some freaking Java!";

}

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Here's the newest crash: https://pastebin.com/mumDeWzW Seems to have something to do with JEI Also delete that server file? Also the newest log: https://pastebin.com/ATH8dbWc
    • Recently started to attempt 1.20.1 modding, in registering idle, walk and attack animations in the mob entity class i've run into two issues:   a) idle and walk animations seem to play simultaneously  + the mob itself does not seem to walk private static final EntityDataAccessor<Boolean> ATTACKING = SynchedEntityData.defineId(MugaEntity.class, EntityDataSerializers.BOOLEAN); public MugaEntity(EntityType<? extends Monster > pEntityType, Level pLevel) { super(pEntityType, pLevel); } public final AnimationState idleAnimationState = new AnimationState(); private int idleAnimationTimeout = 1; public final AnimationState attackAnimationState = new AnimationState(); public int attackAnimationTimeout = 0; @Override public void tick() { super.tick(); if(this.level().isClientSide()) { setupAnimationStates(); } } private void setupAnimationStates () { if(this.idleAnimationTimeout <= 0) { this.idleAnimationTimeout = this.random.nextInt(30) + 60; this.idleAnimationState.start(this.tickCount); } else { --this.idleAnimationTimeout; } if (this.isAttacking() && attackAnimationTimeout <= 0 ) { attackAnimationTimeout = 20; attackAnimationState.start(this.tickCount); } else { --this.attackAnimationTimeout; } if(this.isAttacking()) { attackAnimationState.stop(); } } @Override protected void updateWalkAnimation(float pPartialTick) { float f; if(this.getPose() == Pose.STANDING) { f=Math.min(pPartialTick * 3.0F, 1.0F); } else { f= 0.0F; } this.walkAnimation.update(f, 0.2F); } @Override protected void defineSynchedData() { super.defineSynchedData(); this.entityData.define(ATTACKING, false); } public void setAttacking(boolean attacking) { this.entityData.set(ATTACKING, attacking); } public boolean isAttacking() { return this.entityData.get(ATTACKING); } b) the attack animation is never played on attack, despite being registered  @Override public void setupAnim(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch) { this.root().getAllParts().forEach(ModelPart::resetPose); this.animateWalk(ModAnimationDefinitions.MUGA_WALKING, limbSwing, limbSwingAmount, 1f, 1f ); this.animate(((MugaEntity)entity).idleAnimationState, ModAnimationDefinitions.MUGA_IDLE, ageInTicks, 1f); this.animate(((MugaEntity)entity).attackAnimationState, ModAnimationDefinitions.MUGA_ATTACK, ageInTicks, 1f); }
    • Maybe there are some more broken files - check the new crash-report - the file name is mentioned in the first lines   If it is another crash, add it here
    • Thanks. Found and deleted it, but it doesn't change anything. When joining a new file is created, the screen freezes/ does not respond in typical manner and I have to close it then. I deleted it in curseforge>minecraft>instances>Modpack>saves>World>serverconfig Should I have deleted it anywhere else?
  • Topics

×
×
  • Create New...

Important Information

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