Botania (Fabric/Quilt)

Botania (Fabric/Quilt)

6M Downloads

Charm of the Diva does not make mob attack something else

TheRealWormbo opened this issue ยท 1 comments

commented

Mod Loader

Forge

Minecraft Version

1.20.1

Botania version

443

Modloader version

(dev snapshot)

Modpack info

(none)

The latest.log file

(n/a)

Issue description

On Forge only the Charm of the Diva fails to "brainwash" mobs. The method itself succeeds, causing the mob to heal and particles to be displayed, but the mob will continue to attack the player.

This works fine on Fabric when hitting hostile mobs that implement the Enemy interface. However, when hitting mobs that don't implement that interface, yet can still attack (e.g. polar bear, llama), they never seem to get "brainwashed" into attacking nearby hostile mobs.

Steps to reproduce

  1. Equip the Charm of the Diva.
  2. Find or spawn two hostile mobs, e.g. husks.
  3. Hit one of them until you hear the charm's sound effect and see particles. On Fabric the mob starts attacking another hostile mob, on Forge it continues attacking the player.

Other information

Bug report #4064 covers mobs that use the new "brain"-based AI system. That currently only affects piglins, hoglins, zoglins and the warden.

The main difference between Forge and Fabric seems to be that for Fabric a mix-in is used that calls the Charm of the Diva's code after the damage is done, while the Forge hook uses a built-in event that happens before the damage is applied. I assume the "brainwashing" is simply overridden by the mob because it considers the player-dealt damage after having a new target set, therefore reverting to attacking the player.

commented

Also, considering #4478, the Forge solution probably shouldn't be to just switch to the Fabric mixin implementation.