3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-20 21:40:06 +01:00
Paper/nms-patches/ArgumentBlock.patch
2018-12-26 08:00:00 +11:00

39 Zeilen
1.9 KiB
Diff

--- 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;
@@ -217,7 +217,7 @@
Iterator iterator = iblockstate.d().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);
@@ -488,7 +488,7 @@
Optional<T> optional = iblockstate.b(s);
if (optional.isPresent()) {
- this.o = (IBlockData) this.o.set(iblockstate, (Comparable) optional.get());
+ this.o = (IBlockData) this.o.set(iblockstate, (T) optional.get()); // CraftBukkit - decompile error
this.k.put(iblockstate, optional.get());
} else {
this.i.setCursor(i);
@@ -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) {