@@ -0,0 +1,47 @@
|
||||
--- a/net/minecraft/util/InclusiveRange.java
|
||||
+++ b/net/minecraft/util/InclusiveRange.java
|
||||
@@ -4,19 +4,23 @@
|
||||
import com.mojang.serialization.DataResult;
|
||||
import java.util.function.Function;
|
||||
|
||||
-public final class InclusiveRange extends Record {
|
||||
+// CraftBukkit start - decompile error
|
||||
+public final record InclusiveRange<T extends Comparable<T>>(T minInclusive, T maxInclusive) {
|
||||
|
||||
+ /*
|
||||
private final T minInclusive;
|
||||
private final T maxInclusive;
|
||||
+ */
|
||||
public static final Codec<InclusiveRange<Integer>> INT = codec(Codec.INT);
|
||||
|
||||
- public InclusiveRange(T t0, T t1) {
|
||||
- if (t0.compareTo(t1) > 0) {
|
||||
+ public InclusiveRange(T minInclusive, T maxInclusive) {
|
||||
+ if (minInclusive.compareTo(maxInclusive) > 0) {
|
||||
throw new IllegalArgumentException("min_inclusive must be less than or equal to max_inclusive");
|
||||
} else {
|
||||
- this.minInclusive = t0;
|
||||
- this.maxInclusive = t1;
|
||||
+ this.minInclusive = minInclusive;
|
||||
+ this.maxInclusive = maxInclusive;
|
||||
}
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
public static <T extends Comparable<T>> Codec<InclusiveRange<T>> codec(Codec<T> codec) {
|
||||
@@ -47,6 +51,8 @@
|
||||
return "[" + this.minInclusive + ", " + this.maxInclusive + "]";
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ /*
|
||||
public final int hashCode() {
|
||||
return this.hashCode < invokedynamic > (this);
|
||||
}
|
||||
@@ -62,4 +68,6 @@
|
||||
public T maxInclusive() {
|
||||
return this.maxInclusive;
|
||||
}
|
||||
+ */
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
Reference in New Issue
Block a user