Skip to content

Crash due to NullPointerException from yeti riding #2618

Description

@bunabyt3

NeoForge Version

14.23.5.2859

Twilight Forest Version

3.11.1021

Client Log

https://gist.github.com/bunabyt3/6fe2d3900031135d1b45a618b4685b04

Crash Report (if applicable)

https://gist.github.com/bunabyt3/fe9ddd53fac639051757ce2a3728c512

Steps to Reproduce

  1. Spawn a yeti using the spawn egg or summon command
  2. Allow yeti to be attacked and killed by a pet mob, such as a wolf or little maid
  3. The mob who killed the yeti will appear to be floating, as if riding the yeti. After the yeti despawns, the server will crash, due to the yeti referencing/being referenced as a vehicle which does not exist.

What You Expected

I am not familiar with Twilight Forest yeti mob behavior, but it seems like they have a tendency to mount the mobs they are attacking. This behavior should not affect what happens to the yeti's killer or to the mob itself after it dies. A little maid mob can kill most mobs with no issue. The same behavior could maybe be reproduced with wolves, but I haven't tried yet.

What Happened Instead

The mob that attacked and killed the yeti appeared to be riding on top of it, shortly before the yeti died and despawned, causing the server to crash. It seems like the yeti is forcing a specific mounting configuration that doesn't work when one of the involved entities despawns.

Additional Details

Little maid mobs can engage other mobs without player input. This can also occur in vanilla, such as by skeletons shooting arrows and hitting things in front of them. All mobs from Twilight Forest must properly handle a scenario in which they are attacked by mobs that are not associated with a player.

NOTE: Optifine was enabled at the time the bug occurred, but I can confirm that this bug is entirely server-side and NOT affected by Optifine! No methods related to rendering are present in the stack trace, and the exception clearly originates from the game server thread. FoamFix could potentially be involved.

Please Read and Confirm The Following

  • I have confirmed this bug can be replicated without the use of Optifine.
  • I have confirmed the details provided in this report are concise as possible and does not contained vague information (ie. Versions are properly recorded, answers to questions are clear).
  • I have confirmed this issue is unique and has not been reported already.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions