Skip to content

Entity.velocityModified is incorrect #4206

@Juuxel

Description

@Juuxel

Entity has both velocityDirty (field_6007) and velocityModified (field_6037), which both mean the same thing as names.

velocityDirty is used for generic velocity updates and larger general updates to entity data (see EntityTrackerEntry), so its name is most likely correct.

The other field, velocityModified, is only set to true whenever entities are damaged (scheduleVelocityUpdate and also all direct field writes), and it's used in those cases to send a velocity update packet. It should be renamed to knockedBack or something similar - it's only updating the velocity on damage, which sounds like a "knocked back from damage" flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugFixes or discusses a bug within the mappings

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions