Skip to content

Commit

Permalink
fix: properly use short for storage
Browse files Browse the repository at this point in the history
  • Loading branch information
Zepalesque committed Jan 18, 2025
1 parent 11fcdaa commit 58306bb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ default ItemStack transformStack(Ingredient ingredient, ItemStack original, Reci
if (additional == null) {
return original;
}
int increase = additional.getByte(InfusionRecipe.ADDED_INFUSION);
int increase = additional.getShort(InfusionRecipe.ADDED_INFUSION);
if (increase <= 0) {
return original;
}
Expand Down Expand Up @@ -76,7 +76,7 @@ default ItemStack deplete(ItemStack stack, @Nullable LivingEntity user, int amou
int original = Objects.requireNonNullElse(stack.get(ReduxDataComponents.INFUSION), 0);

if (original > amount) {
int infusion = (byte) (original - amount);
int infusion = (short) (original - amount);
stack.set(ReduxDataComponents.INFUSION.get(), infusion);
} else {
return this.getUninfusedStack(stack);
Expand Down

0 comments on commit 58306bb

Please sign in to comment.