13
0
geforkt von Mirrors/Paper
Paper/paper-server/nms-patches/net/minecraft/commands/arguments/blocks/ArgumentBlock.patch
CraftBukkit/Spigot eed041d629 Update to Minecraft 1.21
By: md_5 <git@md-5.net>
2024-06-14 01:05:00 +10:00

39 Zeilen
2.0 KiB
Diff

--- a/net/minecraft/commands/arguments/blocks/ArgumentBlock.java
+++ b/net/minecraft/commands/arguments/blocks/ArgumentBlock.java
@@ -67,7 +67,7 @@
private final StringReader reader;
private final boolean forTesting;
private final boolean allowNbt;
- 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 = MinecraftKey.withDefaultNamespace("");
@Nullable
@@ -275,7 +275,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 integer) {
suggestionsbuilder.suggest(integer);
@@ -545,7 +545,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);
@@ -581,7 +581,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 static record a(IBlockData blockState, Map<IBlockState<?>, Comparable<?>> properties, @Nullable NBTTagCompound nbt) {