Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Crash/Freezing when loading entities


Slit_bodmod
 Share

Recommended Posts

Hi, I was in the middle of porting my mod to 1.17.1 and when adding the attributes to the entities my game would freeze and produce this crash report:

Quote

[15:54:36] [Server thread/ERROR]: Encountered an unexpected exception
net.minecraft.ReportedException: Sending packet
    at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:887) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:819) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at net.minecraft.client.server.IntegratedServer.tickServer(IntegratedServer.java:85) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:684) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:258) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "p_129593_" is null
    at net.minecraft.network.ConnectionProtocol.getProtocolForPacket(ConnectionProtocol.java:486) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at net.minecraft.network.Connection.sendPacket(Connection.java:179) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at net.minecraft.network.Connection.send(Connection.java:171) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at net.minecraft.server.network.ServerGamePacketListenerImpl.send(ServerGamePacketListenerImpl.java:1058) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at net.minecraft.server.network.ServerGamePacketListenerImpl.send(ServerGamePacketListenerImpl.java:1053) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at net.minecraft.server.level.ServerEntity.sendPairingData(ServerEntity.java:208) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at net.minecraft.server.level.ServerEntity.addPairing(ServerEntity.java:196) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at net.minecraft.server.level.ChunkMap$TrackedEntity.updatePlayer(ChunkMap.java:1160) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at net.minecraft.server.level.ChunkMap$TrackedEntity.updatePlayers(ChunkMap.java:1188) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at net.minecraft.server.level.ChunkMap.addEntity(ChunkMap.java:943) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at net.minecraft.server.level.ServerChunkCache.addEntity(ServerChunkCache.java:441) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at net.minecraft.server.level.ServerLevel$EntityCallbacks.onTrackingStart(ServerLevel.java:1490) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at net.minecraft.server.level.ServerLevel$EntityCallbacks.onTrackingStart(ServerLevel.java:1473) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at net.minecraft.world.level.entity.PersistentEntitySectionManager.startTracking(PersistentEntitySectionManager.java:135) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at net.minecraft.world.level.entity.PersistentEntitySectionManager.addEntityWithoutEvent(PersistentEntitySectionManager.java:98) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at net.minecraft.world.level.entity.PersistentEntitySectionManager.addEntity(PersistentEntitySectionManager.java:81) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at net.minecraft.world.level.entity.PersistentEntitySectionManager.lambda$processPendingLoads$11(PersistentEntitySectionManager.java:259) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[?:?]
    at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762) ~[?:?]
    at net.minecraft.world.level.entity.PersistentEntitySectionManager.processPendingLoads(PersistentEntitySectionManager.java:258) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at net.minecraft.world.level.entity.PersistentEntitySectionManager.tick(PersistentEntitySectionManager.java:267) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:395) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:883) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?]
    ... 5 more
---- Minecraft Crash Report ----
// I just don't know what went wrong :(

Time: 07/12/2021, 15:54
Description: Sending packet

java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "p_129593_" is null
    at net.minecraft.network.ConnectionProtocol.getProtocolForPacket(ConnectionProtocol.java:486) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.network.Connection.sendPacket(Connection.java:179) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.network.Connection.send(Connection.java:171) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.server.network.ServerGamePacketListenerImpl.send(ServerGamePacketListenerImpl.java:1058) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.server.network.ServerGamePacketListenerImpl.send(ServerGamePacketListenerImpl.java:1053) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.server.level.ServerEntity.sendPairingData(ServerEntity.java:208) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.server.level.ServerEntity.addPairing(ServerEntity.java:196) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.server.level.ChunkMap$TrackedEntity.updatePlayer(ChunkMap.java:1160) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.server.level.ChunkMap$TrackedEntity.updatePlayers(ChunkMap.java:1188) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.server.level.ChunkMap.addEntity(ChunkMap.java:943) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.server.level.ServerChunkCache.addEntity(ServerChunkCache.java:441) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.level.ServerLevel$EntityCallbacks.onTrackingStart(ServerLevel.java:1490) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.server.level.ServerLevel$EntityCallbacks.onTrackingStart(ServerLevel.java:1473) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.world.level.entity.PersistentEntitySectionManager.startTracking(PersistentEntitySectionManager.java:135) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.world.level.entity.PersistentEntitySectionManager.addEntityWithoutEvent(PersistentEntitySectionManager.java:98) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.world.level.entity.PersistentEntitySectionManager.addEntity(PersistentEntitySectionManager.java:81) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.world.level.entity.PersistentEntitySectionManager.lambda$processPendingLoads$11(PersistentEntitySectionManager.java:259) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[?:?] {}
    at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762) ~[?:?] {}
    at net.minecraft.world.level.entity.PersistentEntitySectionManager.processPendingLoads(PersistentEntitySectionManager.java:258) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.world.level.entity.PersistentEntitySectionManager.tick(PersistentEntitySectionManager.java:267) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:395) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:883) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:819) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.client.server.IntegratedServer.tickServer(IntegratedServer.java:85) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:684) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:258) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
    at java.lang.Thread.run(Thread.java:831) ~[?:?] {}


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

-- Head --
Thread: Render thread
Stacktrace:
    at net.minecraft.network.ConnectionProtocol.getProtocolForPacket(ConnectionProtocol.java:486) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.network.Connection.sendPacket(Connection.java:179) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.network.Connection.send(Connection.java:171) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
-- Packet being sent --
Details:
    Packet class: ~~ERROR~~ NullPointerException: Cannot invoke "Object.getClass()" because "p_9832_" is null
Stacktrace:
    at net.minecraft.server.network.ServerGamePacketListenerImpl.send(ServerGamePacketListenerImpl.java:1058) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.server.network.ServerGamePacketListenerImpl.send(ServerGamePacketListenerImpl.java:1053) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.server.level.ServerEntity.sendPairingData(ServerEntity.java:208) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.server.level.ServerEntity.addPairing(ServerEntity.java:196) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.server.level.ChunkMap$TrackedEntity.updatePlayer(ChunkMap.java:1160) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.server.level.ChunkMap$TrackedEntity.updatePlayers(ChunkMap.java:1188) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.server.level.ChunkMap.addEntity(ChunkMap.java:943) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.server.level.ServerChunkCache.addEntity(ServerChunkCache.java:441) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.level.ServerLevel$EntityCallbacks.onTrackingStart(ServerLevel.java:1490) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.server.level.ServerLevel$EntityCallbacks.onTrackingStart(ServerLevel.java:1473) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.world.level.entity.PersistentEntitySectionManager.startTracking(PersistentEntitySectionManager.java:135) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.world.level.entity.PersistentEntitySectionManager.addEntityWithoutEvent(PersistentEntitySectionManager.java:98) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.world.level.entity.PersistentEntitySectionManager.addEntity(PersistentEntitySectionManager.java:81) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.world.level.entity.PersistentEntitySectionManager.lambda$processPendingLoads$11(PersistentEntitySectionManager.java:259) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[?:?] {}
    at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762) ~[?:?] {}
    at net.minecraft.world.level.entity.PersistentEntitySectionManager.processPendingLoads(PersistentEntitySectionManager.java:258) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.world.level.entity.PersistentEntitySectionManager.tick(PersistentEntitySectionManager.java:267) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading}
    at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:395) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:accesstransformer:B}


-- Affected level --
Details:
    All players: 1 total; [ServerPlayer['Dev'/65, l='ServerLevel[New World]', x=250.81, y=11.74, z=231.40]]
    Chunk stats: 2340
    Level dimension: minecraft:overworld
    Level spawn location: World: (16,4,176), Section: (at 0,4,0 in 1,0,11; chunk contains blocks 16,0,176 to 31,255,191), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
    Level time: 133518 game time, 3941 day time
    Level name: New World
    Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true
    Level weather: Rain time: 1 (now: false), thunder time: 1 (now: false)
    Known server brands: forge
    Level was modded: true
    Level storage version: 0x04ABD - Anvil
Stacktrace:
    at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:883) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:819) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.client.server.IntegratedServer.tickServer(IntegratedServer.java:85) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:684) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:258) ~[forge-1.17.1-37.1.0_mapped_official_1.17.1.jar%2374!:?] {re:classloading,pl:accesstransformer:B}
    at java.lang.Thread.run(Thread.java:831) ~[?:?] {}


-- System Details --
Details:
    Minecraft Version: 1.17.1
    Minecraft Version ID: 1.17.1
    Operating System: Mac OS X (x86_64) version 10.15.4
    Java Version: 16.0.1, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode, sharing), Oracle Corporation
    Memory: 225463472 bytes (215 MiB) / 1073741824 bytes (1024 MiB) up to 1073741824 bytes (1024 MiB)
    CPUs: 4
    Processor Vendor: GenuineIntel
    Processor Name: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
    Identifier: Intel64 Family 6 Model 58 Stepping 9
    Microarchitecture: Ivy Bridge (Client)
    Frequency (GHz): 2.50
    Number of physical packages: 1
    Number of physical CPUs: 2
    Number of logical CPUs: 4
    Graphics card #0 name: Intel HD Graphics 4000
    Graphics card #0 vendor: Intel
    Graphics card #0 VRAM (MB): 1536.00
    Graphics card #0 deviceId: 0x0166
    Graphics card #0 versionInfo: Revision ID: 0x0009
    Memory slot #0 capacity (MB): 2048.00
    Memory slot #0 clockSpeed (GHz): 1.60
    Memory slot #0 type: DDR3
    Memory slot #1 capacity (MB): 2048.00
    Memory slot #1 clockSpeed (GHz): 1.60
    Memory slot #1 type: DDR3
    Virtual memory max (MB): 8192.00
    Virtual memory used (MB): 6192.04
    Swap memory total (MB): 4096.00
    Swap memory used (MB): 3069.00
    JVM Flags: 1 total; -Xss1M
    Player Count: 1 / 8; [ServerPlayer['Dev'/65, l='ServerLevel[New World]', x=250.81, y=11.74, z=231.40]]
    Data Packs: vanilla, mod:lotb (incompatible), mod:forge
    Type: Integrated Server (map_client.txt)
    Is Modded: Definitely; Client brand changed to 'forge'
    ModLauncher: 9.0.7+91+master.8569cdf
    ModLauncher launch target: forgeclientuserdev
    ModLauncher naming: mcp
    ModLauncher services: 
         mixin PLUGINSERVICE 
         eventbus PLUGINSERVICE 
         object_holder_definalize PLUGINSERVICE 
         runtime_enum_extender PLUGINSERVICE 
         capability_token_subclass PLUGINSERVICE 
         capability_inject_definalize PLUGINSERVICE 
         accesstransformer PLUGINSERVICE 
         runtimedistcleaner PLUGINSERVICE 
         mixin TRANSFORMATIONSERVICE 
         fml TRANSFORMATIONSERVICE 
    FML Language Providers: 
        minecraft@1.0
        javafml@null
    Mod List: 
        forge-1.17.1-37.1.0_mapped_official_1.17.1.jar    |Minecraft                     |minecraft                     |1.17.1              |DONE      |Manifest: a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f
        resources                                         |Lord Of The Blocks Mod        |lotb                          |0.0NONE             |DONE      |Manifest: NOSIGNATURE
                                                          |Forge                         |forge                         |37.1.0              |DONE      |Manifest: NOSIGNATURE
    Crash Report UUID: 5c4d99fd-0bb2-484a-8699-30af0d2e2550
    FML: 37.1
    Forge: net.minecraftforge:37.1.0
#@!@# Game crashed! Crash report saved to: #@!@# ./crash-reports/crash-2021-12-07_15.54.36-server.txt

Process finished with exit code 137 (interrupted by signal 9: SIGKILL)

I found it very difficult to actually begin working out where the source of the problem is and was wondering if anyone could help me track it down, the github for the latest sourcecode is currently https://github.com/slit-bodmod/LordOfTheBlocks if you want to have a look, or if you could just point me in the right direction, idk

Link to comment
Share on other sites

Cloned your repository. Badger and deer failed to summon because you have not registered their attribute, with a completely different error that you have shown.

Your attributes are not registered, because EntityAttributeCreationEvent is a mod bus event, but you registered the class to the forge bus. Additionally the 2nd event handler in that class (onEntityConstructed) will also not run, because you register the class to the event bus, but the method is not static.

Link to comment
Share on other sites

3 hours ago, diesieben07 said:

Cloned your repository. Badger and deer failed to summon because you have not registered their attribute, with a completely different error that you have shown.

Ah thankyou, yeah sometimes when it's not clear on the stacktrace where the problem started because of nullptrs or lambdas or something I find it quite difficult to work out where to look. Is this what caused the crash and can I simply fix it by adding something like:

modEventBus.addListener(EntityAISetupManager::addEntityAttributes);

to my LotbMod constructor

Link to comment
Share on other sites

hmm, I'm still getting a crash that looks like this:

Quote

[12:56:44] [Worker-Main-4/ERROR] [ne.mi.ev.EventBus/EVENTBUS]: Exception caught during firing event: Cannot invoke "net.minecraft.world.entity.ai.attributes.AttributeMap.getValue(net.minecraft.world.entity.ai.attributes.Attribute)" because the return value of "net.minecraft.world.entity.LivingEntity.getAttributes()" is null
    Index: 1
    Listeners:
        0: NORMAL
        1: ASM: class lotb.common.entities.ai.EntityAISetupManager onEntityConstructed(Lnet/minecraftforge/event/entity/EntityEvent$EntityConstructing;)V
java.lang.NullPointerException: Cannot invoke "net.minecraft.world.entity.ai.attributes.AttributeMap.getValue(net.minecraft.world.entity.ai.attributes.Attribute)" because the return value of "net.minecraft.world.entity.LivingEntity.getAttributes()" is null
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.LivingEntity.getAttributeValue(LivingEntity.java:1806)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.ai.goal.target.TargetGoal.getFollowDistance(TargetGoal.java:77)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal.<init>(NearestAttackableTargetGoal.java:35)
    at TRANSFORMER/lotb@0.0NONE/lotb.common.entities.ai.EntityAISetupManager.onEntityConstructed(EntityAISetupManager.java:31)
    at net.minecraftforge.eventbus.ASMEventHandler_1_EntityAISetupManager_onEntityConstructed_EntityConstructing.invoke(.dynamic)
    at MC-BOOTSTRAP/eventbus@5.0.3/net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85)
    at MC-BOOTSTRAP/eventbus@5.0.3/net.minecraftforge.eventbus.EventBus.post(EventBus.java:302)
    at MC-BOOTSTRAP/eventbus@5.0.3/net.minecraftforge.eventbus.EventBus.post(EventBus.java:283)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.Entity.<init>(Entity.java:247)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.LivingEntity.<init>(LivingEntity.java:228)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.Mob.<init>(Mob.java:112)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.PathfinderMob.<init>(PathfinderMob.java:12)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.AgeableMob.<init>(AgeableMob.java:28)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.animal.Animal.<init>(Animal.java:37)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.TamableAnimal.<init>(TamableAnimal.java:29)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.animal.Cat.<init>(Cat.java:116)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.EntityType.create(EntityType.java:460)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.EntityType.lambda$create$1(EntityType.java:470)
    at java.base/java.util.Optional.map(Optional.java:260)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.entity.EntityType.create(EntityType.java:469)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.createEntityIgnoreException(StructureTemplate.java:442)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.addEntitiesToWorld(StructureTemplate.java:425)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.placeInWorld(StructureTemplate.java:343)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.level.levelgen.feature.structures.SinglePoolElement.place(SinglePoolElement.java:112)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.level.levelgen.structure.PoolElementStructurePiece.place(PoolElementStructurePiece.java:88)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.level.levelgen.structure.PoolElementStructurePiece.postProcess(PoolElementStructurePiece.java:84)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.level.levelgen.structure.StructureStart.placeInChunk(StructureStart.java:87)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.level.biome.Biome.lambda$generate$21(Biome.java:244)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
    at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
    at java.base/java.util.PrimitiveIterator$OfLong.forEachRemaining(PrimitiveIterator.java:189)
    at MC-BOOTSTRAP/it.unimi.dsi.fastutil@8.2.1/it.unimi.dsi.fastutil.longs.LongIterator.forEachRemaining(LongIterator.java:53)
    at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
    at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
    at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.level.biome.Biome.generate(Biome.java:243)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.level.chunk.ChunkGenerator.applyBiomeDecoration(ChunkGenerator.java:245)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.level.chunk.ChunkStatus.lambda$static$10(ChunkStatus.java:87)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.world.level.chunk.ChunkStatus.generate(ChunkStatus.java:208)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.server.level.ChunkMap.lambda$scheduleChunkGeneration$18(ChunkMap.java:517)
    at MC-BOOTSTRAP/datafixerupper@4.0.26/com.mojang.datafixers.util.Either$Left.map(Either.java:38)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.server.level.ChunkMap.lambda$scheduleChunkGeneration$20(ChunkMap.java:515)
    at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1146)
    at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.server.level.ChunkTaskPriorityQueueSorter.lambda$message$1(ChunkTaskPriorityQueueSorter.java:58)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.util.thread.ProcessorMailbox.pollTask(ProcessorMailbox.java:91)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.util.thread.ProcessorMailbox.pollUntil(ProcessorMailbox.java:146)
    at TRANSFORMER/minecraft@1.17.1/net.minecraft.util.thread.ProcessorMailbox.run(ProcessorMailbox.java:102)
    at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1434)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:295)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1016)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1665)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1598)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
 

I can't figure out why the getAttributes would return null as it just returns the attributes field which is final and should always be set upon construction.

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
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.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Hi, I have enchantment named "Stun" that can be applied to weapon and that has 3 levels: Level 1 - 10% chance to stun mob for 1 sec Level 2 - 20% chance to stun mob for 2 secs Level 3 - 30% chance to stun mob for 3 secs Plan is to apply MobEffect named StunnedMobEffect on doPostAttack in enchantment. StunnedMobEffect should have variable duration based on the level of enchantment that was applied on weapon. I am trying to find an example on how to do the following: How can I set duration of effect dynamically? How can I track whether duration has expired? I have found these two methods that can be overriden:   public void applyEffectTick(LivingEntity pLivingEntity, int pAmplifier) { public boolean isDurationEffectTick(int pDuration, int pAmplifier) { But looking at the source code of MobEffect class, I can't figure out what pAmplifier is? Any hints / samples on this would be appreciated.          
    • 2022-01-22 07:41:00,800 main WARN Advanced terminal features are not available in this environment [07:41:00] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmlserver, --fml.forgeVersion, 36.2.23, --fml.mcpVersion, 20210115.111550, --fml.mcVersion, 1.16.5, --fml.forgeGroup, net.minecraftforge, nogui] [07:41:00] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 8.0.9+86+master.3cf110c starting: java version 17.0.2 by Oracle Corporation Exception in thread "main" java.lang.IllegalAccessError: class cpw.mods.modlauncher.SecureJarHandler (in unnamed module @0x7ff95560) cannot access class sun.security.util.ManifestEntryVerifier (in module java.base) because module java.base does not export sun.security.util to unnamed module @0x7ff95560         at cpw.mods.modlauncher.SecureJarHandler.lambda$static$1(SecureJarHandler.java:41)         at cpw.mods.modlauncher.api.LamdbaExceptionUtils.uncheck(LamdbaExceptionUtils.java:95)         at cpw.mods.modlauncher.SecureJarHandler.<clinit>(SecureJarHandler.java:41)         at cpw.mods.modlauncher.Launcher.lambda$new$6(Launcher.java:55)         at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)         at cpw.mods.modlauncher.api.TypesafeMap.computeIfAbsent(TypesafeMap.java:52)         at cpw.mods.modlauncher.api.TypesafeMap.computeIfAbsent(TypesafeMap.java:47)         at cpw.mods.modlauncher.Environment.computePropertyIfAbsent(Environment.java:62)         at cpw.mods.modlauncher.Launcher.<init>(Launcher.java:55)         at cpw.mods.modlauncher.Launcher.main(Launcher.java:66)         at net.minecraftforge.server.ServerMain$Runner.runLauncher(ServerMain.java:63)         at net.minecraftforge.server.ServerMain$Runner.access$100(ServerMain.java:60)         at net.minecraftforge.server.ServerMain.main(ServerMain.java:57) i have the same how do i fix it  
    • Hi, I'm facing an issue that a custom datapack is always loaded before the mod's datapack. Means the users/players are not able to override mod's configurations/data at all. I've tried to alternate the order of datapack by using the /datapack commands, however the actual loading order does not change at all. (I can confirm that both datapacks are working as usual by disabling one of them at a time, the correspond data is loaded correctly), is it the mod's problem or...? Thanks.
    • I'm trying to play a custom modpack with a few dozen mods, but when I try to create a world it hits 100% and then crashes and I can't figure out why. Here's the crash log:  
    • I already created a github account to upload the debug logs but i dont know where to find them also when it disconnects it say something like io.netty.util.illegalreferencecountexception
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.