@@ -49,7 +49,7 @@
|
||||
return nbttagcompound;
|
||||
}
|
||||
|
||||
@@ -201,4 +225,15 @@
|
||||
@@ -202,4 +226,15 @@
|
||||
public void setBlockState(IBlockData iblockdata) {
|
||||
this.blockState = iblockdata;
|
||||
}
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
--- a/net/minecraft/world/level/block/state/properties/IBlockState.java
|
||||
+++ b/net/minecraft/world/level/block/state/properties/IBlockState.java
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
protected IBlockState(String s, Class<T> oclass) {
|
||||
this.codec = Codec.STRING.comapFlatMap((s1) -> {
|
||||
- return (DataResult) this.getValue(s1).map(DataResult::success).orElseGet(() -> {
|
||||
+ return this.getValue(s1).map(DataResult::success).orElseGet(() -> { // CraftBukkit - decompile error
|
||||
return DataResult.error("Unable to read property: " + this + " with value: " + s1);
|
||||
});
|
||||
}, this::getName);
|
||||
@@ -96,23 +96,27 @@
|
||||
DataResult<T> dataresult = this.codec.parse(dynamicops, u0);
|
||||
|
||||
return dataresult.map((comparable) -> {
|
||||
- return (IBlockDataHolder) s0.setValue(this, comparable);
|
||||
+ return s0.setValue(this, comparable); // CraftBukkit - decompile error
|
||||
}).setPartial(s0);
|
||||
}
|
||||
|
||||
- public static final class a extends Record {
|
||||
+ // CraftBukkit start
|
||||
+ public static final record a<T extends Comparable<T>>(IBlockState<T> property, T value) {
|
||||
|
||||
+ /*
|
||||
private final IBlockState<T> property;
|
||||
private final T value;
|
||||
+ */
|
||||
|
||||
- public a(IBlockState<T> iblockstate, T t0) {
|
||||
- if (!iblockstate.getPossibleValues().contains(t0)) {
|
||||
- throw new IllegalArgumentException("Value " + t0 + " does not belong to property " + iblockstate);
|
||||
+ public a(IBlockState<T> property, T value) {
|
||||
+ if (!property.getPossibleValues().contains(value)) {
|
||||
+ throw new IllegalArgumentException("Value " + value + " does not belong to property " + property);
|
||||
} else {
|
||||
- this.property = iblockstate;
|
||||
- this.value = t0;
|
||||
+ this.property = property;
|
||||
+ this.value = value;
|
||||
}
|
||||
}
|
||||
+ // CraftBukkit end
|
||||
|
||||
public String toString() {
|
||||
String s = this.property.getName();
|
||||
@@ -120,6 +124,8 @@
|
||||
return s + "=" + this.property.getName(this.value);
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ /*
|
||||
public final int hashCode() {
|
||||
return this.hashCode < invokedynamic > (this);
|
||||
}
|
||||
@@ -135,5 +141,7 @@
|
||||
public T value() {
|
||||
return this.value;
|
||||
}
|
||||
+ */
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user