mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 15:00:13 +01:00
Updated Upstream (Bukkit/CraftBukkit) (#11626)
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: 36b11391 Fix copy pasting in UseCooldownComponent CraftBukkit Changes: a71a7e1f5 SPIGOT-7957: Fix setTarget method for Breeze 5bc0a094b SPIGOT-7955: Failure teleporting players between worlds using Player#teleport() when player has attribute modifiers 2e09c7a36 SPIGOT-7953: Item cooldown must be greater than 0 8ef9079fa Increase outdated build delay
This commit is contained in:
parent
5a9b3c9e23
commit
7c03ce11ef
7 changed files with 5 additions and 49 deletions
|
@ -1715,28 +1715,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
*/
|
||||
@ApiStatus.Experimental
|
||||
public interface UseCooldownComponent extends ConfigurationSerializable {
|
||||
|
||||
/**
|
||||
- * Gets the time in seconds it will take for this item to be eaten.
|
||||
+ * Gets the time in seconds it will take for this item to be available for use again.
|
||||
*
|
||||
- * @return eat time
|
||||
+ * @return cooldown time
|
||||
*/
|
||||
float getCooldownSeconds();
|
||||
|
||||
/**
|
||||
- * Sets the time in seconds it will take for this item to be eaten.
|
||||
+ * Sets the time in seconds it will take for this item to be available for use again.
|
||||
*
|
||||
- * @param eatSeconds new eat time, must be positive
|
||||
+ * @param cooldownSeconds new cooldown time, must be positive
|
||||
*/
|
||||
- void setCooldownSeconds(float eatSeconds);
|
||||
+ void setCooldownSeconds(float cooldownSeconds);
|
||||
|
||||
/**
|
||||
* Gets the custom cooldown group to be used for similar items, if set.
|
||||
@@ -0,0 +0,0 @@ public interface UseCooldownComponent extends ConfigurationSerializable {
|
||||
/**
|
||||
* Sets the custom cooldown group to be used for similar items.
|
||||
|
|
|
@ -142,7 +142,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ Date buildDate = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(Main.class.getPackage().getImplementationVendor()); // Paper
|
||||
|
||||
Calendar deadline = Calendar.getInstance();
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -3);
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -14);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
|
|
|
@ -671,7 +671,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
public static boolean useConsole = true;
|
||||
|
||||
@@ -0,0 +0,0 @@ public class Main {
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -3);
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -14);
|
||||
if (buildDate.before(deadline.getTime())) {
|
||||
System.err.println("*** Error, this build is outdated ***");
|
||||
- System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***");
|
||||
|
|
|
@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -0,0 +0,0 @@ public class Main {
|
||||
Calendar deadline = Calendar.getInstance();
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -3);
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -14);
|
||||
if (buildDate.before(deadline.getTime())) {
|
||||
- System.err.println("*** Error, this build is outdated ***");
|
||||
+ // Paper start - This is some stupid bullshit
|
||||
|
|
|
@ -1193,15 +1193,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
this.useRemainder = useRemainder;
|
||||
}
|
||||
|
||||
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
|
||||
@Override
|
||||
public UseCooldownComponent getUseCooldown() {
|
||||
- return (this.hasUseCooldown()) ? new CraftUseCooldownComponent(this.useCooldown) : new CraftUseCooldownComponent(new UseCooldown(0));
|
||||
+ return (this.hasUseCooldown()) ? new CraftUseCooldownComponent(this.useCooldown) : new CraftUseCooldownComponent(new UseCooldown(1.0F)); // Paper - Create a valid use_cooldown component
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
|
||||
@Override
|
||||
|
@ -2109,19 +2100,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
this.handle = new Tool.Rule(this.handle.blocks(), Optional.ofNullable(speed), this.handle.correctForDrops());
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftUseCooldownComponent.java b/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftUseCooldownComponent.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftUseCooldownComponent.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftUseCooldownComponent.java
|
||||
@@ -0,0 +0,0 @@ public final class CraftUseCooldownComponent implements UseCooldownComponent {
|
||||
|
||||
@Override
|
||||
public void setCooldownSeconds(float eatSeconds) {
|
||||
- Preconditions.checkArgument(eatSeconds >= 0, "eatSeconds cannot be less than 0");
|
||||
+ Preconditions.checkArgument(eatSeconds > 0, "eatSeconds must be positive"); // Paper
|
||||
|
||||
this.handle = new UseCooldown(eatSeconds, this.handle.cooldownGroup());
|
||||
}
|
||||
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit a6aba46fe6679624f7c9cbeb6c2d1be63156e6bb
|
||||
Subproject commit 36b11391a2c0213669acfa9b863a3a3704374fbc
|
|
@ -1 +1 @@
|
|||
Subproject commit 2702c5c8e5e1a9e3d231d9006afa80333c84caa4
|
||||
Subproject commit a71a7e1f57653334d66e389d162a437b1491bfc8
|
Loading…
Reference in a new issue