13
0
geforkt von Mirrors/Paper
CraftBukkit/Spigot 9ee989ea81 Update to Minecraft 1.18.2
By: md_5 <git@md-5.net>
2022-03-01 02:00:00 +11:00

39 Zeilen
2.0 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;
@@ -230,7 +230,7 @@
Iterator iterator = iblockstate.getPossibleValues().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);
@@ -493,7 +493,7 @@
Optional<T> optional = iblockstate.getValue(s);
if (optional.isPresent()) {
- this.state = (IBlockData) this.state.setValue(iblockstate, (Comparable) optional.get());
+ this.state = (IBlockData) this.state.setValue(iblockstate, (T) optional.get()); // CraftBukkit - decompile error
this.properties.put(iblockstate, (Comparable) optional.get());
} else {
this.reader.setCursor(i);
@@ -527,7 +527,7 @@
private static <T extends Comparable<T>> void appendProperty(StringBuilder stringbuilder, IBlockState<T> iblockstate, Comparable<?> comparable) {
stringbuilder.append(iblockstate.getName());
stringbuilder.append('=');
- stringbuilder.append(iblockstate.getName(comparable));
+ stringbuilder.append(iblockstate.getName((T) comparable)); // CraftBukkit - decompile error
}
public CompletableFuture<Suggestions> fillSuggestions(SuggestionsBuilder suggestionsbuilder, IRegistry<Block> iregistry) {