13
0
geforkt von Mirrors/Paper
Paper/paper-server/nms-patches/net/minecraft/commands/arguments/blocks/ArgumentBlock.patch

39 Zeilen
1.8 KiB
Diff

2021-03-15 23:00:00 +01:00
--- a/net/minecraft/commands/arguments/blocks/ArgumentBlock.java
+++ b/net/minecraft/commands/arguments/blocks/ArgumentBlock.java
@@ -55,7 +55,7 @@
};
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;
2021-03-15 23:00:00 +01:00
@@ -231,7 +231,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);
2021-03-15 23:00:00 +01:00
@@ -500,7 +500,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);
2021-03-15 23:00:00 +01:00
@@ -534,7 +534,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) {