Skip to content

Entity iotas are not immutable after #1208 #1227

Description

@Robotgiggle

Minecraft version

1.21.1

Hex Casting version

0.12.0

Issue description

All Iotas are supposed to be immutable (which is necessary for them to work properly as item component values) but the changes introduced in #1208 mean this is no longer true for EntityIotas. Specifically, the isPlayer field can be mutated by the validate() method when updating an entity iota that was created before this change, or when validating an iota for an offline player.

It's worth noting that the first scenario there will only ever happen once per iota, and in the second scenario the validation will fail and thus the EntityIota will be discarded in favor of a NullIota, but the fact remains that this does still break the immutability contract for data components.

Metadata

Metadata

Assignees

No one assigned

    Labels

    1.21apiAPI-related enhancements/bugs/optimizationsbugSomething isn't working

    Type

    No type

    Projects

    Status
    📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions