3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 04:20:04 +01:00

[CI-SKIP] Remove bad null annotation (#5538)

Dieser Commit ist enthalten in:
Jake Potrebic 2021-04-23 14:08:56 -07:00 committet von GitHub
Ursprung 454a4c78ee
Commit 5ed7715916
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
4 geänderte Dateien mit 14 neuen und 12 gelöschten Zeilen

Datei anzeigen

@ -2375,7 +2375,7 @@ index e543b6927280a14e1d1220534758289934e31282..d5bec8b0e155ea5ae5746b6da571754a
return this.b.size(); return this.b.size();
} }
diff --git a/src/main/java/net/minecraft/nbt/NBTTagCompound.java b/src/main/java/net/minecraft/nbt/NBTTagCompound.java diff --git a/src/main/java/net/minecraft/nbt/NBTTagCompound.java b/src/main/java/net/minecraft/nbt/NBTTagCompound.java
index b2fb24e9ae19ab6e7039a98fc0c265f801be8a99..44fefe1cdc23667219ce825ba283f84cd3020e14 100644 index b2fb24e9ae19ab6e7039a98fc0c265f801be8a99..bf4826e90976fed2ae95e84cadc7f29433af1ddf 100644
--- a/src/main/java/net/minecraft/nbt/NBTTagCompound.java --- a/src/main/java/net/minecraft/nbt/NBTTagCompound.java
+++ b/src/main/java/net/minecraft/nbt/NBTTagCompound.java +++ b/src/main/java/net/minecraft/nbt/NBTTagCompound.java
@@ -76,7 +76,7 @@ public class NBTTagCompound implements NBTBase { @@ -76,7 +76,7 @@ public class NBTTagCompound implements NBTBase {
@ -2387,7 +2387,7 @@ index b2fb24e9ae19ab6e7039a98fc0c265f801be8a99..44fefe1cdc23667219ce825ba283f84c
protected NBTTagCompound(Map<String, NBTBase> map) { protected NBTTagCompound(Map<String, NBTBase> map) {
this.map = map; this.map = map;
@@ -139,10 +139,14 @@ public class NBTTagCompound implements NBTBase { @@ -139,10 +139,16 @@ public class NBTTagCompound implements NBTBase {
this.map.put(s, NBTTagLong.a(i)); this.map.put(s, NBTTagLong.a(i));
} }
@ -2397,8 +2397,10 @@ index b2fb24e9ae19ab6e7039a98fc0c265f801be8a99..44fefe1cdc23667219ce825ba283f84c
} }
+ +
+ @Nullable public UUID getUUID(String prefix) { return a(prefix); } // Paper - OBFHELPER + /**
+ @Nullable + * You must use {@link #hasUUID(String)} before or else it <b>will</b> throw an NPE.
+ */
+ public UUID getUUID(String prefix) { return a(prefix); } // Paper - OBFHELPER
public UUID a(String s) { public UUID a(String s) {
return GameProfileSerializer.a(this.get(s)); return GameProfileSerializer.a(this.get(s));
} }

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Firework API's
diff --git a/src/main/java/net/minecraft/nbt/NBTTagCompound.java b/src/main/java/net/minecraft/nbt/NBTTagCompound.java diff --git a/src/main/java/net/minecraft/nbt/NBTTagCompound.java b/src/main/java/net/minecraft/nbt/NBTTagCompound.java
index 44fefe1cdc23667219ce825ba283f84cd3020e14..2e862122fd4596c26318aac3b12165970a1660f8 100644 index bf4826e90976fed2ae95e84cadc7f29433af1ddf..d5508deff819309034554abc7b36aac40fa33503 100644
--- a/src/main/java/net/minecraft/nbt/NBTTagCompound.java --- a/src/main/java/net/minecraft/nbt/NBTTagCompound.java
+++ b/src/main/java/net/minecraft/nbt/NBTTagCompound.java +++ b/src/main/java/net/minecraft/nbt/NBTTagCompound.java
@@ -151,6 +151,7 @@ public class NBTTagCompound implements NBTBase { @@ -153,6 +153,7 @@ public class NBTTagCompound implements NBTBase {
return GameProfileSerializer.a(this.get(s)); return GameProfileSerializer.a(this.get(s));
} }

Datei anzeigen

@ -8,7 +8,7 @@ is important because we clone chunk data after reading it for safety.
So, reduce the impact of the clone on GC. So, reduce the impact of the clone on GC.
diff --git a/src/main/java/net/minecraft/nbt/NBTTagCompound.java b/src/main/java/net/minecraft/nbt/NBTTagCompound.java diff --git a/src/main/java/net/minecraft/nbt/NBTTagCompound.java b/src/main/java/net/minecraft/nbt/NBTTagCompound.java
index 2e862122fd4596c26318aac3b12165970a1660f8..e37c82c3af7c0fea9c85f7bc8d7a4df648e723ff 100644 index d5508deff819309034554abc7b36aac40fa33503..77afbaad5b2cb8d912f5404fcbd3a0970490f4f3 100644
--- a/src/main/java/net/minecraft/nbt/NBTTagCompound.java --- a/src/main/java/net/minecraft/nbt/NBTTagCompound.java
+++ b/src/main/java/net/minecraft/nbt/NBTTagCompound.java +++ b/src/main/java/net/minecraft/nbt/NBTTagCompound.java
@@ -26,6 +26,7 @@ import net.minecraft.ReportedException; @@ -26,6 +26,7 @@ import net.minecraft.ReportedException;
@ -37,7 +37,7 @@ index 2e862122fd4596c26318aac3b12165970a1660f8..e37c82c3af7c0fea9c85f7bc8d7a4df6
} }
@Override @Override
@@ -415,9 +416,17 @@ public class NBTTagCompound implements NBTBase { @@ -417,9 +418,17 @@ public class NBTTagCompound implements NBTBase {
@Override @Override
public NBTTagCompound clone() { public NBTTagCompound clone() {

Datei anzeigen

@ -24,7 +24,7 @@ index 0560d115288c67e46d921ce529e603f424e601f5..50515cd9287505fcc8ab52e47393fb1d
uuid = nbttagcompound.a("Id"); uuid = nbttagcompound.a("Id");
} }
diff --git a/src/main/java/net/minecraft/nbt/NBTTagCompound.java b/src/main/java/net/minecraft/nbt/NBTTagCompound.java diff --git a/src/main/java/net/minecraft/nbt/NBTTagCompound.java b/src/main/java/net/minecraft/nbt/NBTTagCompound.java
index e37c82c3af7c0fea9c85f7bc8d7a4df648e723ff..b8a0bbac91c64254f7d4b0661a2365b6ece9bbc7 100644 index 77afbaad5b2cb8d912f5404fcbd3a0970490f4f3..945df83d4a2170cdcc29cb6d7b9f0f5f3940cb96 100644
--- a/src/main/java/net/minecraft/nbt/NBTTagCompound.java --- a/src/main/java/net/minecraft/nbt/NBTTagCompound.java
+++ b/src/main/java/net/minecraft/nbt/NBTTagCompound.java +++ b/src/main/java/net/minecraft/nbt/NBTTagCompound.java
@@ -142,6 +142,12 @@ public class NBTTagCompound implements NBTBase { @@ -142,6 +142,12 @@ public class NBTTagCompound implements NBTBase {
@ -40,9 +40,9 @@ index e37c82c3af7c0fea9c85f7bc8d7a4df648e723ff..b8a0bbac91c64254f7d4b0661a2365b6
this.map.put(s, GameProfileSerializer.a(uuid)); this.map.put(s, GameProfileSerializer.a(uuid));
} }
@@ -149,11 +155,21 @@ public class NBTTagCompound implements NBTBase { @@ -151,11 +157,21 @@ public class NBTTagCompound implements NBTBase {
@Nullable public UUID getUUID(String prefix) { return a(prefix); } // Paper - OBFHELPER */
@Nullable public UUID getUUID(String prefix) { return a(prefix); } // Paper - OBFHELPER
public UUID a(String s) { public UUID a(String s) {
+ // Paper start - support old format + // Paper start - support old format
+ if (!hasKeyOfType(s, 11) && this.hasKeyOfType(s + "Most", 99) && this.hasKeyOfType(s + "Least", 99)) { + if (!hasKeyOfType(s, 11) && this.hasKeyOfType(s + "Most", 99) && this.hasKeyOfType(s + "Least", 99)) {