Paper/nms-patches/ArgumentBlock.patch

39 lines
1.8 KiB
Diff
Raw Normal View History

--- a/net/minecraft/server/ArgumentBlock.java
+++ b/net/minecraft/server/ArgumentBlock.java
2020-06-25 02:00:00 +02:00
@@ -43,7 +43,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;
2020-06-25 02:00:00 +02:00
@@ -219,7 +219,7 @@
2019-07-20 01:00:00 +02:00
Iterator iterator = iblockstate.getValues().iterator();
2018-12-25 22:00:00 +01:00
while (iterator.hasNext()) {
- T t0 = (Comparable) iterator.next();
+ T t0 = (T) iterator.next(); // CraftBukkit - decompile error
if (t0 instanceof Integer) {
suggestionsbuilder.suggest((Integer) t0);
2020-06-25 02:00:00 +02:00
@@ -488,7 +488,7 @@
2018-12-25 22:00:00 +01:00
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
2018-12-25 22:00:00 +01:00
this.k.put(iblockstate, optional.get());
} else {
this.i.setCursor(i);
2020-06-25 02:00:00 +02:00
@@ -522,7 +522,7 @@
private static <T extends Comparable<T>> void a(StringBuilder stringbuilder, IBlockState<T> iblockstate, Comparable<?> comparable) {
2020-06-25 02:00:00 +02:00
stringbuilder.append(iblockstate.getName());
stringbuilder.append('=');
- stringbuilder.append(iblockstate.a(comparable));
+ stringbuilder.append(iblockstate.a((T) comparable)); // CraftBukkit - decompile error
}
2020-06-25 02:00:00 +02:00
public CompletableFuture<Suggestions> a(SuggestionsBuilder suggestionsbuilder, Tags<Block> tags) {