diff options
Diffstat (limited to 'patches/server')
7 files changed, 31 insertions, 15 deletions
diff --git a/patches/server/0608-Add-methods-to-get-world-by-key.patch b/patches/server/0608-Add-methods-to-get-world-by-key.patch index ae7c417602..8f000fac00 100644 --- a/patches/server/0608-Add-methods-to-get-world-by-key.patch +++ b/patches/server/0608-Add-methods-to-get-world-by-key.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add methods to get world by key diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index f904ce285548a81835b1d3af9c05f00f84d5d3da..6f30668471c2076e2bbd8af79791bbe362f4d08e 100644 +index ce93a00aba502b6d3e962c9396a82ae2587a6b52..b651a9d86a5b0e7ec2b10d2e756bbac4624f7f9c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1138,9 +1138,15 @@ public final class CraftServer implements Server { @@ -51,3 +51,19 @@ index f904ce285548a81835b1d3af9c05f00f84d5d3da..6f30668471c2076e2bbd8af79791bbe3 public void addWorld(World world) { // 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 9af0bd83c03a7e9fba04f7b9f0c66029a7f4b65a..c2d86ea45fd70e8790b2591d780dca76f08757bb 100644 +--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java ++++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +@@ -517,6 +517,11 @@ public final class CraftMagicNumbers implements UnsafeValues { + public <T extends org.bukkit.Keyed> Registry<T> registryFor(Class<T> classOfT) { + return io.papermc.paper.registry.PaperRegistry.getRegistry(classOfT); + } ++ ++ @Override ++ public String getMainLevelName() { ++ return ((net.minecraft.server.dedicated.DedicatedServer) net.minecraft.server.MinecraftServer.getServer()).getProperties().levelName; ++ } + // Paper end + + /** diff --git a/patches/server/0610-Item-Rarity-API.patch b/patches/server/0610-Item-Rarity-API.patch index 29bd01b295..6ca8aa7912 100644 --- a/patches/server/0610-Item-Rarity-API.patch +++ b/patches/server/0610-Item-Rarity-API.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Item Rarity API diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 9374dd74d42e005b7573800d3e9a356e1c57ea86..9cd69efe2923fd4c1680d386b8c16084359561c4 100644 +index c2d86ea45fd70e8790b2591d780dca76f08757bb..83ff35f53e8a327757aae9a437ca74640a686c56 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -517,6 +517,20 @@ public final class CraftMagicNumbers implements UnsafeValues { - public <T extends org.bukkit.Keyed> Registry<T> registryFor(Class<T> classOfT) { - return io.papermc.paper.registry.PaperRegistry.getRegistry(classOfT); +@@ -522,6 +522,20 @@ public final class CraftMagicNumbers implements UnsafeValues { + public String getMainLevelName() { + return ((net.minecraft.server.dedicated.DedicatedServer) net.minecraft.server.MinecraftServer.getServer()).getProperties().levelName; } + + @Override diff --git a/patches/server/0617-Expose-protocol-version.patch b/patches/server/0617-Expose-protocol-version.patch index 3f69974e93..a274f4fe6c 100644 --- a/patches/server/0617-Expose-protocol-version.patch +++ b/patches/server/0617-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 9cd69efe2923fd4c1680d386b8c16084359561c4..61a1992c3cd256c46f9a989bcb041f511f829378 100644 +index 83ff35f53e8a327757aae9a437ca74640a686c56..209ad4d73e7ac0c76600a4c68d9473765f09c240 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -531,6 +531,11 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -536,6 +536,11 @@ public final class CraftMagicNumbers implements UnsafeValues { public io.papermc.paper.inventory.ItemRarity getItemStackRarity(org.bukkit.inventory.ItemStack itemStack) { return io.papermc.paper.inventory.ItemRarity.values()[getItem(itemStack.getType()).getRarity(CraftItemStack.asNMSCopy(itemStack)).ordinal()]; } diff --git a/patches/server/0649-ItemStack-repair-check-API.patch b/patches/server/0649-ItemStack-repair-check-API.patch index 4663820353..debbecf4bc 100644 --- a/patches/server/0649-ItemStack-repair-check-API.patch +++ b/patches/server/0649-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 61a1992c3cd256c46f9a989bcb041f511f829378..cdd1c1a5486d3a8a08642aec9a752b2eaeeb8f96 100644 +index 209ad4d73e7ac0c76600a4c68d9473765f09c240..9a98097f2d6beb6e7125ac5a7a2d60747d143a36 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -532,6 +532,14 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -537,6 +537,14 @@ public final class CraftMagicNumbers implements UnsafeValues { return io.papermc.paper.inventory.ItemRarity.values()[getItem(itemStack.getType()).getRarity(CraftItemStack.asNMSCopy(itemStack)).ordinal()]; } diff --git a/patches/server/0655-Attributes-API-for-item-defaults.patch b/patches/server/0655-Attributes-API-for-item-defaults.patch index dd2a25bfc9..59fb29e46e 100644 --- a/patches/server/0655-Attributes-API-for-item-defaults.patch +++ b/patches/server/0655-Attributes-API-for-item-defaults.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Attributes API for item defaults diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index cdd1c1a5486d3a8a08642aec9a752b2eaeeb8f96..0a4a9a151c8f58cd44497bf43c3bed8f9a7d87c5 100644 +index 9a98097f2d6beb6e7125ac5a7a2d60747d143a36..5e6e0b137604ac64e11a2dd883978ff1c8c59012 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -540,6 +540,19 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -545,6 +545,19 @@ public final class CraftMagicNumbers implements UnsafeValues { return CraftMagicNumbers.getItem(itemToBeRepaired.getType()).isValidRepairItem(CraftItemStack.asNMSCopy(itemToBeRepaired), CraftItemStack.asNMSCopy(repairMaterial)); } diff --git a/patches/server/0712-Get-entity-default-attributes.patch b/patches/server/0712-Get-entity-default-attributes.patch index 6ae983a717..2f754ee5f6 100644 --- a/patches/server/0712-Get-entity-default-attributes.patch +++ b/patches/server/0712-Get-entity-default-attributes.patch @@ -90,10 +90,10 @@ index 0000000000000000000000000000000000000000..4ecba0b02c2813a890aecc5586987879 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 0a4a9a151c8f58cd44497bf43c3bed8f9a7d87c5..40574ff722e3cb3dcce0e7fa0b0d2a692d33e3f9 100644 +index 5e6e0b137604ac64e11a2dd883978ff1c8c59012..acd2bbe5807fcf1abc65da63c2a049735aefe977 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -557,6 +557,18 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -562,6 +562,18 @@ public final class CraftMagicNumbers implements UnsafeValues { public int getProtocolVersion() { return net.minecraft.SharedConstants.getCurrentVersion().getProtocolVersion(); } diff --git a/patches/server/0718-Add-isCollidable-methods-to-various-places.patch b/patches/server/0718-Add-isCollidable-methods-to-various-places.patch index 374f139fe4..974af6bc3b 100644 --- a/patches/server/0718-Add-isCollidable-methods-to-various-places.patch +++ b/patches/server/0718-Add-isCollidable-methods-to-various-places.patch @@ -37,10 +37,10 @@ index 7b9e943b391c061782fccd2b8d705ceec8db50fe..966ac60daebb7bb211ab8096fc0c5f33 + // 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 40574ff722e3cb3dcce0e7fa0b0d2a692d33e3f9..17e67d32522ddeb9a8db06089fb7b7f3ed894d4d 100644 +index acd2bbe5807fcf1abc65da63c2a049735aefe977..2ab43400661fcc98d989e375dbeffa12e187c5e9 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -569,6 +569,12 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -574,6 +574,12 @@ public final class CraftMagicNumbers implements UnsafeValues { var supplier = net.minecraft.world.entity.ai.attributes.DefaultAttributes.getSupplier((net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.LivingEntity>) net.minecraft.core.Registry.ENTITY_TYPE.get(CraftNamespacedKey.toMinecraft(bukkitEntityKey))); return new io.papermc.paper.attribute.UnmodifiableAttributeMap(supplier); } |