ToroHealth Damage Indicators

ToroHealth Damage Indicators

21M Downloads

Instant crash when damaging an entity with a modified "movement speed" attribute, if "showEntity": true

lwsx opened this issue ยท 2 comments

commented

How to reproduce:

  1. Modify an entity's base movement speed attribute
  2. Hit them with anything
  3. Game crashes

This same bug might've been around back in September of last year, I remember my and my friends' games' randomly crashing with the mod installed.

If "showEntity" is set to "false" in the config file, the crash doensn't seem to happen.

I don't think the speed potion effect can cause the crash or whether all other attributes affect it.
The summoned entity had:
Attributes:[{Name:"generic.armor",Base:8f},{Name:"generic.max_health",Base:30f},{Name:"generic.movement_speed",Base:0.1f},{Name:"generic.follow_range",Base:16f}]

Here is a crash log from the latest one:

[18:06:20] [Render thread/INFO]: Stopping worker threads
[18:06:20] [Render thread/FATAL]: Reported exception thrown!
net.minecraft.class_148: Rendering entity in world
	at net.minecraft.class_898.method_3954(class_898.java:166) ~[intermediary-minecraft-1.17.1-client.jar:?]
	at net.torocraft.torohealth.display.EntityDisplay.lambda$drawEntity$0(EntityDisplay.java:106) ~[torohealth-1.17.1-fabric-9.jar:?]
	at com.mojang.blaze3d.systems.RenderSystem.runAsFancy(RenderSystem.java:1119) ~[intermediary-minecraft-1.17.1-client.jar:?]
	at net.torocraft.torohealth.display.EntityDisplay.drawEntity(EntityDisplay.java:105) ~[torohealth-1.17.1-fabric-9.jar:?]
	at net.torocraft.torohealth.display.EntityDisplay.draw(EntityDisplay.java:37) ~[torohealth-1.17.1-fabric-9.jar:?]
	at net.torocraft.torohealth.display.Hud.draw(Hud.java:118) ~[torohealth-1.17.1-fabric-9.jar:?]
	at net.torocraft.torohealth.display.Hud.draw(Hud.java:39) ~[torohealth-1.17.1-fabric-9.jar:?]
	at net.minecraft.class_329.handler$zpc001$render(class_329.java:3975) ~[intermediary-minecraft-1.17.1-client.jar:?]
	at net.minecraft.class_329.method_1753(class_329.java:406) ~[intermediary-minecraft-1.17.1-client.jar:?]
	at net.minecraft.class_757.method_3192(class_757.java:855) ~[intermediary-minecraft-1.17.1-client.jar:?]
	at net.minecraft.class_310.method_1523(class_310.java:1112) ~[intermediary-minecraft-1.17.1-client.jar:?]
	at net.minecraft.class_310.method_1514(class_310.java:728) [intermediary-minecraft-1.17.1-client.jar:?]
	at net.minecraft.client.main.Main.main(Main.java:217) [intermediary-minecraft-1.17.1-client.jar:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]
	at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:234) [fabric-loader-0.11.6.jar:?]
	at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:153) [fabric-loader-0.11.6.jar:?]
	at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28) [fabric-loader-0.11.6.jar:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]
	at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196) [NewLaunch.jar:?]
	at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231) [NewLaunch.jar:?]
	at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?]
	at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?]
Caused by: java.lang.IllegalArgumentException: Duplicate delegates
	at net.minecraft.class_4720$class_4589.<init>(class_4720.java:29) ~[intermediary-minecraft-1.17.1-client.jar:?]
	at net.minecraft.class_4720.method_24037(class_4720.java:15) ~[intermediary-minecraft-1.17.1-client.jar:?]
	at net.minecraft.class_918.method_29711(class_918.java:218) ~[intermediary-minecraft-1.17.1-client.jar:?]
	at net.minecraft.class_918.method_23179(class_918.java:164) ~[intermediary-minecraft-1.17.1-client.jar:?]
	at net.minecraft.class_918.method_23177(class_918.java:273) ~[intermediary-minecraft-1.17.1-client.jar:?]
	at net.minecraft.class_759.method_3233(class_759.java:163) ~[intermediary-minecraft-1.17.1-client.jar:?]
	at net.minecraft.class_989.method_4192(class_989.java:61) ~[intermediary-minecraft-1.17.1-client.jar:?]
	at net.minecraft.class_989.method_17162(class_989.java:39) ~[intermediary-minecraft-1.17.1-client.jar:?]
	at net.minecraft.class_989.method_4199(class_989.java:15) ~[intermediary-minecraft-1.17.1-client.jar:?]
	at net.minecraft.class_922.method_4054(class_922.java:139) ~[intermediary-minecraft-1.17.1-client.jar:?]
	at net.minecraft.class_927.method_4072(class_927.java:45) ~[intermediary-minecraft-1.17.1-client.jar:?]
	at net.minecraft.class_927.method_3936(class_927.java:18) ~[intermediary-minecraft-1.17.1-client.jar:?]
	at net.minecraft.class_898.method_3954(class_898.java:135) ~[intermediary-minecraft-1.17.1-client.jar:?]
	... 27 more
---- Minecraft Crash Report ----
// Shall we play a game?

Time: 23/07/2021, 18.06
Description: Rendering entity in world

java.lang.IllegalArgumentException: Duplicate delegates
	at net.minecraft.class_4720$class_4589.<init>(class_4720.java:29)
	at net.minecraft.class_4720.method_24037(class_4720.java:15)
	at net.minecraft.class_918.method_29711(class_918.java:218)
	at net.minecraft.class_918.method_23179(class_918.java:164)
	at net.minecraft.class_918.method_23177(class_918.java:273)
	at net.minecraft.class_759.method_3233(class_759.java:163)
	at net.minecraft.class_989.method_4192(class_989.java:61)
	at net.minecraft.class_989.method_17162(class_989.java:39)
	at net.minecraft.class_989.method_4199(class_989.java:15)
	at net.minecraft.class_922.method_4054(class_922.java:139)
	at net.minecraft.class_927.method_4072(class_927.java:45)
	at net.minecraft.class_927.method_3936(class_927.java:18)
	at net.minecraft.class_898.method_3954(class_898.java:135)
	at net.torocraft.torohealth.display.EntityDisplay.lambda$drawEntity$0(EntityDisplay.java:106)
	at com.mojang.blaze3d.systems.RenderSystem.runAsFancy(RenderSystem.java:1119)
	at net.torocraft.torohealth.display.EntityDisplay.drawEntity(EntityDisplay.java:105)
	at net.torocraft.torohealth.display.EntityDisplay.draw(EntityDisplay.java:37)
	at net.torocraft.torohealth.display.Hud.draw(Hud.java:118)
	at net.torocraft.torohealth.display.Hud.draw(Hud.java:39)
	at net.minecraft.class_329.handler$zpc001$render(class_329.java:3975)
	at net.minecraft.class_329.method_1753(class_329.java:406)
	at net.minecraft.class_757.method_3192(class_757.java:855)
	at net.minecraft.class_310.method_1523(class_310.java:1112)
	at net.minecraft.class_310.method_1514(class_310.java:728)
	at net.minecraft.client.main.Main.main(Main.java:217)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:234)
	at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:153)
	at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196)
	at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231)
	at org.multimc.EntryPoint.listen(EntryPoint.java:143)
	at org.multimc.EntryPoint.main(EntryPoint.java:34)
commented

Were you summoning the entity with the command line? If so, what was the command? I am not that familiar with that system.

commented

The mob was originally spawned from a spawner created via the command line. However, now that I tried to reproduce the bug again by enabling the entity display, I was unable to make the game crash anymore. Although almost all the mods I have installed are the exact same, the crash could have been caused by and interaction of the ToroHealth mod with a renderer mod. When originally testing I probably forgot to isolate the mod, sorry for that.

Regardless, if anyone has a problem like this disabling the entity display seems like a quick fix.

The original command was:
/setblock ~ ~ ~ minecraft:spawner{SpawnCount:1,MaxNearbyEntities:2,SpawnRange:2,MinSpawnDelay:100,MaxSpawnDelay:300,RequiredPlayerRange:32,SpawnData:{id:zombie,CustomName:'[{"text":"Guard Thrall","color":"gray"}]',Health:30,Tags:{mobid:guardthrall},HandItems:[{id:stone_sword,Count:1}],HandDropChances:[0.00f],Attributes:[{Name:"generic.armor",Base:8f},{Name:"generic.max_health",Base:30f},{Name:"generic.movement_speed",Base:0.2f},{Name:"generic.follow_range",Base:16f},{Name:"generic.knockback_resistance",Base:0.7f},{Name:"generic.attack_knockback",Base:2f}]}} replace