ArmorPlus

ArmorPlus

9M Downloads

[BUG] [modcompat] [1.20.1] conflict with the vampirism mod

TakehisaYuji opened this issue ยท 1 comments

commented

Describe the bug
flying in a bat mode does not work properly, because of the armorplus mod.

To Reproduce
Steps to reproduce the behavior:

  1. fly in a bat mode as a vampire
  2. switch to any item in a hotbar
  3. the flight stops and you fall and take damage

Screenshots
idk what to screenshot tbh

Affected Side (please complete the following information):

  • [Y] Client
  • [Y] Server

Mods (please complete the following information):

  • Minecraft: [e.g. 1.20.1]
  • Forge: [e.g. 1.20.1-47.3.0]
  • ArmorPlus: [e.g. 1.20.1-20.0.2]
  • TheDragonLib: [e.g. 1.20.1-1.0.0]
  • GeckoLib: [e.g. geckolib-forge-1.20.1-4.4.9]
  • Vampirism; [1.20.1-1.10.11]

Additional context
Already created a post on a vampirism github page, this issue was a big mystery for me for a long time now, drove me crazy lol. because how hard was it to figure out that the mod that adds armor, breaks the vampirism mod

commented

This most likely comes from this code listening to LivingEquipmentChangeEvent:

In NeoForge 1.21, there is a new modifier that (as far as I understand it) improves mod compatibility regarding this creative flight: NeoForgeMod#CREATIVE_FLIGHT
Since modifiers are added with an id, mods can specifically add/remove their own modifier: https://github.com/TeamLapen/Vampirism/blob/76f8a7a609e12c8f48558482793afd68ff250ad3/src/main/java/de/teamlapen/vampirism/entity/player/vampire/actions/BatVampireAction.java#L157
Instead of changing mayFly using the new system should resolve this issue for 1.21+.

For 1.20, I am not sure.
Maybe you can at least change the check in your event listener to only act if LivingEquipmentChangeEvent#EquipmentSlot refers to a armor slot. Then this problem should occur more seldom.
Vampirism can also consider to regularly force mayFly as long as the player is in bat mode.