aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch68
-rw-r--r--patches/server/0023-Timings-v2.patch4
-rw-r--r--patches/server/0033-Expose-server-build-information.patch4
-rw-r--r--patches/server/0176-Player.setPlayerProfile-API.patch4
-rw-r--r--patches/server/0329-Add-Raw-Byte-ItemStack-Serialization.patch4
-rw-r--r--patches/server/0414-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch4
-rw-r--r--patches/server/0474-Add-RegistryAccess-for-managing-Registries.patch8
-rw-r--r--patches/server/0504-Expand-world-key-API.patch4
-rw-r--r--patches/server/0509-Expose-protocol-version.patch4
-rw-r--r--patches/server/0536-ItemStack-repair-check-API.patch4
-rw-r--r--patches/server/0543-Improve-item-default-attribute-API.patch4
-rw-r--r--patches/server/0588-Get-entity-default-attributes.patch4
-rw-r--r--patches/server/0590-Add-more-advancement-API.patch4
-rw-r--r--patches/server/0591-Add-ItemFactory-getSpawnEgg-API.patch4
-rw-r--r--patches/server/0597-Add-Raw-Byte-Entity-Serialization.patch4
-rw-r--r--patches/server/0736-Add-NamespacedKey-biome-methods.patch4
-rw-r--r--patches/server/0746-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch4
-rw-r--r--patches/server/0859-Fix-custom-statistic-criteria-creation.patch4
-rw-r--r--patches/server/0931-Add-api-for-spawn-egg-texture-colors.patch4
-rw-r--r--patches/server/0932-Add-Lifecycle-Event-system.patch4
-rw-r--r--patches/server/0933-ItemStack-Tooltip-API.patch4
-rw-r--r--patches/server/0989-Rewrite-dataconverter-system.patch6
-rw-r--r--patches/server/1021-Registry-Modification-API.patch4
-rw-r--r--patches/server/1024-Proxy-ItemStack-to-CraftItemStack.patch4
24 files changed, 81 insertions, 85 deletions
diff --git a/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch b/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch
index 0e3a3ca1d8..ed625b27de 100644
--- a/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch
+++ b/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch
@@ -237,26 +237,15 @@ index 0000000000000000000000000000000000000000..1240c061c121e8d5eb9add4e5e21955e
+ }
+}
diff --git a/src/main/java/io/papermc/paper/plugin/entrypoint/classloader/PaperClassloaderBytecodeModifier.java b/src/main/java/io/papermc/paper/plugin/entrypoint/classloader/PaperClassloaderBytecodeModifier.java
-index f9a2c55a354c877749db3f92956de802ae575788..39182cdd17473da0123dc7172dce507eab29fedc 100644
+index f9a2c55a354c877749db3f92956de802ae575788..0e734c07dbe82ba4c319a237f9e79b08b57b997f 100644
--- a/src/main/java/io/papermc/paper/plugin/entrypoint/classloader/PaperClassloaderBytecodeModifier.java
+++ b/src/main/java/io/papermc/paper/plugin/entrypoint/classloader/PaperClassloaderBytecodeModifier.java
-@@ -1,12 +1,17 @@
- package io.papermc.paper.plugin.entrypoint.classloader;
-
- import io.papermc.paper.plugin.configuration.PluginMeta;
-+import org.objectweb.asm.ClassReader;
-+import org.objectweb.asm.ClassWriter;
-
- // Stub, implement in future.
- public class PaperClassloaderBytecodeModifier implements ClassloaderBytecodeModifier {
+@@ -7,6 +7,6 @@ public class PaperClassloaderBytecodeModifier implements ClassloaderBytecodeModi
@Override
public byte[] modify(PluginMeta configuration, byte[] bytecode) {
- return bytecode;
-+ ClassReader classReader = new ClassReader(bytecode);
-+ ClassWriter classWriter = new ClassWriter(classReader, 0);
-+ classReader.accept(io.papermc.paper.pluginremap.reflect.ReflectionRemapper.visitor(classWriter), 0);
-+ return classWriter.toByteArray();
++ return io.papermc.paper.pluginremap.reflect.ReflectionRemapper.processClass(bytecode);
}
}
diff --git a/src/main/java/io/papermc/paper/plugin/loader/PaperClasspathBuilder.java b/src/main/java/io/papermc/paper/plugin/loader/PaperClasspathBuilder.java
@@ -331,10 +320,10 @@ index bdd9bc8a414719b9f1d6f01f90539ddb8603a878..1bf0fa1530b8e5f94d726d0313b7a00f
// Copied from SimplePluginManager#loadPlugins
diff --git a/src/main/java/io/papermc/paper/pluginremap/reflect/PaperReflection.java b/src/main/java/io/papermc/paper/pluginremap/reflect/PaperReflection.java
new file mode 100644
-index 0000000000000000000000000000000000000000..795d79bcfc4177edfcb12cf9db392780c3f04aa7
+index 0000000000000000000000000000000000000000..92bc8e4933ff13764fa2ac7f3729216332e202c9
--- /dev/null
+++ b/src/main/java/io/papermc/paper/pluginremap/reflect/PaperReflection.java
-@@ -0,0 +1,216 @@
+@@ -0,0 +1,211 @@
+package io.papermc.paper.pluginremap.reflect;
+
+import com.mojang.logging.LogUtils;
@@ -352,8 +341,6 @@ index 0000000000000000000000000000000000000000..795d79bcfc4177edfcb12cf9db392780
+import org.checkerframework.checker.nullness.qual.NonNull;
+import org.checkerframework.checker.nullness.qual.Nullable;
+import org.checkerframework.framework.qual.DefaultQualifier;
-+import org.objectweb.asm.ClassReader;
-+import org.objectweb.asm.ClassWriter;
+import org.slf4j.Logger;
+
+// todo proper inheritance handling
@@ -541,10 +528,7 @@ index 0000000000000000000000000000000000000000..795d79bcfc4177edfcb12cf9db392780
+ // todo apply bytecode remap here as well
+ private static byte[] processClass(final byte[] bytes) {
+ try {
-+ final ClassReader reader = new ClassReader(bytes);
-+ final ClassWriter writer = new ClassWriter(reader, 0);
-+ reader.accept(ReflectionRemapper.visitor(writer), 0);
-+ return writer.toByteArray();
++ return ReflectionRemapper.processClass(bytes);
+ } catch (final Exception ex) {
+ LOGGER.warn("Failed to process class bytes", ex);
+ return bytes;
@@ -553,10 +537,10 @@ index 0000000000000000000000000000000000000000..795d79bcfc4177edfcb12cf9db392780
+}
diff --git a/src/main/java/io/papermc/paper/pluginremap/reflect/ReflectionRemapper.java b/src/main/java/io/papermc/paper/pluginremap/reflect/ReflectionRemapper.java
new file mode 100644
-index 0000000000000000000000000000000000000000..5fa5868e82d1f00498d0c5771369e1718b2df4ee
+index 0000000000000000000000000000000000000000..a3045afbc0cc057e99189b909367b21cf6a9e03f
--- /dev/null
+++ b/src/main/java/io/papermc/paper/pluginremap/reflect/ReflectionRemapper.java
-@@ -0,0 +1,54 @@
+@@ -0,0 +1,66 @@
+package io.papermc.paper.pluginremap.reflect;
+
+import io.papermc.asm.ClassInfoProvider;
@@ -569,7 +553,9 @@ index 0000000000000000000000000000000000000000..5fa5868e82d1f00498d0c5771369e171
+import java.lang.reflect.Method;
+import org.checkerframework.checker.nullness.qual.NonNull;
+import org.checkerframework.framework.qual.DefaultQualifier;
++import org.objectweb.asm.ClassReader;
+import org.objectweb.asm.ClassVisitor;
++import org.objectweb.asm.ClassWriter;
+import org.objectweb.asm.Opcodes;
+
+@DefaultQualifier(NonNull.class)
@@ -593,12 +579,22 @@ index 0000000000000000000000000000000000000000..5fa5868e82d1f00498d0c5771369e171
+ }
+
+ public static ClassVisitor visitor(final ClassVisitor parent) {
-+ if (MappingEnvironment.reobf()) {
++ if (MappingEnvironment.reobf() || MappingEnvironment.DISABLE_PLUGIN_REMAPPING) {
+ return parent;
+ }
+ return VISITOR_FACTORY.createVisitor(parent);
+ }
+
++ public static byte[] processClass(final byte[] bytes) {
++ if (MappingEnvironment.DISABLE_PLUGIN_REMAPPING) {
++ return bytes;
++ }
++ final ClassReader classReader = new ClassReader(bytes);
++ final ClassWriter classWriter = new ClassWriter(classReader, 0);
++ classReader.accept(ReflectionRemapper.visitor(classWriter), 0);
++ return classWriter.toByteArray();
++ }
++
+ private static void setupProxy() {
+ try {
+ final byte[] bytes = ProxyGenerator.generateProxy(PaperReflection.class, PAPER_REFLECTION_HOLDER_DESC);
@@ -649,7 +645,7 @@ index 242811578a786e3807a1a7019d472d5a68f87116..0b65fdf53124f3dd042b2363b1b8df8e
return traceElements;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-index 421ddf6ca955215dff77655a7eda62eb9d90aa92..5dafd7765e82a110803affebc9d7d1905b13d0c9 100644
+index 421ddf6ca955215dff77655a7eda62eb9d90aa92..8a1570ceb4755a1872911751943c84b8f06eb4c2 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
@@ -102,36 +102,26 @@ public class Commodore {
@@ -700,21 +696,16 @@ index 421ddf6ca955215dff77655a7eda62eb9d90aa92..5dafd7765e82a110803affebc9d7d190
}
// Paper end - Plugin rewrites
-@@ -214,7 +204,12 @@ public class Commodore {
+@@ -214,6 +204,7 @@ public class Commodore {
visitor = new LimitedClassRemapper(cw, new SimpleRemapper(Commodore.ENUM_RENAMES));
}
-+ // Paper start
-+ if (!io.papermc.paper.util.MappingEnvironment.DISABLE_PLUGIN_REMAPPING) {
-+ visitor = io.papermc.paper.pluginremap.reflect.ReflectionRemapper.visitor(visitor);
-+ }
++ visitor = io.papermc.paper.pluginremap.reflect.ReflectionRemapper.visitor(visitor); // Paper
cr.accept(new ClassRemapper(new ClassVisitor(Opcodes.ASM9, visitor) {
-+ // Paper end
final Set<RerouteMethodData> rerouteMethodData = new HashSet<>();
String className;
- boolean isInterface;
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index a6de88625aeb2c5ababd476e804e9b45b1185efe..37f3a9f939a947d2b5e1e81d83e74555a636e1eb 100644
+index a6de88625aeb2c5ababd476e804e9b45b1185efe..fa2e43020fafc283a9c063d10a82280158c7f93d 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -74,6 +74,7 @@ import org.bukkit.potion.PotionType;
@@ -734,11 +725,16 @@ index a6de88625aeb2c5ababd476e804e9b45b1185efe..37f3a9f939a947d2b5e1e81d83e74555
CraftLegacy.init();
}
-@@ -355,6 +356,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -355,6 +356,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
@Override
public byte[] processClass(PluginDescriptionFile pdf, String path, byte[] clazz) {
-+ if (DISABLE_OLD_API_SUPPORT) return clazz; // Paper
++ // Paper start
++ if (DISABLE_OLD_API_SUPPORT) {
++ // Make sure we still go through our reflection rewriting if needed
++ return io.papermc.paper.pluginremap.reflect.ReflectionRemapper.processClass(clazz);
++ }
++ // Paper end
try {
clazz = Commodore.convert(clazz, pdf.getName(), ApiVersion.getOrCreateVersion(pdf.getAPIVersion()), ((CraftServer) Bukkit.getServer()).activeCompatibilities);
} catch (Exception ex) {
diff --git a/patches/server/0023-Timings-v2.patch b/patches/server/0023-Timings-v2.patch
index 992258c7f0..0d0d81a7a8 100644
--- a/patches/server/0023-Timings-v2.patch
+++ b/patches/server/0023-Timings-v2.patch
@@ -1985,7 +1985,7 @@ index f97eccb6a17c7876e1e002d798eb67bbe80571a0..76effc345d362047e64d064eb64a5222
+ } // Paper
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 37f3a9f939a947d2b5e1e81d83e74555a636e1eb..c7728af06e03699212cb6b28027d17dfc3391613 100644
+index fa2e43020fafc283a9c063d10a82280158c7f93d..9576cabff99d154ef77595b074082adf9212698d 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -197,6 +197,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
@@ -2001,7 +2001,7 @@ index 37f3a9f939a947d2b5e1e81d83e74555a636e1eb..c7728af06e03699212cb6b28027d17df
public static byte toLegacyData(BlockState data) {
return CraftLegacy.toLegacyData(data);
-@@ -437,6 +443,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -442,6 +448,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
public DamageSource.Builder createDamageSourceBuilder(DamageType damageType) {
return new CraftDamageSourceBuilder(damageType);
}
diff --git a/patches/server/0033-Expose-server-build-information.patch b/patches/server/0033-Expose-server-build-information.patch
index 4c24bfeded..2e9eb338ec 100644
--- a/patches/server/0033-Expose-server-build-information.patch
+++ b/patches/server/0033-Expose-server-build-information.patch
@@ -638,10 +638,10 @@ index 1c8049bbc08be77673d375205bd42a346ff951b8..e37a7aceae6c69083ecf81af4f750c01
net.minecraft.server.Main.main(options);
} catch (Throwable t) {
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index c7728af06e03699212cb6b28027d17dfc3391613..ae4c3925d7e686ad53788e827093ecd5938a9519 100644
+index 9576cabff99d154ef77595b074082adf9212698d..e091356ee1fa3ec09839de6ef5c450824ea40844 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -448,6 +448,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -453,6 +453,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
public String getTimingsServerName() {
return io.papermc.paper.configuration.GlobalConfiguration.get().timings.serverName;
}
diff --git a/patches/server/0176-Player.setPlayerProfile-API.patch b/patches/server/0176-Player.setPlayerProfile-API.patch
index 9f2c7a79df..d847c9d191 100644
--- a/patches/server/0176-Player.setPlayerProfile-API.patch
+++ b/patches/server/0176-Player.setPlayerProfile-API.patch
@@ -220,10 +220,10 @@ index 4602c3d0be94f0146a2b205268f70aaf85410f20..422c25577a0d95b31b5528fad8fc9b3a
public void onEntityRemove(Entity entity) {
this.invertedVisibilityEntities.remove(entity.getUUID());
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-index 14f63e70cb73c2061bcf232f567f9c12ac9ec99d..d9c2fe01d4e7c73a614b393bbd525b395b4cc5e4 100644
+index 8a1570ceb4755a1872911751943c84b8f06eb4c2..38339b8b1b3b70bbbf0259d7095b02ee8c22b609 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-@@ -452,6 +452,13 @@ public class Commodore {
+@@ -448,6 +448,13 @@ public class Commodore {
}
// Paper end - Rewrite plugins
diff --git a/patches/server/0329-Add-Raw-Byte-ItemStack-Serialization.patch b/patches/server/0329-Add-Raw-Byte-ItemStack-Serialization.patch
index 2bb64626ab..f6d20a8f29 100644
--- a/patches/server/0329-Add-Raw-Byte-ItemStack-Serialization.patch
+++ b/patches/server/0329-Add-Raw-Byte-ItemStack-Serialization.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization
Serializes using NBT which is safer for server data migrations than bukkits format.
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index ae4c3925d7e686ad53788e827093ecd5938a9519..e2ada58f99d0c52158a66d604fddb635907c807f 100644
+index e091356ee1fa3ec09839de6ef5c450824ea40844..e6bca66597b9b5a15d911760b44641e17e42e521 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -453,6 +453,53 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -458,6 +458,53 @@ public final class CraftMagicNumbers implements UnsafeValues {
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
return new com.destroystokyo.paper.PaperVersionFetcher();
}
diff --git a/patches/server/0414-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/patches/server/0414-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch
index 46427c30f1..80b97a2ee0 100644
--- a/patches/server/0414-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch
+++ b/patches/server/0414-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch
@@ -21,10 +21,10 @@ index 08dd2b77df5162a3b4b6941663efaa1eb0e42746..f7cfce209dde71e61009f3678c667062
+ // Paper end - Expose entity id counter
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index e2ada58f99d0c52158a66d604fddb635907c807f..22fc5bf2024f70f85cc278ddd374bff0a6d626fa 100644
+index e6bca66597b9b5a15d911760b44641e17e42e521..2979277847635c0bef54d06be30e5051557cc5e9 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -500,6 +500,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -505,6 +505,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
Preconditions.checkArgument(dataVersion <= getDataVersion(), "Newer version! Server downgrades are not supported!");
return compound;
}
diff --git a/patches/server/0474-Add-RegistryAccess-for-managing-Registries.patch b/patches/server/0474-Add-RegistryAccess-for-managing-Registries.patch
index efca5b32a0..1c7e1f531e 100644
--- a/patches/server/0474-Add-RegistryAccess-for-managing-Registries.patch
+++ b/patches/server/0474-Add-RegistryAccess-for-managing-Registries.patch
@@ -893,7 +893,7 @@ index 1f58b92c17d28e14621e8dc28042a5368f1f4a1f..ef80e6b4dff557daaab1b9fde4d8d401
// PatternType
private static final FieldRenameData PATTERN_TYPE_DATA = FieldRenameData.Builder.newBuilder()
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-index d9c2fe01d4e7c73a614b393bbd525b395b4cc5e4..49830bf42c6f567fb71b9ddc8d0640dd6e846adb 100644
+index 38339b8b1b3b70bbbf0259d7095b02ee8c22b609..9fffb9c9161caad8eb62a99b37d0f31862b568a5 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
@@ -189,20 +189,10 @@ public class Commodore {
@@ -915,9 +915,9 @@ index d9c2fe01d4e7c73a614b393bbd525b395b4cc5e4..49830bf42c6f567fb71b9ddc8d0640dd
- visitor = new LimitedClassRemapper(cw, new SimpleRemapper(Commodore.ENUM_RENAMES));
- }
- // Paper start
- if (!io.papermc.paper.util.MappingEnvironment.DISABLE_PLUGIN_REMAPPING) {
-@@ -273,15 +263,6 @@ public class Commodore {
+ visitor = io.papermc.paper.pluginremap.reflect.ReflectionRemapper.visitor(visitor); // Paper
+ cr.accept(new ClassRemapper(new ClassVisitor(Opcodes.ASM9, visitor) {
+@@ -269,15 +259,6 @@ public class Commodore {
@Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
diff --git a/patches/server/0504-Expand-world-key-API.patch b/patches/server/0504-Expand-world-key-API.patch
index 3c62a61284..3a2e31f54d 100644
--- a/patches/server/0504-Expand-world-key-API.patch
+++ b/patches/server/0504-Expand-world-key-API.patch
@@ -67,10 +67,10 @@ index a29f4992f7927d0f241962f972dd13ce77094d97..f83eb7fd5c9b368ba0bf9e07a568d69c
// Check if a World already exists with the UID.
if (this.getWorld(world.getUID()) != null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 12c4f68623119427a30c1eec28b4aff0400aa8c0..9c95d223f10bdecb824952d2f02cef3dbc6ef1a3 100644
+index 5fe9b94c342a91d6fb3bc582ac7e84cb25b90a9e..e44bcf61c09245a63d50dd1be3c5b1fca7225ff9 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -511,6 +511,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -516,6 +516,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
public int nextEntityId() {
return net.minecraft.world.entity.Entity.nextEntityId();
}
diff --git a/patches/server/0509-Expose-protocol-version.patch b/patches/server/0509-Expose-protocol-version.patch
index e4279f04ef..3b28ea2ad4 100644
--- a/patches/server/0509-Expose-protocol-version.patch
+++ b/patches/server/0509-Expose-protocol-version.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Expose protocol version
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 9c95d223f10bdecb824952d2f02cef3dbc6ef1a3..710b7ad1af3191954b2807d94519ed41b4f84c1b 100644
+index e44bcf61c09245a63d50dd1be3c5b1fca7225ff9..fd36c8c62503e4ce035d51b0cc4e8dd55e66cc5d 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -516,6 +516,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -521,6 +521,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
public String getMainLevelName() {
return ((net.minecraft.server.dedicated.DedicatedServer) net.minecraft.server.MinecraftServer.getServer()).getProperties().levelName;
}
diff --git a/patches/server/0536-ItemStack-repair-check-API.patch b/patches/server/0536-ItemStack-repair-check-API.patch
index 21c3957069..32e70257f8 100644
--- a/patches/server/0536-ItemStack-repair-check-API.patch
+++ b/patches/server/0536-ItemStack-repair-check-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack repair check API
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 710b7ad1af3191954b2807d94519ed41b4f84c1b..b055323acde8577e4254ea64e36756c5298a4e9d 100644
+index fd36c8c62503e4ce035d51b0cc4e8dd55e66cc5d..dec695198708838fd77285ba818e82861da49a98 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -521,6 +521,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -526,6 +526,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
public int getProtocolVersion() {
return net.minecraft.SharedConstants.getCurrentVersion().getProtocolVersion();
}
diff --git a/patches/server/0543-Improve-item-default-attribute-API.patch b/patches/server/0543-Improve-item-default-attribute-API.patch
index 2658ab8810..ecbcd11bb8 100644
--- a/patches/server/0543-Improve-item-default-attribute-API.patch
+++ b/patches/server/0543-Improve-item-default-attribute-API.patch
@@ -65,10 +65,10 @@ index 66d773cadb74f9176e6cf68a565568034f52ec63..a1f2b9d40d374e8cdbaf916b25fa74b6
return defaultAttributes.build();
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index b055323acde8577e4254ea64e36756c5298a4e9d..29704bcb5305baf3234d9cabe0b01c7afc1d9e0a 100644
+index dec695198708838fd77285ba818e82861da49a98..17fc3d78f1f5002d8f9cb2113706a2cc6a6c821f 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -380,7 +380,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -385,7 +385,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
@Override
public Multimap<Attribute, AttributeModifier> getDefaultAttributeModifiers(Material material, EquipmentSlot slot) {
diff --git a/patches/server/0588-Get-entity-default-attributes.patch b/patches/server/0588-Get-entity-default-attributes.patch
index 4175c64212..f90946ef42 100644
--- a/patches/server/0588-Get-entity-default-attributes.patch
+++ b/patches/server/0588-Get-entity-default-attributes.patch
@@ -81,10 +81,10 @@ index 0000000000000000000000000000000000000000..ec9ebd2d539333293c51b7edfa18f18b
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 29704bcb5305baf3234d9cabe0b01c7afc1d9e0a..42e84070f3fd5ba45914040e4014b07fa85c30de 100644
+index 17fc3d78f1f5002d8f9cb2113706a2cc6a6c821f..98f60520ced0a68dc1e35999b9eaea405a9799ed 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -533,6 +533,18 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -538,6 +538,18 @@ public final class CraftMagicNumbers implements UnsafeValues {
}
return CraftMagicNumbers.getItem(itemToBeRepaired.getType()).isValidRepairItem(CraftItemStack.asNMSCopy(itemToBeRepaired), CraftItemStack.asNMSCopy(repairMaterial));
}
diff --git a/patches/server/0590-Add-more-advancement-API.patch b/patches/server/0590-Add-more-advancement-API.patch
index 34d7c09cc5..160686a23d 100644
--- a/patches/server/0590-Add-more-advancement-API.patch
+++ b/patches/server/0590-Add-more-advancement-API.patch
@@ -164,10 +164,10 @@ index 8ca86852319d7463f60832bc98b825b0b4325995..62ada73302c6b3ce3fb2dcc8c31a1d9c
private final DisplayInfo handle;
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-index 49830bf42c6f567fb71b9ddc8d0640dd6e846adb..39692426407bf8621e7ee0b5504ae3bd07a270aa 100644
+index 9fffb9c9161caad8eb62a99b37d0f31862b568a5..72eca2c6e2107f695ad6c1d85e02dae1890ea410 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-@@ -438,6 +438,11 @@ public class Commodore {
+@@ -434,6 +434,11 @@ public class Commodore {
super.visitMethodInsn(opcode, owner, name, "()Lcom/destroystokyo/paper/profile/PlayerProfile;", itf);
return;
}
diff --git a/patches/server/0591-Add-ItemFactory-getSpawnEgg-API.patch b/patches/server/0591-Add-ItemFactory-getSpawnEgg-API.patch
index 9aeef29d71..e31dc566fb 100644
--- a/patches/server/0591-Add-ItemFactory-getSpawnEgg-API.patch
+++ b/patches/server/0591-Add-ItemFactory-getSpawnEgg-API.patch
@@ -37,10 +37,10 @@ index eabb8b42b890224dd19b879ff276e9908674310d..803a19063c03627dbea79cb1c395ae35
+ // Paper end - old getSpawnEgg API
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-index 39692426407bf8621e7ee0b5504ae3bd07a270aa..5c299efdbe4bfee1bb72ca012062233c8c5924bf 100644
+index 72eca2c6e2107f695ad6c1d85e02dae1890ea410..b67dfb358a9c1ae26793557ca2151357db4b1691 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-@@ -445,6 +445,15 @@ public class Commodore {
+@@ -441,6 +441,15 @@ public class Commodore {
}
// Paper end
diff --git a/patches/server/0597-Add-Raw-Byte-Entity-Serialization.patch b/patches/server/0597-Add-Raw-Byte-Entity-Serialization.patch
index 66826eed68..e0eaf345bf 100644
--- a/patches/server/0597-Add-Raw-Byte-Entity-Serialization.patch
+++ b/patches/server/0597-Add-Raw-Byte-Entity-Serialization.patch
@@ -50,10 +50,10 @@ index 7310f53747e68b918f132ee0f0a142e36537902e..6f9286e65f7ac730b808ddf9b52c344f
@Override
public boolean isInvisible() { // Paper - moved up from LivingEntity
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 42e84070f3fd5ba45914040e4014b07fa85c30de..6d370ac4be0e38c94bbb5bcb8f65cd6ce5761c9f 100644
+index 98f60520ced0a68dc1e35999b9eaea405a9799ed..5ba8ce0f8c516567f38a6f95662bde71086e6ae4 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -483,7 +483,33 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -488,7 +488,33 @@ public final class CraftMagicNumbers implements UnsafeValues {
return CraftItemStack.asCraftMirror(net.minecraft.world.item.ItemStack.parse(MinecraftServer.getServer().registryAccess(), compound).orElseThrow());
}
diff --git a/patches/server/0736-Add-NamespacedKey-biome-methods.patch b/patches/server/0736-Add-NamespacedKey-biome-methods.patch
index 26b294524e..2d26388547 100644
--- a/patches/server/0736-Add-NamespacedKey-biome-methods.patch
+++ b/patches/server/0736-Add-NamespacedKey-biome-methods.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Add NamespacedKey biome methods
Co-authored-by: Thonk <[email protected]>
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 6d370ac4be0e38c94bbb5bcb8f65cd6ce5761c9f..8553ce2565fd1349f6b6e46ab43a3fb2699a2515 100644
+index 5ba8ce0f8c516567f38a6f95662bde71086e6ae4..24cb9d97bb04a4fe60c46055520ec324fbf6fa3b 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -573,6 +573,21 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -578,6 +578,21 @@ public final class CraftMagicNumbers implements UnsafeValues {
}
// Paper end
diff --git a/patches/server/0746-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch b/patches/server/0746-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch
index 1f044f2ad6..f517c5483b 100644
--- a/patches/server/0746-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch
+++ b/patches/server/0746-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch
@@ -7,10 +7,10 @@ Subject: [PATCH] Mitigate effects of WorldCreator#keepSpawnLoaded ret type
TODO: Remove in 1.21?
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-index 5c299efdbe4bfee1bb72ca012062233c8c5924bf..fbec87208ac6057f0522a826a08ab6a944b9361e 100644
+index b67dfb358a9c1ae26793557ca2151357db4b1691..a28bd14454a599014f24ed21210a8a185ac624db 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-@@ -443,6 +443,12 @@ public class Commodore {
+@@ -439,6 +439,12 @@ public class Commodore {
super.visitMethodInsn(Opcodes.INVOKEVIRTUAL, runtimeCbPkgPrefix() + "advancement/CraftAdvancement", "getDisplay0", desc, false);
return;
}
diff --git a/patches/server/0859-Fix-custom-statistic-criteria-creation.patch b/patches/server/0859-Fix-custom-statistic-criteria-creation.patch
index 398f95a5c2..bd32b5af31 100644
--- a/patches/server/0859-Fix-custom-statistic-criteria-creation.patch
+++ b/patches/server/0859-Fix-custom-statistic-criteria-creation.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix custom statistic criteria creation
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 8553ce2565fd1349f6b6e46ab43a3fb2699a2515..48eeac0795c479ebb2ff64005b1405421131fcd7 100644
+index 24cb9d97bb04a4fe60c46055520ec324fbf6fa3b..398068e8ffa77ac7199baf7aaab5b60c9dc639f5 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -588,6 +588,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -593,6 +593,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
}
// Paper end - namespaced key biome methods
diff --git a/patches/server/0931-Add-api-for-spawn-egg-texture-colors.patch b/patches/server/0931-Add-api-for-spawn-egg-texture-colors.patch
index a839fe5725..bc65a0c926 100644
--- a/patches/server/0931-Add-api-for-spawn-egg-texture-colors.patch
+++ b/patches/server/0931-Add-api-for-spawn-egg-texture-colors.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add api for spawn egg texture colors
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 1d98c0e9f138f122aa73e2f1dd6d485d7865720d..e65329cfe1a603c3676379c7c8e1a84b774cd980 100644
+index 9449fe944c7a06a8fdeaf0a0dfc7280950fdb6db..87e5ce7b30efe8ec99191208636b1420e4d002a1 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -632,6 +632,15 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -637,6 +637,15 @@ public final class CraftMagicNumbers implements UnsafeValues {
return CraftRegistry.get(registry, namespacedKey, ApiVersion.CURRENT);
}
diff --git a/patches/server/0932-Add-Lifecycle-Event-system.patch b/patches/server/0932-Add-Lifecycle-Event-system.patch
index 5381652eae..cb31df174d 100644
--- a/patches/server/0932-Add-Lifecycle-Event-system.patch
+++ b/patches/server/0932-Add-Lifecycle-Event-system.patch
@@ -735,10 +735,10 @@ index 7ea2676397025bdbe20f88ec122bd6d545dcf959..61c19b1005dc387d671fd72331a8774c
this.reloadCount++;
this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index e65329cfe1a603c3676379c7c8e1a84b774cd980..455127a4a1574cb525b2ddc69c26a0be7cef45d5 100644
+index 87e5ce7b30efe8ec99191208636b1420e4d002a1..09cba6563ae754f51cfb352ba63e097fc2bd9b65 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -641,6 +641,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -646,6 +646,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
}
// Paper end - spawn egg color visibility
diff --git a/patches/server/0933-ItemStack-Tooltip-API.patch b/patches/server/0933-ItemStack-Tooltip-API.patch
index 3c55a9716b..8858ce7085 100644
--- a/patches/server/0933-ItemStack-Tooltip-API.patch
+++ b/patches/server/0933-ItemStack-Tooltip-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack Tooltip API
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 455127a4a1574cb525b2ddc69c26a0be7cef45d5..ed2c4c61eab5034ed1ef4fc6a22b205bcde9664f 100644
+index 09cba6563ae754f51cfb352ba63e097fc2bd9b65..364202607498b376422d02d91965430e90d21fec 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -617,6 +617,21 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -622,6 +622,21 @@ public final class CraftMagicNumbers implements UnsafeValues {
}
// Paper end - fix custom stats criteria creation
diff --git a/patches/server/0989-Rewrite-dataconverter-system.patch b/patches/server/0989-Rewrite-dataconverter-system.patch
index 148288b95e..6df1423d3c 100644
--- a/patches/server/0989-Rewrite-dataconverter-system.patch
+++ b/patches/server/0989-Rewrite-dataconverter-system.patch
@@ -29388,10 +29388,10 @@ index 1d287dd7379e56f7fd4b425880b850cd843f5789..8ab7ca373a885fbe658013c9c6a2e38d
return nbttagcompound;
});
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index ed2c4c61eab5034ed1ef4fc6a22b205bcde9664f..0c5a941c93ff382642ce1084d5da4ccb98204209 100644
+index 364202607498b376422d02d91965430e90d21fec..e182de47cc9c12f2d7051edd0ab3d2b4267f54b2 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -500,7 +500,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -505,7 +505,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
net.minecraft.nbt.CompoundTag compound = deserializeNbtFromBytes(data);
final int dataVersion = compound.getInt("DataVersion");
@@ -29400,7 +29400,7 @@ index ed2c4c61eab5034ed1ef4fc6a22b205bcde9664f..0c5a941c93ff382642ce1084d5da4ccb
return CraftItemStack.asCraftMirror(net.minecraft.world.item.ItemStack.parse(MinecraftServer.getServer().registryAccess(), compound).orElseThrow());
}
-@@ -521,7 +521,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -526,7 +526,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
net.minecraft.nbt.CompoundTag compound = deserializeNbtFromBytes(data);
int dataVersion = compound.getInt("DataVersion");
diff --git a/patches/server/1021-Registry-Modification-API.patch b/patches/server/1021-Registry-Modification-API.patch
index a56f026a06..8c55ac4526 100644
--- a/patches/server/1021-Registry-Modification-API.patch
+++ b/patches/server/1021-Registry-Modification-API.patch
@@ -1347,10 +1347,10 @@ index fc9aec589414bf8d3f672183928235b5b51d1a02..0f3c46b8bb93fc42160300c9988d04be
+ // Paper end - RegistrySet API
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 0c5a941c93ff382642ce1084d5da4ccb98204209..1667baf13566649005a15054686d45ccf7ff1674 100644
+index e182de47cc9c12f2d7051edd0ab3d2b4267f54b2..02be833b259873c27bd629bb3148f2286f418bc3 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -663,6 +663,21 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -668,6 +668,21 @@ public final class CraftMagicNumbers implements UnsafeValues {
}
// Paper end - lifecycle event API
diff --git a/patches/server/1024-Proxy-ItemStack-to-CraftItemStack.patch b/patches/server/1024-Proxy-ItemStack-to-CraftItemStack.patch
index 61194132fb..b4f7446aff 100644
--- a/patches/server/1024-Proxy-ItemStack-to-CraftItemStack.patch
+++ b/patches/server/1024-Proxy-ItemStack-to-CraftItemStack.patch
@@ -205,10 +205,10 @@ index 9c004e7cb46841d874ab997bf2e3b63ae763aec7..d7c8f26b21276d9ff1d5c7c9738cc112
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 1667baf13566649005a15054686d45ccf7ff1674..b905fb9800bd1fb765bce12a574afa41867a9171 100644
+index 02be833b259873c27bd629bb3148f2286f418bc3..41c34ffdf9d95a04ed55a1e09ebc78e8cf946777 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -678,6 +678,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -683,6 +683,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
}
// Paper end - hack to get tags for non server-backed registries