Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some mobs are unaffected by Heisei Dream and Charm of the Diva #4064

Open
TheRealWormbo opened this issue Jun 5, 2022 · 3 comments
Open
Labels
confirmed The maintainers will take a look at this. requires-mixinextras Fixing/implementing this properly (in a less hacky way) requires MixinExtras

Comments

@TheRealWormbo
Copy link
Collaborator

Mod Loader

Forge

Minecraft Version

1.18.2

Botania version

1.18.2-432

Modloader version

Forge: 40.1.25

Modpack info

https://www.curseforge.com/minecraft/modpacks/the-phoenixs-magics-and-goodies

The latest.log file

https://gist.github.com/TheRealWormbo/5ea9f086a04ae59dbdf036c84a8d5498

Issue description

Some mob pairings exhibit weird behaviors while under the effect of a Heisei Dream. Some mobs seem to "punch themselves", while others will not attack each other in any way, but you can see the flower consuming mana again and again.

Steps to reproduce

Place an Everlasting Guilty Pool (for convenience) and a Heisei Dream, then use spawn eggs create pairs of mobs within range of the flower:

  • Two shulkers – nothing appears to happen, except the flower occasionally draining mana. (Can be observed via looking at the flower while holding a Wand of the Forest.)
  • Two husks – one of them immediately starts taking damage, even though the other is definitely not in melee range yet.
  • Two blazes – one of them again immediately starts taking damage (punching itself? it doesn't last long), while the other watches and prepares to fire. It may shoot eventually.
  • Any pairing of piglins and/or piglin brutes – like with shulkers, nothing happens. If not testing this in the nether, they will eventually convert to zombified piglins, but only start attacking each other when both have converted. If they are far enough apart from each other, you can likely see one punching itself again as in the husk case. In fact, both piglin types don't appear to attack (or get attacked by) any other hostile mobs, except wither skeletons, which they would attack anyway.

Other zombie variants, and surprisingly also silverfish or endermites exhibit the self-punching behavior as well, while wither skeletons or endermen don't. Mixing mob types among the "self-punchers" results in no self-punching behavior, as far as I can tell. Guardians and zoglins both are among the mobs that won't attack others of their own kind.

Other information

While I first noticed the issue in the linked mod pack, I could also reproduce it with a plain Forge installation in GDLauncher that contains nothing but Botania, Patchouli and Curios. The log file is from a test with that profile.

@williewillus williewillus added confirmed The maintainers will take a look at this. and removed investigate labels Jun 29, 2022
@williewillus williewillus changed the title Mobs under effect of Heisei Dream might attack themselves or not care at all Some mobs are unaffected by Heisei Dream Jun 29, 2022
@williewillus
Copy link
Member

  • Shulkers: Not sure. Might have special cased magic to prevent them from aggroing against each other
  • Husks: Wasn't able to reproduce this
  • Blazes: Looks like they're melee attacking each other, actually. Not sure why the range is so large.
  • Piglins: Basically the problem is the Heisei dream only affects mobs that use the 1.8-era AI system, not the newer 1.14-era Brain AI system, which is what piglins use.

@TheRealWormbo
Copy link
Collaborator Author

As far as shulkers are concerned, I think I see why they won't attack each other. Their HurtByTargetGoal is initialized with the Shulker class in the toIgnoreDamage array. I guess this was a change to prevent shulker in-fighting after stray bullets hit other shulkers.
A quick browse through other constructor calls of the HurtByTargetGoal suggest that drowned will not fight each other either, and any Raider mobs (witches, illagers, ravagers and vexes) will not fight amongst each other. (I never realized witch fights were no longer a thing.)

williewillus added a commit that referenced this issue Jul 24, 2022
@williewillus williewillus changed the title Some mobs are unaffected by Heisei Dream Some mobs are unaffected by Heisei Dream and Charm of the Diva Feb 13, 2023
jpenilla added a commit to jpenilla/Botania that referenced this issue Apr 21, 2023
Does two things:
- Set the ATTACK_TARGET memory for mobs using the new Brain system (ie it works on Piglins now)
- Override checks in TargetingConditions that prevented Illagers from attacking each other
@TheRealWormbo TheRealWormbo added the requires-mixinextras Fixing/implementing this properly (in a less hacky way) requires MixinExtras label Jul 13, 2024
@TheRealWormbo
Copy link
Collaborator Author

Todo: Reimplement PR #4337, replacing most @Redirects with better alternatives from MixinExtras.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed The maintainers will take a look at this. requires-mixinextras Fixing/implementing this properly (in a less hacky way) requires MixinExtras
Development

No branches or pull requests

2 participants