mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-10 09:02:09 -07:00
Move patches to unapplied
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
--- a/net/minecraft/commands/arguments/blocks/BlockStateParser.java
|
||||
+++ b/net/minecraft/commands/arguments/blocks/BlockStateParser.java
|
||||
@@ -67,7 +67,7 @@
|
||||
private final StringReader reader;
|
||||
private final boolean forTesting;
|
||||
private final boolean allowNbt;
|
||||
- private final Map<Property<?>, Comparable<?>> properties = Maps.newHashMap();
|
||||
+ private final Map<Property<?>, Comparable<?>> properties = Maps.newLinkedHashMap(); // CraftBukkit - stable
|
||||
private final Map<String, String> vagueProperties = Maps.newHashMap();
|
||||
private ResourceLocation id = ResourceLocation.withDefaultNamespace("");
|
||||
@Nullable
|
||||
@@ -275,7 +275,7 @@
|
||||
Iterator iterator = property.getPossibleValues().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
- T t0 = (Comparable) iterator.next();
|
||||
+ T t0 = (T) iterator.next(); // CraftBukkit - decompile error
|
||||
|
||||
if (t0 instanceof Integer integer) {
|
||||
builder.suggest(integer);
|
||||
@@ -545,7 +545,7 @@
|
||||
Optional<T> optional = property.getValue(value);
|
||||
|
||||
if (optional.isPresent()) {
|
||||
- this.state = (BlockState) this.state.setValue(property, (Comparable) optional.get());
|
||||
+ this.state = (BlockState) this.state.setValue(property, (T) optional.get()); // CraftBukkit - decompile error
|
||||
this.properties.put(property, (Comparable) optional.get());
|
||||
} else {
|
||||
this.reader.setCursor(cursor);
|
||||
@@ -581,7 +581,7 @@
|
||||
private static <T extends Comparable<T>> void appendProperty(StringBuilder builder, Property<T> property, Comparable<?> value) {
|
||||
builder.append(property.getName());
|
||||
builder.append('=');
|
||||
- builder.append(property.getName(value));
|
||||
+ builder.append(property.getName((T) value)); // CraftBukkit - decompile error
|
||||
}
|
||||
|
||||
public static record BlockResult(BlockState blockState, Map<Property<?>, Comparable<?>> properties, @Nullable CompoundTag nbt) {
|
Reference in New Issue
Block a user