Update to Minecraft 1.20

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2023-06-08 01:30:00 +10:00
parent bac55e67d6
commit 9d740b84b0
269 changed files with 2605 additions and 2568 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/dedicated/PropertyManager.java
+++ b/net/minecraft/server/dedicated/PropertyManager.java
@@ -17,13 +17,28 @@
@@ -23,13 +23,28 @@
import net.minecraft.core.IRegistryCustom;
import org.slf4j.Logger;
@@ -30,7 +30,7 @@
}
public static Properties loadFromFile(Path path) {
@@ -58,6 +73,11 @@
@@ -97,6 +112,11 @@
public void store(Path path) {
try {
@@ -39,10 +39,10 @@
+ return;
+ }
+ // CraftBukkit end
OutputStream outputstream = Files.newOutputStream(path);
BufferedWriter bufferedwriter = Files.newBufferedWriter(path, StandardCharsets.UTF_8);
try {
@@ -86,7 +106,7 @@
@@ -125,7 +145,7 @@
private static <V extends Number> Function<String, V> wrapNumberDeserializer(Function<String, V> function) {
return (s) -> {
try {
@@ -51,7 +51,7 @@
} catch (NumberFormatException numberformatexception) {
return null;
}
@@ -105,7 +125,7 @@
@@ -144,7 +164,7 @@
@Nullable
private String getStringRaw(String s) {
@@ -60,7 +60,7 @@
}
@Nullable
@@ -121,6 +141,16 @@
@@ -160,6 +180,16 @@
}
protected <V> V get(String s, Function<String, V> function, Function<V, String> function1, V v0) {
@@ -77,7 +77,7 @@
String s1 = this.getStringRaw(s);
V v1 = MoreObjects.firstNonNull(s1 != null ? function.apply(s1) : null, v0);
@@ -133,7 +163,7 @@
@@ -172,7 +202,7 @@
V v1 = MoreObjects.firstNonNull(s1 != null ? function.apply(s1) : null, v0);
this.properties.put(s, function1.apply(v1));
@@ -86,7 +86,7 @@
}
protected <V> V get(String s, Function<String, V> function, UnaryOperator<V> unaryoperator, Function<V, String> function1, V v0) {
@@ -197,7 +227,7 @@
@@ -236,7 +266,7 @@
return properties;
}
@@ -95,7 +95,7 @@
public class EditableProperty<V> implements Supplier<V> {
@@ -205,7 +235,7 @@
@@ -244,7 +274,7 @@
private final V value;
private final Function<V, String> serializer;
@@ -104,7 +104,7 @@
this.key = s;
this.value = object;
this.serializer = function;
@@ -219,7 +249,7 @@
@@ -258,7 +288,7 @@
Properties properties = PropertyManager.this.cloneProperties();
properties.put(this.key, this.serializer.apply(v0));