diff options
-rw-r--r-- | patches/api/0392-Add-Shearable-API.patch | 24 | ||||
-rw-r--r-- | patches/api/0430-Experimental-annotations-change.patch | 4 | ||||
-rw-r--r-- | patches/server/0379-Add-BlockStateMeta-clearBlockState.patch | 15 | ||||
-rw-r--r-- | patches/server/0808-Add-Shearable-API.patch | 18 | ||||
-rw-r--r-- | patches/server/0966-improve-checking-handled-tags-in-itemmeta.patch | 34 | ||||
-rw-r--r-- | patches/unapplied/server/1027-Optimise-collision-checking-in-player-move-packet-ha.patch (renamed from patches/unapplied-old/server/1027-Optimise-collision-checking-in-player-move-packet-ha.patch) | 0 | ||||
-rw-r--r-- | patches/unapplied/server/1036-Optimise-nearby-player-retrieval.patch (renamed from patches/unapplied-old/server/1036-Optimise-nearby-player-retrieval.patch) | 0 |
7 files changed, 27 insertions, 68 deletions
diff --git a/patches/api/0392-Add-Shearable-API.patch b/patches/api/0392-Add-Shearable-API.patch index dcd0ffe7bd..aa842fac9f 100644 --- a/patches/api/0392-Add-Shearable-API.patch +++ b/patches/api/0392-Add-Shearable-API.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add Shearable API diff --git a/src/main/java/io/papermc/paper/entity/Shearable.java b/src/main/java/io/papermc/paper/entity/Shearable.java new file mode 100644 -index 0000000000000000000000000000000000000000..b547922db418ff813ddb6a3b37dced0db393e1f5 +index 0000000000000000000000000000000000000000..45a18019bec1890f0abbdd8eaf15a8e9f6f1c803 --- /dev/null +++ b/src/main/java/io/papermc/paper/entity/Shearable.java -@@ -0,0 +1,53 @@ +@@ -0,0 +1,43 @@ +package io.papermc.paper.entity; + +import net.kyori.adventure.sound.Sound; @@ -19,7 +19,7 @@ index 0000000000000000000000000000000000000000..b547922db418ff813ddb6a3b37dced0d +/** + * Represents an entity that can be sheared. + */ -+public interface Shearable extends Entity { ++public interface Shearable extends Entity, org.bukkit.entity.Shearable { + + /** + * Forces the entity to be sheared and then play the effect as if it were sheared by a player. @@ -52,19 +52,9 @@ index 0000000000000000000000000000000000000000..b547922db418ff813ddb6a3b37dced0d + * @return if the entity can be sheared + */ + boolean readyToBeSheared(); -+ -+ /** -+ * @return Whether the sheep is sheared. -+ */ -+ public boolean isSheared(); -+ -+ /** -+ * @param flag Whether to shear the sheep -+ */ -+ public void setSheared(boolean flag); +} diff --git a/src/main/java/org/bukkit/entity/Bogged.java b/src/main/java/org/bukkit/entity/Bogged.java -index 8b75a505a55a96a5795ac31a2d37307add12cd9e..6296a6f3f3e794677fd3a626376f357c740ec356 100644 +index 8b75a505a55a96a5795ac31a2d37307add12cd9e..a36bb84c17120bc578ab01d45f6f12fb1faf9548 100644 --- a/src/main/java/org/bukkit/entity/Bogged.java +++ b/src/main/java/org/bukkit/entity/Bogged.java @@ -6,5 +6,5 @@ import org.jetbrains.annotations.ApiStatus; @@ -72,7 +62,7 @@ index 8b75a505a55a96a5795ac31a2d37307add12cd9e..6296a6f3f3e794677fd3a626376f357c */ @ApiStatus.Experimental -public interface Bogged extends AbstractSkeleton, Shearable { -+public interface Bogged extends AbstractSkeleton, Shearable, io.papermc.paper.entity.Shearable { // Paper - Shear API ++public interface Bogged extends AbstractSkeleton, io.papermc.paper.entity.Shearable { // Paper - Shear API } diff --git a/src/main/java/org/bukkit/entity/MushroomCow.java b/src/main/java/org/bukkit/entity/MushroomCow.java index cef1700834643fe28ed5737578d91ecefbe99e2f..86c0043ef4e1288b6fe2f68a9b6d01c3de2c3454 100644 @@ -88,7 +78,7 @@ index cef1700834643fe28ed5737578d91ecefbe99e2f..86c0043ef4e1288b6fe2f68a9b6d01c3 /** * Checks for the presence of custom potion effects to be applied to the diff --git a/src/main/java/org/bukkit/entity/Sheep.java b/src/main/java/org/bukkit/entity/Sheep.java -index 46bc1a0ed9ee320c68a38362c1fa1f31319f01d8..01a0e5b1bb18d7a28d68329c2e2ab78a8df45f8e 100644 +index 46bc1a0ed9ee320c68a38362c1fa1f31319f01d8..45f55faed0d5f0db2671fa1ace59591e8061c4f2 100644 --- a/src/main/java/org/bukkit/entity/Sheep.java +++ b/src/main/java/org/bukkit/entity/Sheep.java @@ -5,5 +5,5 @@ import org.bukkit.material.Colorable; @@ -96,7 +86,7 @@ index 46bc1a0ed9ee320c68a38362c1fa1f31319f01d8..01a0e5b1bb18d7a28d68329c2e2ab78a * Represents a Sheep. */ -public interface Sheep extends Animals, Colorable, Shearable { -+public interface Sheep extends Animals, Colorable, Shearable, io.papermc.paper.entity.Shearable { // Paper - Shear API ++public interface Sheep extends Animals, Colorable, io.papermc.paper.entity.Shearable { // Paper - Shear API } diff --git a/src/main/java/org/bukkit/entity/Snowman.java b/src/main/java/org/bukkit/entity/Snowman.java index 10f8f6d45ae9280651c3ebddd1f90acbd7d6ff29..7fbfdb07585c7b28acea1f0c1f58ada0cc744441 100644 diff --git a/patches/api/0430-Experimental-annotations-change.patch b/patches/api/0430-Experimental-annotations-change.patch index 9ea8f3a126..59788de534 100644 --- a/patches/api/0430-Experimental-annotations-change.patch +++ b/patches/api/0430-Experimental-annotations-change.patch @@ -104,7 +104,7 @@ index 60fbacee263e55f91ac977f020e390d46024723a..ecff691c3a0878659fb051926ef769ce /** diff --git a/src/main/java/org/bukkit/entity/Bogged.java b/src/main/java/org/bukkit/entity/Bogged.java -index 6296a6f3f3e794677fd3a626376f357c740ec356..7d993f8bd18ec1d3260d12f0ff8078a86ee4867d 100644 +index a36bb84c17120bc578ab01d45f6f12fb1faf9548..719bccf8638f8ad358d37fa7eeccbc4c08d32868 100644 --- a/src/main/java/org/bukkit/entity/Bogged.java +++ b/src/main/java/org/bukkit/entity/Bogged.java @@ -5,6 +5,5 @@ import org.jetbrains.annotations.ApiStatus; @@ -112,7 +112,7 @@ index 6296a6f3f3e794677fd3a626376f357c740ec356..7d993f8bd18ec1d3260d12f0ff8078a8 * Represents a Bogged Skeleton. */ - public interface Bogged extends AbstractSkeleton, Shearable, io.papermc.paper.entity.Shearable { // Paper - Shear API + public interface Bogged extends AbstractSkeleton, io.papermc.paper.entity.Shearable { // Paper - Shear API } diff --git a/src/main/java/org/bukkit/entity/Breeze.java b/src/main/java/org/bukkit/entity/Breeze.java index a75e725805c193a408683885cba83ca168347165..254bc6e18961a72f471334cc0535e3c7a9d70012 100644 diff --git a/patches/server/0379-Add-BlockStateMeta-clearBlockState.patch b/patches/server/0379-Add-BlockStateMeta-clearBlockState.patch index ecafb80ec5..4a4ca75acd 100644 --- a/patches/server/0379-Add-BlockStateMeta-clearBlockState.patch +++ b/patches/server/0379-Add-BlockStateMeta-clearBlockState.patch @@ -23,21 +23,10 @@ index 301d883a7626e3abd222517400367fc40d6fa2bd..23dbc56edf0d16cf07ced2899942abae public BlockState getBlockState() { return (this.blockEntityTag != null) ? this.blockEntityTag.copy() : CraftMetaBlockState.getBlockState(this.material, null); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaShield.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaShield.java -index 3542c6e72f5ff459d50b73fa210ea835f52dfa49..2ad744875fea490eb8aa3883e4567ec1824c811a 100644 +index 3542c6e72f5ff459d50b73fa210ea835f52dfa49..43aa4920440a1626217a0fbc52d8404617ae7d10 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaShield.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaShield.java -@@ -7,8 +7,10 @@ import java.util.ArrayList; - import java.util.List; - import java.util.Map; - import net.minecraft.core.BlockPos; -+import net.minecraft.core.component.DataComponentMap; - import net.minecraft.core.component.DataComponentPatch; - import net.minecraft.core.component.DataComponents; -+import net.minecraft.world.item.component.CustomData; - import net.minecraft.world.level.block.entity.BannerPatternLayers; - import org.bukkit.DyeColor; - import org.bukkit.Material; -@@ -298,4 +300,11 @@ public class CraftMetaShield extends CraftMetaItem implements ShieldMeta, BlockS +@@ -298,4 +298,11 @@ public class CraftMetaShield extends CraftMetaItem implements ShieldMeta, BlockS default -> throw new IllegalArgumentException("Unknown banner colour"); }; } diff --git a/patches/server/0808-Add-Shearable-API.patch b/patches/server/0808-Add-Shearable-API.patch index 17902a41b9..ca10e1a4d2 100644 --- a/patches/server/0808-Add-Shearable-API.patch +++ b/patches/server/0808-Add-Shearable-API.patch @@ -45,7 +45,7 @@ index 0139e85c0751564bb4d2847b7b2e48f75fee9e53..e8e4704304504e69c7964dcd4df8ce5d public CraftBogged(CraftServer server, net.minecraft.world.entity.monster.Bogged entity) { super(server, entity); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java -index 986f7b18112ef183de3bbff269a92bf6ac945477..abba0986cc562f688682ba5e4822837a503586eb 100644 +index 986f7b18112ef183de3bbff269a92bf6ac945477..5ac263889ff9cc4f4f6365ccb57917a23ad6edc1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java @@ -14,7 +14,7 @@ import org.bukkit.entity.MushroomCow; @@ -57,7 +57,7 @@ index 986f7b18112ef183de3bbff269a92bf6ac945477..abba0986cc562f688682ba5e4822837a public CraftMushroomCow(CraftServer server, net.minecraft.world.entity.animal.MushroomCow entity) { super(server, entity); } -@@ -105,4 +105,11 @@ public class CraftMushroomCow extends CraftCow implements MushroomCow { +@@ -105,4 +105,16 @@ public class CraftMushroomCow extends CraftCow implements MushroomCow { public String toString() { return "CraftMushroomCow"; } @@ -67,6 +67,11 @@ index 986f7b18112ef183de3bbff269a92bf6ac945477..abba0986cc562f688682ba5e4822837a + public void setSheared(boolean sheared) { + if (sheared) this.shear(); + } ++ ++ @Override ++ public boolean isSheared() { ++ return false; ++ } + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java @@ -83,7 +88,7 @@ index 030bf7b6312799231d0b614ba5c84fec23c276e3..37291d7ad9fdf0fe78894f82a418f40b super(server, entity); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java -index 1e9807b8f468742d208f817e22d7625106fc1b58..a0bd62d6abaa195bc49063fa23e87a7697f24b99 100644 +index 1e9807b8f468742d208f817e22d7625106fc1b58..05cee4906169425ee6e80cf1302f2fa01f09d58f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java @@ -4,7 +4,7 @@ import net.minecraft.world.entity.animal.SnowGolem; @@ -95,7 +100,7 @@ index 1e9807b8f468742d208f817e22d7625106fc1b58..a0bd62d6abaa195bc49063fa23e87a76 public CraftSnowman(CraftServer server, SnowGolem entity) { super(server, entity); } -@@ -28,4 +28,11 @@ public class CraftSnowman extends CraftGolem implements Snowman, com.destroystok +@@ -28,4 +28,16 @@ public class CraftSnowman extends CraftGolem implements Snowman, com.destroystok public String toString() { return "CraftSnowman"; } @@ -105,6 +110,11 @@ index 1e9807b8f468742d208f817e22d7625106fc1b58..a0bd62d6abaa195bc49063fa23e87a76 + public void setSheared(boolean sheared) { + this.setDerp(sheared); + } ++ ++ @Override ++ public boolean isSheared() { ++ return this.isDerp(); ++ } + // Paper end } diff --git a/src/test/java/io/papermc/paper/entity/ShearableTest.java b/src/test/java/io/papermc/paper/entity/ShearableTest.java diff --git a/patches/server/0966-improve-checking-handled-tags-in-itemmeta.patch b/patches/server/0966-improve-checking-handled-tags-in-itemmeta.patch index aa8b2ec38f..6504354703 100644 --- a/patches/server/0966-improve-checking-handled-tags-in-itemmeta.patch +++ b/patches/server/0966-improve-checking-handled-tags-in-itemmeta.patch @@ -4,36 +4,6 @@ Date: Mon, 10 Jul 2023 16:10:15 -0700 Subject: [PATCH] improve checking handled tags in itemmeta -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java -index abba0986cc562f688682ba5e4822837a503586eb..5ac263889ff9cc4f4f6365ccb57917a23ad6edc1 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java -@@ -111,5 +111,10 @@ public class CraftMushroomCow extends CraftCow implements MushroomCow, io.paperm - public void setSheared(boolean sheared) { - if (sheared) this.shear(); - } -+ -+ @Override -+ public boolean isSheared() { -+ return false; -+ } - // Paper end - } -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java -index a0bd62d6abaa195bc49063fa23e87a7697f24b99..05cee4906169425ee6e80cf1302f2fa01f09d58f 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java -@@ -34,5 +34,10 @@ public class CraftSnowman extends CraftGolem implements Snowman, com.destroystok - public void setSheared(boolean sheared) { - this.setDerp(sheared); - } -+ -+ @Override -+ public boolean isSheared() { -+ return this.isDerp(); -+ } - // Paper end - } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java index a4c4ba0d02f9a072236ce86c1e98e2c60b059cb8..c9cda18761c6f925f7490984a7e035396a44a73a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java @@ -744,10 +714,10 @@ index d1cb8d520b6d7b0981d70412def71e7aab04560a..7f9182809f6e67ff571db0f365bc7e05 potionContents.potion().ifPresent((potion) -> { this.type = CraftPotionType.minecraftHolderToBukkit(potion); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaShield.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaShield.java -index 2ad744875fea490eb8aa3883e4567ec1824c811a..c98b1cb9a2aca9c1e76893b4c9c851c747c13bcd 100644 +index 43aa4920440a1626217a0fbc52d8404617ae7d10..5b30f7bff841f5830ac554532b62150fbd7716f1 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaShield.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaShield.java -@@ -44,7 +44,7 @@ public class CraftMetaShield extends CraftMetaItem implements ShieldMeta, BlockS +@@ -42,7 +42,7 @@ public class CraftMetaShield extends CraftMetaItem implements ShieldMeta, BlockS } CraftMetaShield(DataComponentPatch tag) { diff --git a/patches/unapplied-old/server/1027-Optimise-collision-checking-in-player-move-packet-ha.patch b/patches/unapplied/server/1027-Optimise-collision-checking-in-player-move-packet-ha.patch index 1e3006e3e6..1e3006e3e6 100644 --- a/patches/unapplied-old/server/1027-Optimise-collision-checking-in-player-move-packet-ha.patch +++ b/patches/unapplied/server/1027-Optimise-collision-checking-in-player-move-packet-ha.patch diff --git a/patches/unapplied-old/server/1036-Optimise-nearby-player-retrieval.patch b/patches/unapplied/server/1036-Optimise-nearby-player-retrieval.patch index eae5d781cc..eae5d781cc 100644 --- a/patches/unapplied-old/server/1036-Optimise-nearby-player-retrieval.patch +++ b/patches/unapplied/server/1036-Optimise-nearby-player-retrieval.patch |