summaryrefslogtreecommitdiffstats
path: root/nms-patches/ArgumentBlock.patch
blob: 1c33861f6630b2eedd9c2f5fbf88a9656be568d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
--- a/net/minecraft/server/ArgumentBlock.java
+++ b/net/minecraft/server/ArgumentBlock.java
@@ -41,7 +41,7 @@
     private static final Function<SuggestionsBuilder, CompletableFuture<Suggestions>> h = SuggestionsBuilder::buildFuture;
     private final StringReader i;
     private final boolean j;
-    private final Map<IBlockState<?>, Comparable<?>> k = Maps.newHashMap();
+    private final Map<IBlockState<?>, Comparable<?>> k = Maps.newLinkedHashMap(); // CraftBukkit - stable
     private final Map<String, String> l = Maps.newHashMap();
     private MinecraftKey m = new MinecraftKey("");
     private BlockStateList<Block, IBlockData> n;
@@ -222,7 +222,7 @@
             if (comparable instanceof Integer) {
                 suggestionsbuilder.suggest((Integer) comparable);
             } else {
-                suggestionsbuilder.suggest(iblockstate.a(comparable));
+                suggestionsbuilder.suggest(iblockstate.a((T) comparable)); // CraftBukkit - decompile error
             }
         }
 
@@ -488,8 +488,8 @@
         Optional optional = iblockstate.b(s);
 
         if (optional.isPresent()) {
-            this.o = (IBlockData) this.o.set(iblockstate, (Comparable) optional.get());
-            this.k.put(iblockstate, optional.get());
+            this.o = (IBlockData) this.o.set(iblockstate, (T) optional.get()); // CraftBukkit - decompile error
+            this.k.put(iblockstate, (Comparable) optional.get()); // CraftBukkit - decompile error
         } else {
             this.i.setCursor(i);
             throw ArgumentBlock.e.createWithContext(this.i, this.m.toString(), iblockstate.a(), s);
@@ -526,7 +526,7 @@
     private static <T extends Comparable<T>> void a(StringBuilder stringbuilder, IBlockState<T> iblockstate, Comparable<?> comparable) {
         stringbuilder.append(iblockstate.a());
         stringbuilder.append('=');
-        stringbuilder.append(iblockstate.a(comparable));
+        stringbuilder.append(iblockstate.a((T) comparable)); // CraftBukkit - decompile error
     }
 
     public CompletableFuture<Suggestions> a(SuggestionsBuilder suggestionsbuilder) {