diff options
Diffstat (limited to 'patches/api')
-rw-r--r-- | patches/api/0001-Convert-project-to-Gradle.patch | 4 | ||||
-rw-r--r-- | patches/api/0056-Fix-upstream-javadocs.patch | 15 | ||||
-rw-r--r-- | patches/api/0394-Add-exploded-block-state-to-EntityDamageByBlockEvent.patch (renamed from patches/api/0394-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch) | 62 |
3 files changed, 16 insertions, 65 deletions
diff --git a/patches/api/0001-Convert-project-to-Gradle.patch b/patches/api/0001-Convert-project-to-Gradle.patch index 81ee13ba35..68949cde0c 100644 --- a/patches/api/0001-Convert-project-to-Gradle.patch +++ b/patches/api/0001-Convert-project-to-Gradle.patch @@ -124,7 +124,7 @@ index 0000000000000000000000000000000000000000..6271e2bad0ed937c2c46a8c8fdf186c4 +} diff --git a/pom.xml b/pom.xml deleted file mode 100644 -index 278ecb12ecdb5e1fdf394a1c990a4d849e53e05e..0000000000000000000000000000000000000000 +index bea9ac450de7ec05f9752d253743e95d79c1cd14..0000000000000000000000000000000000000000 --- a/pom.xml +++ /dev/null @@ -1,267 +0,0 @@ @@ -135,7 +135,7 @@ index 278ecb12ecdb5e1fdf394a1c990a4d849e53e05e..00000000000000000000000000000000 - - <groupId>org.spigotmc</groupId> - <artifactId>spigot-api</artifactId> -- <version>1.20.5-R0.1-SNAPSHOT</version> +- <version>1.20.6-R0.1-SNAPSHOT</version> - <packaging>jar</packaging> - - <name>Spigot-API</name> diff --git a/patches/api/0056-Fix-upstream-javadocs.patch b/patches/api/0056-Fix-upstream-javadocs.patch index 1aa0e45854..e671e3d8da 100644 --- a/patches/api/0056-Fix-upstream-javadocs.patch +++ b/patches/api/0056-Fix-upstream-javadocs.patch @@ -600,16 +600,15 @@ index a0f6f1af304190b4c5db4b284d460f625eeb7801..7e21548cac8515c281ec86853e9272ab * The Block is already broken as this event is called, so #getBlock() will be * AIR in most cases. Use #getBlockState() for more Information about the broken diff --git a/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java b/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java -index 44f7f6939a27b9a0a796d91eac4b7c97ec90a643..641c71ab66bd2499b35cf3c1d533fd105d096e10 100644 +index e534954457a9961a26dbec7ac035bec07e1d6694..8309b030c2120f1496d244f3ebc1094def41c869 100644 --- a/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java +++ b/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java -@@ -7,7 +7,9 @@ import org.bukkit.event.HandlerList; - import org.jetbrains.annotations.NotNull; - - /** -- * Called when a block explodes -+ * Called when a block explodes interacting with blocks. The -+ * event isn't called if the {@link org.bukkit.GameRule#MOB_GRIEFING} +@@ -13,6 +13,9 @@ import org.jetbrains.annotations.NotNull; + * Note that due to the nature of explosions, {@link #getBlock()} will always be + * an air block. {@link #getExplodedBlockState()} should be used to get + * information about the block state that exploded. ++ * <p> ++ * The event isn't called if the {@link org.bukkit.GameRule#MOB_GRIEFING} + * is disabled as no block interaction will occur. */ public class BlockExplodeEvent extends BlockEvent implements Cancellable { diff --git a/patches/api/0394-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch b/patches/api/0394-Add-exploded-block-state-to-EntityDamageByBlockEvent.patch index de7e84ef8b..88530a6a65 100644 --- a/patches/api/0394-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch +++ b/patches/api/0394-Add-exploded-block-state-to-EntityDamageByBlockEvent.patch @@ -1,69 +1,21 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Jake Potrebic <[email protected]> Date: Fri, 22 Oct 2021 16:24:17 -0700 -Subject: [PATCH] Add exploded block state to BlockExplodeEvent and - EntityDamageByBlockEvent +Subject: [PATCH] Add exploded block state to EntityDamageByBlockEvent diff --git a/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java b/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java -index 641c71ab66bd2499b35cf3c1d533fd105d096e10..7dcbb75170296c1dd1d784a032bf369602328b29 100644 +index 8309b030c2120f1496d244f3ebc1094def41c869..a7c297364805c58ae16895055d8eae0484384b7d 100644 --- a/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java +++ b/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java -@@ -10,18 +10,31 @@ import org.jetbrains.annotations.NotNull; - * Called when a block explodes interacting with blocks. The - * event isn't called if the {@link org.bukkit.GameRule#MOB_GRIEFING} - * is disabled as no block interaction will occur. -+ * <p> -+ * The {@link Block} returned by this event is not necessarily -+ * the block that caused the explosion, just the block at the location where -+ * the explosion originated. See {@link #getExplodedBlockState()} - */ - public class BlockExplodeEvent extends BlockEvent implements Cancellable { - private static final HandlerList handlers = new HandlerList(); - private boolean cancel; - private final List<Block> blocks; - private float yield; -+ private final org.bukkit.block.BlockState explodedBlockState; // Paper - -+ @Deprecated @io.papermc.paper.annotation.DoNotUse // Paper - public BlockExplodeEvent(@NotNull final Block what, @NotNull final List<Block> blocks, final float yield) { -+ // Paper start -+ this(what, blocks, yield, null); -+ } -+ @org.jetbrains.annotations.ApiStatus.Internal -+ public BlockExplodeEvent(@NotNull final Block what, @NotNull final List<Block> blocks, final float yield, @org.jetbrains.annotations.Nullable org.bukkit.block.BlockState explodedBlockState) { -+ // Paper end - super(what); - this.blocks = blocks; - this.yield = yield; +@@ -32,6 +32,7 @@ public class BlockExplodeEvent extends BlockEvent implements Cancellable { this.cancel = false; -+ this.explodedBlockState = explodedBlockState; // Paper - } - - @Override -@@ -34,6 +47,22 @@ public class BlockExplodeEvent extends BlockEvent implements Cancellable { - this.cancel = cancel; } -+ // Paper start -+ /** -+ * Get a capture of the block that directly caused -+ * the explosion, like a bed or respawn anchor. This -+ * block state is not placed so {@link org.bukkit.block.BlockState#isPlaced} -+ * will be false. -+ * <p> -+ * Can be null if no block directly caused the explosion. -+ * -+ * @return the exploded block state or null if not applicable -+ */ -+ public @org.jetbrains.annotations.Nullable org.bukkit.block.BlockState getExplodedBlockState() { -+ return this.explodedBlockState; -+ } -+ // Paper end -+ - /** - * Returns the list of blocks that would have been removed or were removed - * from the explosion event. ++ @io.papermc.paper.annotation.DoNotUse // Paper + @Deprecated(forRemoval = true) + public BlockExplodeEvent(@NotNull final Block what, @NotNull final List<Block> blocks, final float yield) { + this(what, what.getState(), blocks, yield); diff --git a/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java b/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java index 467a0d6cabc5e860628be3b1e62de773efde5d2e..1fb15e2ade8ff3c4d662eca87b078b4577f786e1 100644 --- a/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java |