Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9088)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 5efeb7bd Also update compiler version c13b867a Update some Maven plugin versions deb28d9f PR-837: Add more bell API e938d62a PR-819: Allow Player#sendBlockDamage() to specify a source entity 0e75532c PR-818: Add more Guardian API, particularly for its laser a10155aa PR-839: Add BlockData#rotate and BlockData#mirror 77e690b4 PR-836: Add missing API for explosive minecarts 60722059 PR-832: Allow getting chunks without generating them and optimize chunk data request for ungenerated chunks 0a2c4b4b PR-834: Add Player#sendHurtAnimation() CraftBukkit Changes: be8682aa8 Also update compiler version 08e305f5b Update some Maven plugin versions 187bdd463 PR-1160: Add more bell API 2f8e5bc7c PR-1145: Allow Player#sendBlockDamage() to specify a source entity bcbb61b36 PR-1144: Add more Guardian API, particularly for its laser 722ddff6d PR-1162: Add BlockData#rotate and BlockData#mirror 80998277c PR-1159: Add missing API for explosive minecarts 1fddefce1 PR-1155: Allow getting chunks without generating them and optimize chunk data request for ungenerated chunks 20e8a486f PR-1157: Add Player#sendHurtAnimation() Spigot Changes: b31949f2 Rebuild patches
This commit is contained in:
@@ -39,4 +39,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ // Paper end
|
||||
|
||||
/**
|
||||
* Checks if the chunk is loaded.
|
||||
* Checks if the chunk is fully generated.
|
||||
|
||||
@@ -22,7 +22,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+/**
|
||||
+ * Called when a {@link org.bukkit.entity.Raider} is revealed by a bell.
|
||||
+ * @deprecated use {@link org.bukkit.event.block.BellResonateEvent}
|
||||
+ */
|
||||
+@Deprecated
|
||||
+public class BellRevealRaiderEvent extends BlockEvent implements Cancellable {
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+
|
||||
|
||||
@@ -15,55 +15,20 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+package io.papermc.paper.event.block;
|
||||
+
|
||||
+import org.bukkit.block.Block;
|
||||
+import org.bukkit.block.BlockFace;
|
||||
+import org.bukkit.entity.Entity;
|
||||
+import org.bukkit.event.Cancellable;
|
||||
+import org.bukkit.event.HandlerList;
|
||||
+import org.bukkit.event.block.BlockEvent;
|
||||
+import org.bukkit.potion.PotionEffect;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+/**
|
||||
+ * Called when a bell is rung.
|
||||
+ * @deprecated use {@link org.bukkit.event.block.BellRingEvent}
|
||||
+ */
|
||||
+public class BellRingEvent extends BlockEvent implements Cancellable {
|
||||
+ private static final HandlerList handlers = new HandlerList();
|
||||
+ private boolean cancelled;
|
||||
+ private final Entity entity;
|
||||
+@Deprecated
|
||||
+public class BellRingEvent extends org.bukkit.event.block.BellRingEvent implements Cancellable {
|
||||
+
|
||||
+ public BellRingEvent(@NotNull Block block, @Nullable Entity entity) {
|
||||
+ super(block);
|
||||
+ this.entity = entity;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean isCancelled() {
|
||||
+ return cancelled;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setCancelled(boolean cancelled) {
|
||||
+ this.cancelled = cancelled;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the entity that rang the bell.
|
||||
+ *
|
||||
+ * @return the ringer or null if none
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ public Entity getEntity() {
|
||||
+ return entity;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public HandlerList getHandlers() {
|
||||
+ return handlers;
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ public static HandlerList getHandlerList() {
|
||||
+ return handlers;
|
||||
+ public BellRingEvent(@NotNull Block block, @NotNull BlockFace direction, @Nullable Entity entity) {
|
||||
+ super(block, direction, entity);
|
||||
+ }
|
||||
+}
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: TheFruxz <cedricspitzer@outlook.de>
|
||||
Date: Sat, 2 Apr 2022 13:03:39 +0200
|
||||
Subject: [PATCH] Add custom destroyerIdentity to sendBlockDamage
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
/**
|
||||
* Send block damage. This fakes block break progress for a user at a
|
||||
* certain location. This will not actually change the block's break
|
||||
- * progress in any way.
|
||||
+ * progress in any way. The destroying entity will be this player.
|
||||
*
|
||||
* @param loc the location of the damaged block
|
||||
* @param progress the progress from 0.0 - 1.0 where 0 is no damage and
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
public void sendBlockDamage(@NotNull Location loc, float progress);
|
||||
|
||||
// Paper start
|
||||
+
|
||||
+ /**
|
||||
+ * Send block damage. This fakes block break progress for a user at a certain location.
|
||||
+ * This will not actually change the block's break progress in any way.
|
||||
+ * The destroying entity is defined via the destroyerIdentity parameter.
|
||||
+ *
|
||||
+ * @param loc the location of the damaged block
|
||||
+ * @param progress the progress from 0.0 - 1.0 where 0 is no damage and 1.0 is the most damaged
|
||||
+ * @param destroyerIdentity the entity id of the destroyer
|
||||
+ */
|
||||
+ public void sendBlockDamage(@NotNull Location loc, float progress, int destroyerIdentity);
|
||||
+
|
||||
/**
|
||||
* Send multiple block changes. This fakes a multi block change packet for each
|
||||
* chunk section that a block change occurs. This will not actually change the world in any way.
|
||||
@@ -51,7 +51,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
compileOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
||||
@@ -0,0 +0,0 @@ tasks.withType<Javadoc> {
|
||||
"https://guava.dev/releases/31.0.1-jre/api/docs/",
|
||||
"https://guava.dev/releases/31.1-jre/api/docs/",
|
||||
"https://javadoc.io/doc/org.yaml/snakeyaml/1.33/",
|
||||
"https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/", // Paper - we don't want Java 5 annotations
|
||||
- "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
|
||||
|
||||
@@ -35,9 +35,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
--- a/src/main/java/org/bukkit/block/data/BlockData.java
|
||||
+++ b/src/main/java/org/bukkit/block/data/BlockData.java
|
||||
@@ -0,0 +0,0 @@ public interface BlockData extends Cloneable {
|
||||
* @param mirror the mirror
|
||||
*/
|
||||
@NotNull
|
||||
Material getPlacementMaterial();
|
||||
void mirror(@NotNull Mirror mirror);
|
||||
+
|
||||
+ // Paper start - Tick API
|
||||
+ /**
|
||||
|
||||
@@ -39,7 +39,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||
@@ -0,0 +0,0 @@ tasks.withType<Javadoc> {
|
||||
options.links(
|
||||
"https://guava.dev/releases/31.0.1-jre/api/docs/",
|
||||
"https://guava.dev/releases/31.1-jre/api/docs/",
|
||||
"https://javadoc.io/doc/org.yaml/snakeyaml/1.33/",
|
||||
- "https://javadoc.io/doc/org.jetbrains/annotations-java5/23.0.0/",
|
||||
+ "https://javadoc.io/doc/org.jetbrains/annotations/23.0.0/", // Paper - we don't want Java 5 annotations
|
||||
|
||||
@@ -96,7 +96,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ options.use()
|
||||
+ options.isDocFilesSubDirs = true
|
||||
+ options.links(
|
||||
+ "https://guava.dev/releases/31.0.1-jre/api/docs/",
|
||||
+ "https://guava.dev/releases/31.1-jre/api/docs/",
|
||||
+ "https://javadoc.io/doc/org.yaml/snakeyaml/1.33/",
|
||||
+ "https://javadoc.io/doc/org.jetbrains/annotations-java5/23.0.0/",
|
||||
+ "https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/",
|
||||
@@ -251,23 +251,25 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-compiler-plugin</artifactId>
|
||||
- <version>3.10.1</version>
|
||||
- <version>3.11.0</version>
|
||||
- <configuration>
|
||||
- <!-- we use the Eclipse compiler as it doesn't need a JDK -->
|
||||
- <compilerId>eclipse</compilerId>
|
||||
- <!-- default changed with version 3.11.0 -->
|
||||
- <showWarnings>false</showWarnings>
|
||||
- </configuration>
|
||||
- <dependencies>
|
||||
- <dependency>
|
||||
- <groupId>org.codehaus.plexus</groupId>
|
||||
- <artifactId>plexus-compiler-eclipse</artifactId>
|
||||
- <version>2.12.0</version>
|
||||
- <version>2.13.0</version>
|
||||
- </dependency>
|
||||
- </dependencies>
|
||||
- </plugin>
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-jar-plugin</artifactId>
|
||||
- <version>3.2.2</version>
|
||||
- <version>3.3.0</version>
|
||||
- <configuration>
|
||||
- <archive>
|
||||
- <manifest>
|
||||
@@ -309,11 +311,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-javadoc-plugin</artifactId>
|
||||
- <version>3.4.0</version>
|
||||
- <version>3.5.0</version>
|
||||
- <configuration>
|
||||
- <links>
|
||||
- <link>https://guava.dev/releases/31.0.1-jre/api/docs/</link>
|
||||
- <link>https://javadoc.io/doc/org.yaml/snakeyaml/1.30/</link>
|
||||
- <link>https://guava.dev/releases/31.1-jre/api/docs/</link>
|
||||
- <link>https://javadoc.io/doc/org.yaml/snakeyaml/1.33/</link>
|
||||
- <link>https://javadoc.io/doc/org.jetbrains/annotations-java5/23.0.0/</link>
|
||||
- <link>https://javadoc.io/doc/net.md-5/bungeecord-chat/1.16-R0.4/</link>
|
||||
- </links>
|
||||
@@ -333,7 +335,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- <plugin>
|
||||
- <groupId>org.apache.maven.plugins</groupId>
|
||||
- <artifactId>maven-checkstyle-plugin</artifactId>
|
||||
- <version>3.1.2</version>
|
||||
- <version>3.2.1</version>
|
||||
- <executions>
|
||||
- <execution>
|
||||
- <phase>process-classes</phase>
|
||||
@@ -358,7 +360,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- <plugin>
|
||||
- <groupId>org.codehaus.mojo</groupId>
|
||||
- <artifactId>animal-sniffer-maven-plugin</artifactId>
|
||||
- <version>1.21</version>
|
||||
- <version>1.23</version>
|
||||
- <executions>
|
||||
- <execution>
|
||||
- <phase>process-classes</phase>
|
||||
|
||||
@@ -120,5 +120,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
* Add custom chat completion suggestions shown to the player while typing a
|
||||
* message.
|
||||
* Send a hurt animation. This fakes incoming damage towards the player from
|
||||
* the given yaw relative to the player's direction.
|
||||
|
||||
@@ -1176,55 +1176,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ void setConversionTime(int time, boolean broadcastEntityEvent);
|
||||
+ // Paper stop - missing entity behaviour api - converting without entity event
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/minecart/ExplosiveMinecart.java b/src/main/java/org/bukkit/entity/minecart/ExplosiveMinecart.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/minecart/ExplosiveMinecart.java
|
||||
+++ b/src/main/java/org/bukkit/entity/minecart/ExplosiveMinecart.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.entity.Minecart;
|
||||
* Represents a Minecart with TNT inside it that can explode when triggered.
|
||||
*/
|
||||
public interface ExplosiveMinecart extends Minecart {
|
||||
+ // Paper start - Entity API
|
||||
+ /**
|
||||
+ * Set the number of ticks until the Minecart explodes after being primed.
|
||||
+ *
|
||||
+ * @param fuseTicks fuse ticks or -1 if the fuse isn't primed
|
||||
+ */
|
||||
+ void setFuseTicks(int fuseTicks);
|
||||
+
|
||||
+ /**
|
||||
+ * Retrieve the number of ticks until the explosive Minecart explodes.
|
||||
+ *
|
||||
+ * @return number of ticks or -1 if the fuse isn't primed
|
||||
+ */
|
||||
+ int getFuseTicks();
|
||||
+
|
||||
+ /**
|
||||
+ * Checks whether this explosive Minecart is ignited (its fuse is primed).
|
||||
+ *
|
||||
+ * @return whether the Minecart is ignited
|
||||
+ */
|
||||
+ boolean isIgnited();
|
||||
+
|
||||
+ /**
|
||||
+ * Ignites this explosive Minecart, beginning its fuse.
|
||||
+ */
|
||||
+ void ignite();
|
||||
+
|
||||
+ /**
|
||||
+ * Immediately explodes the Minecart.
|
||||
+ * Power will depend on the Minecart's horizontal speed.
|
||||
+ */
|
||||
+ void explode();
|
||||
+
|
||||
+ /**
|
||||
+ * Immediately explodes the Minecart with the specified power.
|
||||
+ *
|
||||
+ * @param power explosion power
|
||||
+ */
|
||||
+ void explode(double power);
|
||||
+ // Paper end - Entity API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/minecart/HopperMinecart.java b/src/main/java/org/bukkit/entity/minecart/HopperMinecart.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/minecart/HopperMinecart.java
|
||||
|
||||
@@ -17,22 +17,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * Send multiple block changes. This fakes a multi block change packet for each
|
||||
+ * chunk section that a block change occurs. This will not actually change the world in any way.
|
||||
+ *
|
||||
+ * @param blockChanges A map of the locations you want to change to their new block data
|
||||
+ * @param blockChanges A map of the positions you want to change to their new block data
|
||||
+ */
|
||||
+ public default void sendMultiBlockChange(@NotNull java.util.Map<Location, BlockData> blockChanges) {
|
||||
+ sendMultiBlockChange(blockChanges, false);
|
||||
+ default void sendMultiBlockChange(@NotNull Map<? extends io.papermc.paper.math.Position, BlockData> blockChanges) {
|
||||
+ this.sendMultiBlockChange(blockChanges, false);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Send multiple block changes. This fakes a multi block change packet for each
|
||||
+ * chunk section that a block change occurs. This will not actually change the world in any way.
|
||||
+ *
|
||||
+ * @param blockChanges A map of the locations you want to change to their new block data
|
||||
+ * @param blockChanges A map of the positions you want to change to their new block data
|
||||
+ * @param suppressLightUpdates Whether to suppress light updates or not
|
||||
+ */
|
||||
+ public void sendMultiBlockChange(@NotNull java.util.Map<Location, BlockData> blockChanges, boolean suppressLightUpdates);
|
||||
+ void sendMultiBlockChange(@NotNull Map<? extends io.papermc.paper.math.Position, BlockData> blockChanges, boolean suppressLightUpdates);
|
||||
+ // Paper end
|
||||
+
|
||||
/**
|
||||
* Send an equipment change for the target entity. This will not
|
||||
* actually change the entity's equipment in any way.
|
||||
* Send block damage. This fakes block break progress at a certain location
|
||||
* sourced by the provided entity. This will not actually change the block's
|
||||
|
||||
Reference in New Issue
Block a user