PaperMC/paper-server/nms-patches/net/minecraft/commands/arguments/blocks/ArgumentBlock.patch
CraftBukkit/Spigot b3a8254758 Update to Minecraft 1.17
By: md_5 <git@md-5.net>
2021-06-11 15:00:00 +10:00

38 lines
1.9 KiB
Diff

--- a/net/minecraft/commands/arguments/blocks/ArgumentBlock.java
+++ b/net/minecraft/commands/arguments/blocks/ArgumentBlock.java
@@ -61,7 +61,7 @@
};
private final StringReader reader;
private final boolean forTesting;
- 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("");
private BlockStateList<Block, IBlockData> definition;
@@ -237,7 +237,7 @@
Iterator iterator = iblockstate.getValues().iterator();
while (iterator.hasNext()) {
- T t0 = (Comparable) iterator.next();
+ T t0 = (T) iterator.next(); // CraftBukkit - decompile error
if (t0 instanceof Integer) {
suggestionsbuilder.suggest((Integer) t0);
@@ -506,7 +506,7 @@
Optional<T> optional = iblockstate.b(s);
if (optional.isPresent()) {
- this.state = (IBlockData) this.state.set(iblockstate, (Comparable) optional.get());
+ this.state = (IBlockData) this.state.set(iblockstate, (T) optional.get()); // CraftBukkit - decompile error
this.properties.put(iblockstate, (Comparable) optional.get());
} else {
this.reader.setCursor(i);
@@ -540,7 +540,7 @@
private static <T extends Comparable<T>> void a(StringBuilder stringbuilder, IBlockState<T> iblockstate, Comparable<?> comparable) {
stringbuilder.append(iblockstate.getName());
stringbuilder.append('=');
- stringbuilder.append(iblockstate.a(comparable));
+ stringbuilder.append(iblockstate.a((T) comparable)); // CraftBukkit - decompile error
}
public CompletableFuture<Suggestions> a(SuggestionsBuilder suggestionsbuilder, Tags<Block> tags) {