Skip to content

Itemstacks are obtained from Ingredient without a copy #91

@pietro-lopes

Description

@pietro-lopes

While this is mostly safe, some mods will do modifications to the itemstacks, for example MegaCells, and that can cause visual issues because they are modifying the instance that is directly stored in the ingredient object. So everything that queries that, will have that modification.

It would be safer if this line of code had the copy of the items instead.

public LytSlot(Ingredient ingredient) {
this.stacks = ingredient.getItems();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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