Crash when tree falls on player in 1.20
uecasm opened this issue ยท 5 comments
Describe the bug
The game crashes when allowing a Dynamic Tree to fall on the player.
To Reproduce
Steps to reproduce the behavior:
- Chop down a tree.
- Run behind it so that it falls on you.
Screenshots
N/A
Rendering Glitches
Are you using OptiFine (or any equivalent mods that mess with rendering)?
No
Additional context
DT version DynamicTrees-1.20.1-1.3.0-BETA1 (in mod dev environment)
The damage type data appears to be missing.
Crashes
[20:40:25] [Server thread/ERROR] [minecraft/MinecraftServer]: Encountered an unexpected exception
net.minecraft.ReportedException: Ticking entity
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:897) ~[forge-1.20.1-47.1.3_mapped_official_1.20.1-recomp.jar%23191!/:?] {re:classloading,pl:accesstransformer:B}
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:814) ~[forge-1.20.1-47.1.3_mapped_official_1.20.1-recomp.jar%23191!/:?] {re:classloading,pl:accesstransformer:B}
at net.minecraft.client.server.IntegratedServer.tickServer(IntegratedServer.java:89) ~[forge-1.20.1-47.1.3_mapped_official_1.20.1-recomp.jar%23191!/:?] {re:classloading,pl:runtimedistcleaner:A}
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:661) ~[forge-1.20.1-47.1.3_mapped_official_1.20.1-recomp.jar%23191!/:?] {re:classloading,pl:accesstransformer:B}
at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:251) ~[forge-1.20.1-47.1.3_mapped_official_1.20.1-recomp.jar%23191!/:?] {re:classloading,pl:accesstransformer:B}
at java.lang.Thread.run(Thread.java:833) ~[?:?] {}
Caused by: java.lang.IllegalStateException: Missing key in ResourceKey[minecraft:root / minecraft:damage_type]: ResourceKey[minecraft:damage_type / dynamictrees:falling_tree]
at net.minecraft.core.Registry.lambda$getHolderOrThrow$16(Registry.java:162) ~[forge-1.20.1-47.1.3_mapped_official_1.20.1-recomp.jar%23191!/:?] {re:classloading}
at java.util.Optional.orElseThrow(Optional.java:403) ~[?:?] {}
at net.minecraft.core.Registry.getHolderOrThrow(Registry.java:161) ~[forge-1.20.1-47.1.3_mapped_official_1.20.1-recomp.jar%23191!/:?] {re:classloading}
at com.ferreusveritas.dynamictrees.entity.animation.AnimationConstants.treeDamage(AnimationConstants.java:17) ~[DynamicTrees-1.20.1-1.3.0-BETA1_mapped_official_1.20.1.jar%23201!/:1.20.1-1.3.0-BETA1] {re:classloading}
at com.ferreusveritas.dynamictrees.entity.animation.FalloverAnimationHandler.handleMotion(FalloverAnimationHandler.java:157) ~[DynamicTrees-1.20.1-1.3.0-BETA1_mapped_official_1.20.1.jar%23201!/:1.20.1-1.3.0-BETA1] {re:classloading}
at com.ferreusveritas.dynamictrees.entity.FallingTreeEntity.handleMotion(FallingTreeEntity.java:408) ~[DynamicTrees-1.20.1-1.3.0-BETA1_mapped_official_1.20.1.jar%23201!/:1.20.1-1.3.0-BETA1] {re:classloading}
at com.ferreusveritas.dynamictrees.entity.FallingTreeEntity.tick(FallingTreeEntity.java:331) ~[DynamicTrees-1.20.1-1.3.0-BETA1_mapped_official_1.20.1.jar%23201!/:1.20.1-1.3.0-BETA1] {re:classloading}
at net.minecraft.server.level.ServerLevel.tickNonPassenger(ServerLevel.java:693) ~[forge-1.20.1-47.1.3_mapped_official_1.20.1-recomp.jar%23191!/:?] {re:classloading,pl:accesstransformer:B}
at net.minecraft.world.level.Level.guardEntityTick(Level.java:479) ~[forge-1.20.1-47.1.3_mapped_official_1.20.1-recomp.jar%23191!/:?] {re:classloading,pl:accesstransformer:B}
at net.minecraft.server.level.ServerLevel.lambda$tick$6(ServerLevel.java:343) ~[forge-1.20.1-47.1.3_mapped_official_1.20.1-recomp.jar%23191!/:?] {re:classloading,pl:accesstransformer:B}
at net.minecraft.world.level.entity.EntityTickList.forEach(EntityTickList.java:53) ~[forge-1.20.1-47.1.3_mapped_official_1.20.1-recomp.jar%23191!/:?] {re:classloading}
at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:323) ~[forge-1.20.1-47.1.3_mapped_official_1.20.1-recomp.jar%23191!/:?] {re:classloading,pl:accesstransformer:B}
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:893) ~[forge-1.20.1-47.1.3_mapped_official_1.20.1-recomp.jar%23191!/:?] {re:classloading,pl:accesstransformer:B}
... 5 more
Supposedly this is fixed in BETA2 but I haven't tested it yet because the 1.20 builds aren't in the Maven (though at least that seems to be working again now).
Unrelated bugs, but also worth noting from logs:
[Worker-Main-3/ERROR] [minecraft/TagLoader]: Couldn't read tag list dynamictrees:branches_that_burn from dynamictrees:tags/items/branches_that_burn.json in data pack DynamicTrees-1.20.1-1.3.0-BETA1_mapped_official_1.20.1.jar
com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated array at line 10 column 6 path $.values[7]
[Worker-Main-1/ERROR] [ne.mi.co.ForgeHooks/]: Couldn't parse element loot_tables:dynamictrees:blocks/mangrove_leaves
com.google.gson.JsonSyntaxException: Unknown type 'minecraft:alternative'
Also, this version doesn't appear to be in your Maven:
Caused by: org.gradle.api.resources.ResourceException: Could not get resource 'https://harleyoconnor.com/maven/com/ferreusveritas/dynamictrees/DynamicTrees/1.20.1-1.3.0-BETA1/DynamicTrees-1.20.1-1.3.0-BETA1.pom'.
Caused by: org.gradle.api.resources.ResourceException: Could not get resource 'https://harleyoconnor.com/maven/com/ferreusveritas/dynamictrees/DynamicTrees-1.20.1/1.3.0-BETA1/DynamicTrees-1.20.1-1.3.0-BETA1.pom'.
I'm not sure if it was not uploaded or if I'm using the wrong path (though I tried two likely suspects), as your maven also appears to be non-browsable (trying to get a directory listing just shows an Insufficient Permissions error).
I was experiencing the same bug but couldn't figure out what exactly was causing the crash, nice work!