Skip to content

Commit

Permalink
fix: prevent tier from changing instance of same class (#770)
Browse files Browse the repository at this point in the history
  • Loading branch information
pietro-lopes authored Jan 15, 2024
1 parent 9f6c8e1 commit 131bb0a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public HandheldItemBuilder(ResourceLocation i, float d, float s) {
}

public HandheldItemBuilder tier(Tier t) {
toolTier = new MutableToolTier(t);
toolTier = t instanceof MutableToolTier mtt ? mtt : new MutableToolTier(t);
return this;
}

Expand Down

0 comments on commit 131bb0a

Please sign in to comment.