Skip to content

Commit

Permalink
Prevent unintentional mutation of items passed to button builder
Browse files Browse the repository at this point in the history
  • Loading branch information
landonjw committed Jul 11, 2021
1 parent 3f4c218 commit 8826cd6
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package ca.landonjw.gooeylibs2.api.button;

import ca.landonjw.gooeylibs2.api.template.LineType;
import com.google.common.collect.Lists;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.nbt.NBTTagString;

Expand Down Expand Up @@ -54,7 +52,7 @@ public static class Builder {
protected List<EnumFlag> hideFlags = new ArrayList<>();

public Builder display(@Nonnull ItemStack display) {
this.display = display;
this.display = display.copy();
return this;
}

Expand Down

0 comments on commit 8826cd6

Please sign in to comment.