From bf8405fcdd851aab3e01768845f5111064bfcc99 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Sat, 23 Nov 2024 22:48:48 -0800 Subject: [ci skip] Rebuild patches --- patches/server/1070-Expanded-Art-API.patch | 53 ---------------------- ...1-Call-ProjectileHitEvent-for-entity-hits.patch | 22 --------- patches/server/1071-Expanded-Art-API.patch | 53 ++++++++++++++++++++++ ...2-Call-ProjectileHitEvent-for-entity-hits.patch | 22 +++++++++ 4 files changed, 75 insertions(+), 75 deletions(-) delete mode 100644 patches/server/1070-Expanded-Art-API.patch delete mode 100644 patches/server/1071-Call-ProjectileHitEvent-for-entity-hits.patch create mode 100644 patches/server/1071-Expanded-Art-API.patch create mode 100644 patches/server/1072-Call-ProjectileHitEvent-for-entity-hits.patch (limited to 'patches') diff --git a/patches/server/1070-Expanded-Art-API.patch b/patches/server/1070-Expanded-Art-API.patch deleted file mode 100644 index a088282574..0000000000 --- a/patches/server/1070-Expanded-Art-API.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: kokiriglade <60290002+celerry@users.noreply.github.com> -Date: Sat, 23 Nov 2024 18:58:49 +0000 -Subject: [PATCH] Expanded Art API - - -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftArt.java b/src/main/java/org/bukkit/craftbukkit/CraftArt.java -index 40af940193d0df66bbcdcf5f46132e304016a4d7..932118f5e5bfc765c852acaf21f9721d8fa5fb6a 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftArt.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftArt.java -@@ -42,6 +42,9 @@ public class CraftArt implements Art, Handleable { - - private final NamespacedKey key; - private final PaintingVariant paintingVariant; -+ private final net.kyori.adventure.text.@org.jspecify.annotations.Nullable Component adventureTitle; // Paper - name and author components, assetId key -+ private final net.kyori.adventure.text.@org.jspecify.annotations.Nullable Component adventureAuthor; // Paper - name and author components, assetId key -+ private final net.kyori.adventure.key.@org.jspecify.annotations.NonNull Key adventureAssetId; // Paper - name and author components, assetId key - private final String name; - private final int ordinal; - -@@ -58,6 +61,9 @@ public class CraftArt implements Art, Handleable { - this.name = key.toString(); - } - this.ordinal = CraftArt.count++; -+ this.adventureTitle = paintingVariant.title().map(io.papermc.paper.adventure.PaperAdventure::asAdventure).orElse(null); // Paper - name and author components, assetId key -+ this.adventureAuthor = paintingVariant.author().map(io.papermc.paper.adventure.PaperAdventure::asAdventure).orElse(null); // Paper - name and author components, assetId key -+ this.adventureAssetId = io.papermc.paper.adventure.PaperAdventure.asAdventure(paintingVariant.assetId()); // Paper - name and author components, assetId key - } - - @Override -@@ -75,6 +81,22 @@ public class CraftArt implements Art, Handleable { - return this.paintingVariant.height(); - } - -+ // Paper start - name and author components, assetId key -+ @Override -+ public net.kyori.adventure.text.@org.jetbrains.annotations.Nullable Component title() { -+ return this.adventureTitle; -+ } -+ -+ @Override -+ public net.kyori.adventure.text.@org.jetbrains.annotations.Nullable Component author() { -+ return this.adventureAuthor; -+ } -+ -+ public net.kyori.adventure.key.@org.jspecify.annotations.NonNull Key assetId() { -+ return this.adventureAssetId; -+ } -+ // Paper end - name and author components, assetId key -+ - @Override - public int getId() { - return CraftRegistry.getMinecraftRegistry(Registries.PAINTING_VARIANT).getId(this.paintingVariant); diff --git a/patches/server/1071-Call-ProjectileHitEvent-for-entity-hits.patch b/patches/server/1071-Call-ProjectileHitEvent-for-entity-hits.patch deleted file mode 100644 index 7d6bd931cb..0000000000 --- a/patches/server/1071-Call-ProjectileHitEvent-for-entity-hits.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Bjarne Koll -Date: Sat, 23 Nov 2024 22:48:26 +0100 -Subject: [PATCH] Call ProjectileHitEvent for entity hits - -A simple bugfix replacing a new vanilla call to -Projectile#hitTargetOrDeflectSelf with the bukkit replacement to call -the event. - -diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -index accc246f441c8bf5e1a755cfc0db8f97c0c01c6b..571f0699772eecbe02d71845da82a142321f2142 100644 ---- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -@@ -309,7 +309,7 @@ public abstract class AbstractArrow extends Projectile { - continue; - } - -- ProjectileDeflection projectiledeflection = this.hitTargetOrDeflectSelf(movingobjectpositionentity); -+ ProjectileDeflection projectiledeflection = this.preHitTargetOrDeflectSelf(movingobjectpositionentity); // Paper - also call projectile hit event - - this.hasImpulse = true; - if (this.getPierceLevel() > 0 && projectiledeflection == ProjectileDeflection.NONE) { diff --git a/patches/server/1071-Expanded-Art-API.patch b/patches/server/1071-Expanded-Art-API.patch new file mode 100644 index 0000000000..a088282574 --- /dev/null +++ b/patches/server/1071-Expanded-Art-API.patch @@ -0,0 +1,53 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: kokiriglade <60290002+celerry@users.noreply.github.com> +Date: Sat, 23 Nov 2024 18:58:49 +0000 +Subject: [PATCH] Expanded Art API + + +diff --git a/src/main/java/org/bukkit/craftbukkit/CraftArt.java b/src/main/java/org/bukkit/craftbukkit/CraftArt.java +index 40af940193d0df66bbcdcf5f46132e304016a4d7..932118f5e5bfc765c852acaf21f9721d8fa5fb6a 100644 +--- a/src/main/java/org/bukkit/craftbukkit/CraftArt.java ++++ b/src/main/java/org/bukkit/craftbukkit/CraftArt.java +@@ -42,6 +42,9 @@ public class CraftArt implements Art, Handleable { + + private final NamespacedKey key; + private final PaintingVariant paintingVariant; ++ private final net.kyori.adventure.text.@org.jspecify.annotations.Nullable Component adventureTitle; // Paper - name and author components, assetId key ++ private final net.kyori.adventure.text.@org.jspecify.annotations.Nullable Component adventureAuthor; // Paper - name and author components, assetId key ++ private final net.kyori.adventure.key.@org.jspecify.annotations.NonNull Key adventureAssetId; // Paper - name and author components, assetId key + private final String name; + private final int ordinal; + +@@ -58,6 +61,9 @@ public class CraftArt implements Art, Handleable { + this.name = key.toString(); + } + this.ordinal = CraftArt.count++; ++ this.adventureTitle = paintingVariant.title().map(io.papermc.paper.adventure.PaperAdventure::asAdventure).orElse(null); // Paper - name and author components, assetId key ++ this.adventureAuthor = paintingVariant.author().map(io.papermc.paper.adventure.PaperAdventure::asAdventure).orElse(null); // Paper - name and author components, assetId key ++ this.adventureAssetId = io.papermc.paper.adventure.PaperAdventure.asAdventure(paintingVariant.assetId()); // Paper - name and author components, assetId key + } + + @Override +@@ -75,6 +81,22 @@ public class CraftArt implements Art, Handleable { + return this.paintingVariant.height(); + } + ++ // Paper start - name and author components, assetId key ++ @Override ++ public net.kyori.adventure.text.@org.jetbrains.annotations.Nullable Component title() { ++ return this.adventureTitle; ++ } ++ ++ @Override ++ public net.kyori.adventure.text.@org.jetbrains.annotations.Nullable Component author() { ++ return this.adventureAuthor; ++ } ++ ++ public net.kyori.adventure.key.@org.jspecify.annotations.NonNull Key assetId() { ++ return this.adventureAssetId; ++ } ++ // Paper end - name and author components, assetId key ++ + @Override + public int getId() { + return CraftRegistry.getMinecraftRegistry(Registries.PAINTING_VARIANT).getId(this.paintingVariant); diff --git a/patches/server/1072-Call-ProjectileHitEvent-for-entity-hits.patch b/patches/server/1072-Call-ProjectileHitEvent-for-entity-hits.patch new file mode 100644 index 0000000000..7d6bd931cb --- /dev/null +++ b/patches/server/1072-Call-ProjectileHitEvent-for-entity-hits.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Bjarne Koll +Date: Sat, 23 Nov 2024 22:48:26 +0100 +Subject: [PATCH] Call ProjectileHitEvent for entity hits + +A simple bugfix replacing a new vanilla call to +Projectile#hitTargetOrDeflectSelf with the bukkit replacement to call +the event. + +diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +index accc246f441c8bf5e1a755cfc0db8f97c0c01c6b..571f0699772eecbe02d71845da82a142321f2142 100644 +--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java ++++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +@@ -309,7 +309,7 @@ public abstract class AbstractArrow extends Projectile { + continue; + } + +- ProjectileDeflection projectiledeflection = this.hitTargetOrDeflectSelf(movingobjectpositionentity); ++ ProjectileDeflection projectiledeflection = this.preHitTargetOrDeflectSelf(movingobjectpositionentity); // Paper - also call projectile hit event + + this.hasImpulse = true; + if (this.getPierceLevel() > 0 && projectiledeflection == ProjectileDeflection.NONE) { -- cgit v1.2.3