Skip to content

EntityPoseChangeEvent called when generating structures with camels, causing chunk system error #10119

@Malfrador

Description

@Malfrador

Expected behavior

The chunk to generate/load without issues.

Observed/Actual behavior

Chunk system error when generating the chunk: https://pastes.dev/H3ujZPDylz

Steps/models to reproduce

  1. Download and add the attached datapack. It generates a world full of structures with a camel with LastPoseChange of less than 0: cameeelll.zip

  2. Start the server.

  3. Server will crash as soon as it tries to generate the structure.

Plugin and Datapack List

Not relevant.

Paper version

Not relevant.

Other

When a camel is loaded and readAdditionalSaveData is called, it will always set the pose if the value of LastPoseChange is zero or less. A camel being loaded as part of a structure, for example in desert village, will lead to that logic being called off the main thread. Because the EntityPoseChangeEvent can only be called on the main thread, an exception will be thrown leading to a chunk system error that in turn leads to a crash.

In theory the same issue should occur if a camel is loaded again and not as part of worldgen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.type: bugSomething doesn't work as it was intended to.

    Type

    No fields configured for Bug.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions