mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-07 15:42:19 -07: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:
@@ -1715,28 +1715,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
*/
|
*/
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
public interface UseCooldownComponent extends ConfigurationSerializable {
|
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 {
|
@@ -0,0 +0,0 @@ public interface UseCooldownComponent extends ConfigurationSerializable {
|
||||||
/**
|
/**
|
||||||
* Sets the custom cooldown group to be used for similar items.
|
* 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
|
+ Date buildDate = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(Main.class.getPackage().getImplementationVendor()); // Paper
|
||||||
|
|
||||||
Calendar deadline = Calendar.getInstance();
|
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
|
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
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||||
|
@@ -671,7 +671,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
public static boolean useConsole = true;
|
public static boolean useConsole = true;
|
||||||
|
|
||||||
@@ -0,0 +0,0 @@ public class Main {
|
@@ -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())) {
|
if (buildDate.before(deadline.getTime())) {
|
||||||
System.err.println("*** Error, this build is outdated ***");
|
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 ***");
|
- 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
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -0,0 +0,0 @@ public class Main {
|
@@ -0,0 +0,0 @@ public class Main {
|
||||||
Calendar deadline = Calendar.getInstance();
|
Calendar deadline = Calendar.getInstance();
|
||||||
deadline.add(Calendar.DAY_OF_YEAR, -3);
|
deadline.add(Calendar.DAY_OF_YEAR, -14);
|
||||||
if (buildDate.before(deadline.getTime())) {
|
if (buildDate.before(deadline.getTime())) {
|
||||||
- System.err.println("*** Error, this build is outdated ***");
|
- System.err.println("*** Error, this build is outdated ***");
|
||||||
+ // Paper start - This is some stupid bullshit
|
+ // Paper start - This is some stupid bullshit
|
||||||
|
@@ -1193,15 +1193,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
this.useRemainder = useRemainder;
|
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 {
|
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -2109,19 +2100,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
this.handle = new Tool.Rule(this.handle.blocks(), Optional.ofNullable(speed), this.handle.correctForDrops());
|
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
|
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
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java
|
--- a/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java
|
||||||
|
Submodule work/Bukkit updated: a6aba46fe6...36b11391a2
Submodule work/CraftBukkit updated: 2702c5c8e5...a71a7e1f57
Reference in New Issue
Block a user