Skip to content
This repository was archived by the owner on Aug 3, 2025. It is now read-only.
This repository was archived by the owner on Aug 3, 2025. It is now read-only.

Entity UUIDs still from SHARED_RANDOM (client-commands fishing manipulation does not work) #1

@e-im

Description

@e-im

This is a bit of a tough issue.

How the plugin currently works is setting a unique random on each entity at the time they are tracked. This works for most applications, such as player enchantment cracking. However, when it comes to fishing manipulation, the UUID of each entity is taken into account. This UUID comes from the shared random, which is set in the ctor. Changing the random before this happens is completely impossible, so the only option is to change the entities UUID after the fact (from the new random we give it) - which has to happen before it is added to the world.

There isn't a great (or even publishable, as far as I can see) way to get every entity before it is added to the world, though. The obvious way to do this would be to wrap BasicEntityList or even EntityCollectionBySection, but that isn't possible because these are both final classes and can't be subclassed.

The only solution I've come up with is to use an agent and instrument BasicEntityList, which isn't something that could be easily used by many people. And even if it was, it wouldn't be something I'd want to publish. If you were to do that, you might as well just verbatim undo the patch Paper adds.

EntitySpawnEvent is called early enough. However, this doesn't cover all entities and is a pain for other reasons. This is the most likely option to be used, but ugh.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions