--- 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, Comparable> properties = Maps.newHashMap(); + private final Map, Comparable> properties = Maps.newLinkedHashMap(); // CraftBukkit - stable private final Map 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 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 > void appendProperty(StringBuilder builder, Property 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, Comparable> properties, @Nullable CompoundTag nbt) {