Skip to content

Commit

Permalink
Remove the partial result from checkRange as it causes issues to pars…
Browse files Browse the repository at this point in the history
…e with ranges outside of min and max
  • Loading branch information
eowyn36 committed Apr 10, 2024
1 parent 84fbf0c commit 7e31033
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/mojang/serialization/Codec.java
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ static <N extends Number & Comparable<N>> Function<N, DataResult<N>> checkRange(
if (value.compareTo(minInclusive) >= 0 && value.compareTo(maxInclusive) <= 0) {
return DataResult.success(value);
}
return DataResult.error(() -> "Value " + value + " outside of range [" + minInclusive + ":" + maxInclusive + "]", value);
return DataResult.error(() -> "Value " + value + " outside of range [" + minInclusive + ":" + maxInclusive + "]");
};
}

Expand Down

0 comments on commit 7e31033

Please sign in to comment.