[BUG] Splash Potion on GoG Mobs
Xarmat-GitHub opened this issue ยท 12 comments
Infos:
MC: 1.12.2
Forge: 14.23.5.2854
Discription:
While "Grimore of Gaia" installed, using Harming Splash Potions on Mobs (Modded or Vanilla) the game crashes.
Reproduce:
- Add DDD to mod folder
- Add GoG to mod folder
- Create a new world
- Spawn some mobs
- throw harming potion on them
- crash
Log:
Latest Log: https://pastebin.com/vYQGzhhH
Crash Report: https://pastebin.com/ucD01gXU
Notes:
I think the problem is on both sides.
When only using one of them at the same time, everything works fine.
Related to (possible duplicate of) #6
Have you tried adding VanillaFix to get more details about what's happening?
I have VanillaFix installed, try to get the link, but it failed. || Picture Failed: http://prntscr.com/u665xm
But here is the crash report from my folder: https://pastebin.com/fjwjfEwW
Hope it helps. When you have more advice what I can do, I will try it.
##Tests:
All splash potions tested
-- Most splash potion works fine, its just the instant damage AND instant heal potion
-- Zombies don`t crash when instant damaged, because they are immune to this potion
-- But Instant Healing on Zombies crash the game
-- Instant Healing on living mobs works as normal
-
Does an evoker fang cause the game to crash? This can be setup be placing some mob (any mob) between an Evoker and the player, then letting the evoker cast it's fangs spell. If this crashes, then the crashes are most likely related to indirect magic damage.
-
Does
/effect @e instant_damage
and/or/effect @e instant_health
crash the game?
Testing Results:
- Mobs Testing:
Try 1: Evoker - Wolf - Player = first spell of evoker, wolf get hurt; second spell of evoker -> crash
Try 2: E-W-P = 3 spells -> crash-2020-08-27_07.44.29-server.txt
Try 3: E-W-P = 2 spells -> crash-2020-08-27_07.47.24-server.txt
Try 4: E-Villager-NO player = all damaged/die, all fine
Try 5: E-Villager-player = all damaged/die, all fine
Try 6: E-GoG Dwarf-Player = all fine
Try 7: E-Ocelot-P = second spell crash-2020-08-27_07.57.59-server.txt
Thoughts:
Maybe its something about ally mobs / grouping.
When entity can fight for the player gets hurt.
Or they have some kind natural resistance?
Try 8: Witch - Wolf - Player = crash
Log: latest.log
Crash Report VanillaFix: crash-2020-08-27_07.37.38-server.txt
/effect @e instant_damage
Try 1: Ocelot, first command nothing, second crash-2020-08-27_08.02.58-server.txt
Try 2: Wolf, first command nothing, second crash
Thoughts:
When the mobs have full health, all is fine.
But when they have lower life, then the game crashes
Try 3: Wolf, hit Wolf with sword first, then execute command -> crash-2020-08-27_08.06.36-server.txt
So its just for mobs that don't have full life
Try 4: using /effect @e instant_damage when mobs nearby
-> Pigs, sheep, bat, creeper, etc. all is fine, none of the mobs cause crashes
Try 5: spawn some GoG mobs -> all fine
Try 6: spawn some vanilla mobs -> all fine
/effect @e instant_health
Try 1: using /effect @e instant_health when mobs nearby
-> All fine, also zombies underground don't crash
Try 2: Zombie, all fine, get damage and die
Try 3: Zombie, Zombie Horse, Zombie Villager, Pigman, Husk, Skeleton, Skeleton Horse, Wither Skeleton
-> all fine
- Testing with potions again
Try 1: Wolf , first potion all fine, second potion crash
Try 2: GoG Dwarf, all fine
Try 3: Ocelot, crash-2020-08-27_08.26.52-server.txt
Try 4: Horse, all fine
Try 5: Zombie (instant heal), all fine but why... last time it also crashes...
Thoughts:
- Wolfs and Ocelots has this problem mainly
- Ally Flag problem?
- Only on the second damage
- No problem when full healed
- Question: When a Wolf get hostile? Is there any "One hit is ok, but 2 are to much?" -> and then he attacks (untamed wolfs attack instantly) (maybe in multi player there is such a mechanic)
Something else I could test?
Does /effect @e wither
crash the game due to the Wither effect killing wolves/ocelots/parrots?
Test: /effect @e wither
wolf: crash-2020-08-27_12.34.43-server.txt
ocelot: crash-2020-08-27_12.36.15-server.txt
parrot: crash-2020-08-27_12.37.02-server.txt
All 3 mobs cause crashes, not at the beginning but after some effect ticks.
More testing options?
Definitely part of the problem is DDD tries to display custom death messages even if the feature is turned off. That's a slip on my part.
Another problem is that DDD checks if the mob that was killed is an instance of EntityTameable (Wolves, Ocelots, Parrots, etc) to send a death message to the owner of the mob. I'm guessing it does this even if the mob doesn't have an owner. Easy fix. Not sure why Zombies caused a crash though.
Do you have custom damage types turned on? Because the problem is definitely related to that.
As for when the crash occurs, it doesn't occur the first time because the mob isn't dead. Applying the effect a second time kills the mob which causes the crash (according to the logs).
Fairly positive this is unrelated to #16; that's a problem attaching capabilities to the mob when it spawns - causing a crash.
Not sure why Zombies caused a crash though.
Maybe there was a hidden Wolf, Ocelot, or Parrot that was also killed when testing Zombies, causing a similar crash.
This is my current suspicion. Further testing hasn't produced problems so I think it was something unexpected. Either way, I can't fully account for unexpected behaviour so we'll just have to see if it happens again.
Test:
"Use Custom Damage Types"=false
"Use Custom Death Messages"=false
/effect @e wither
- Wolf:
- Villager:
- Zombie:
Preperation:
- /gamerule doMobSpawning false
- /kill @e[type=!player]" - to kill all entities (until "no entity is found")
Test:
Config: "Use Custom Damage Types"=false
Config: "Use Custom Death Messages"=false
Command: /effect @e wither
- Wolf: ->crash-2020-09-21_07.38.48-server.txt
- Villager, Zombie, GoG Mobs - some more mobs that don`t have a owner -> no crash works fine
- Wolf: TAMED -> NO CRASH | Same World with non tamed wolfs -> crash
Notes:
Interesting, only the untamed wolfs get the crash. The tamed one don't have this issue.
Also Custom Damage Types AND Use Custom Death Messages are false.
Yup. If I had to guess, my original hypothesis is pretty close to the real problem, if not exactly the problem.
Untamed wolves crash because they're still an instance of EntityTameable (i.e. they're an entity that can be tamed). EntityTameable has a method getOwner (or something similar) which returns the entity that owns that Wolf entity. For untamed wolves, this returns null (logically makes sense) and I should've accounted for that. Tamed wolves don't crash because they (of course) have an owner.
tl;dr ownership of tamed mobs is a little pedantic, and that causes the problems.
Commit 8e13ad0 fixes this