2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/commands/arguments/blocks/ArgumentBlock.java
|
|
|
|
+++ b/net/minecraft/commands/arguments/blocks/ArgumentBlock.java
|
2024-04-23 17:15:00 +02:00
|
|
|
@@ -67,7 +67,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();
|
2024-06-13 17:05:00 +02:00
|
|
|
private MinecraftKey id = MinecraftKey.withDefaultNamespace("");
|
2022-06-07 18:00:00 +02:00
|
|
|
@Nullable
|
2024-04-23 17:15:00 +02:00
|
|
|
@@ -275,7 +275,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
|
|
|
|
|
2024-04-23 17:15:00 +02:00
|
|
|
if (t0 instanceof Integer integer) {
|
|
|
|
suggestionsbuilder.suggest(integer);
|
|
|
|
@@ -545,7 +545,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);
|
2024-04-23 17:15:00 +02:00
|
|
|
@@ -581,7 +581,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) {
|