Metamorph

Metamorph

4M Downloads

(BUG) AutoWalk bug interaction between Tropicraft & Metamorph

Vaygrim opened this issue ยท 4 comments

commented

Cross-posted on the Tropicraft GitHub: Tropicraft/Tropicraft#276
Origination of the bug: GrimCo/CoopLife2#14

Issue Description

Developing a pack that we would like to use Tropicraft in, and we ran across a fresh bug when trying it in combination with a mod called "Metamorph" (by Horsewithnoname). The issue we ran across is weird.
Morphing from standard player form into any other form will cause you to get 'pulled' (or auto-walking as we call it) in a specific compass direction. Happens in Single Player, Multiplayer, Survival, Creative, Adventure mode.. everything. Chickens, Parrots, and Rabbits all get pulled SouthEast... while everything else gets pulled NorthWest. (No clue why this is.)

Steps to Reproduce

  1. Install Forge 2678+ , Metamorph 1.1.5 for 1.12.2, and Tropicraft 7.1.3.62
  2. Log into a single player world and kill anything to grab it's morph.
  3. Change shape into that morph, you should immediately start getting pulled a specific compass direction.

Tropicraft Version: 7.1.3.62
Forge Version: 2678 / 2680 (tried both)

Crash log

Not a crash-causing issue, just a weird interaction.
commented

Confirmed. If I had to guess, this is caused by Metamorph updating the player hitbox, since zombie morphs do not move (they have the same horizontal vertical? hitboxes as players). I'm guessing Tropicraft does something with the hitbox code as well.

I was working with the Metamorph hitbox code recently (didn't actually change the hitbox code itself) so I'll take a look at this.

commented

They modify the hitbox every tick:
https://github.com/Tropicraft/Tropicraft/blob/1.12.2/src/main/java/net/tropicraft/core/common/event/ScubaHandlerCommon.java

So my hypothesis stands, it's a hitbox issue. When the hitbox is changed to something else, it can cause the player to move to compensate for collisions. This is fine if it momentarily changes when morphing to something else, as is the case with only Metamorph installed. However, in this case, Metamorph and Tropicraft are both fighting to change the hitbox. Metamorph has to change the hitbox when the player is in a morph, because vanilla code changes the hitbox back every tick. So, assuming this is a hitbox issue, Tropicraft should not update the player hitbox while the player is morphed.

commented

I don't think it's possible to fix this.

commented

1.12 users should now be able to fix this issue by updating to latest Tropicraft version and disabling swim animation in the config.