2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/commands/arguments/blocks/ArgumentBlock.java
|
|
|
|
+++ b/net/minecraft/commands/arguments/blocks/ArgumentBlock.java
|
2022-06-07 18:00:00 +02:00
|
|
|
@@ -68,7 +68,7 @@
|
2021-06-11 07:00:00 +02:00
|
|
|
private final StringReader reader;
|
|
|
|
private final boolean forTesting;
|
2022-06-07 18:00:00 +02:00
|
|
|
private final boolean allowNbt;
|
2021-06-11 07:00:00 +02:00
|
|
|
- private final Map<IBlockState<?>, Comparable<?>> properties = Maps.newHashMap();
|
|
|
|
+ private final Map<IBlockState<?>, Comparable<?>> properties = Maps.newLinkedHashMap(); // CraftBukkit - stable
|
|
|
|
private final Map<String, String> vagueProperties = Maps.newHashMap();
|
|
|
|
private MinecraftKey id = new MinecraftKey("");
|
2022-06-07 18:00:00 +02:00
|
|
|
@Nullable
|
2022-12-07 17:00:00 +01:00
|
|
|
@@ -276,7 +276,7 @@
|
2021-11-21 23:00:00 +01:00
|
|
|
Iterator iterator = iblockstate.getPossibleValues().iterator();
|
2018-12-17 00:21:29 +01:00
|
|
|
|
2018-12-25 22:00:00 +01:00
|
|
|
while (iterator.hasNext()) {
|
|
|
|
- T t0 = (Comparable) iterator.next();
|
|
|
|
+ T t0 = (T) iterator.next(); // CraftBukkit - decompile error
|
|
|
|
|
|
|
|
if (t0 instanceof Integer) {
|
2022-06-07 18:00:00 +02:00
|
|
|
Integer integer = (Integer) t0;
|
2022-12-07 17:00:00 +01:00
|
|
|
@@ -548,7 +548,7 @@
|
2021-11-21 23:00:00 +01:00
|
|
|
Optional<T> optional = iblockstate.getValue(s);
|
2018-12-17 00:21:29 +01:00
|
|
|
|
|
|
|
if (optional.isPresent()) {
|
2021-11-21 23:00:00 +01:00
|
|
|
- this.state = (IBlockData) this.state.setValue(iblockstate, (Comparable) optional.get());
|
|
|
|
+ this.state = (IBlockData) this.state.setValue(iblockstate, (T) optional.get()); // CraftBukkit - decompile error
|
2021-06-11 07:00:00 +02:00
|
|
|
this.properties.put(iblockstate, (Comparable) optional.get());
|
2018-12-17 00:21:29 +01:00
|
|
|
} else {
|
2021-06-11 07:00:00 +02:00
|
|
|
this.reader.setCursor(i);
|
2022-12-07 17:00:00 +01:00
|
|
|
@@ -584,7 +584,7 @@
|
2021-11-21 23:00:00 +01:00
|
|
|
private static <T extends Comparable<T>> void appendProperty(StringBuilder stringbuilder, IBlockState<T> iblockstate, Comparable<?> comparable) {
|
2020-06-25 02:00:00 +02:00
|
|
|
stringbuilder.append(iblockstate.getName());
|
2018-12-17 00:21:29 +01:00
|
|
|
stringbuilder.append('=');
|
2021-11-21 23:00:00 +01:00
|
|
|
- stringbuilder.append(iblockstate.getName(comparable));
|
|
|
|
+ stringbuilder.append(iblockstate.getName((T) comparable)); // CraftBukkit - decompile error
|
2018-12-17 00:21:29 +01:00
|
|
|
}
|
|
|
|
|
2022-06-07 18:00:00 +02:00
|
|
|
public static record a(IBlockData blockState, Map<IBlockState<?>, Comparable<?>> properties, @Nullable NBTTagCompound nbt) {
|