Fix a bunch more issues arising from mutable types (#11769)

This commit is contained in:
Jake Potrebic
2024-12-22 13:50:00 -08:00
committed by GitHub
parent 8ad15d64f0
commit 083c083188
19 changed files with 39 additions and 39 deletions

View File

@@ -30,9 +30,9 @@ public final class PotionMix implements Keyed {
*/
public PotionMix(final NamespacedKey key, final ItemStack result, final RecipeChoice input, final RecipeChoice ingredient) {
this.key = key;
this.result = result;
this.input = input;
this.ingredient = ingredient;
this.result = result.clone();
this.input = input.clone();
this.ingredient = ingredient.clone();
}
/**
@@ -58,7 +58,7 @@ public final class PotionMix implements Keyed {
* @return the result itemstack
*/
public ItemStack getResult() {
return this.result;
return this.result.clone();
}
/**
@@ -67,7 +67,7 @@ public final class PotionMix implements Keyed {
* @return the bottom 3 slot ingredients
*/
public RecipeChoice getInput() {
return this.input;
return this.input.clone();
}
/**
@@ -76,7 +76,7 @@ public final class PotionMix implements Keyed {
* @return the top slot input
*/
public RecipeChoice getIngredient() {
return this.ingredient;
return this.ingredient.clone();
}
@Override