Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11405)
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: 1fc1020a PR-1049: Add MenuType API 8ae2e3be PR-1055: Expand riptiding API cac68bfb SPIGOT-7890: AttributeModifier#getUniqueId() doesn't match the UUID passed to its constructor 7004fcf2 SPIGOT-7886: Fix mistake in AttributeModifier UUID shim 1ac7f950 PR-1054: Add FireworkMeta#hasPower 4cfb565f SPIGOT-7873: Add powered state for skulls CraftBukkit Changes: bbb30e7a8 SPIGOT-7894: NPE when sending tile entity update ba21e9472 SPIGOT-7895: PlayerItemBreakEvent not firing 0fb24bbe0 SPIGOT-7875: Fix PlayerItemConsumeEvent cancellation causing client-side desync 815066449 SPIGOT-7891: Can't remove second ingredient of MerchantRecipe 45c206f2c PR-1458: Add MenuType API 19c8ef9ae SPIGOT-7867: Merchant instanceof AbstractVillager always returns false 4e006d28f PR-1468: Expand riptiding API bd8aded7d Ignore checks in CraftPlayerProfile for ResolvableProfile used in profile components 8679620b5 SPIGOT-7889: Fix tool component deserialisation without speed and/or correct-for-drops 8d5222691 SPIGOT-7882, PR-1467: Fix conversion of name in Profile Component to empty if it is missing 63f91669a SPIGOT-7887: Remove duplicate ProjectileHitEvent for fireballs 7070de8c8 SPIGOT-7878: Server#getLootTable does not return null on invalid loot table 060ee6cae SPIGOT-7876: Can't kick player or disconnect player in PlayerLoginEvent when checking for cookies 7ccb86cc0 PR-1465: Add FireworkMeta#hasPower 804ad6491 SPIGOT-7873: Add powered state for skulls f9610cdcb Improve minecart movement Spigot Changes: a759b629 Rebuild patches Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
This commit is contained in:
parent
4ff58c4c48
commit
d1a72eac31
684 changed files with 864 additions and 837 deletions
|
@ -85,10 +85,10 @@ index 0000000000000000000000000000000000000000..2512dba27edfdccbc4430815b6cba048
|
|||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/registry/RegistryKey.java b/src/main/java/io/papermc/paper/registry/RegistryKey.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..76daccf4ea502e1747a6f9176dc16fd20c561286
|
||||
index 0000000000000000000000000000000000000000..7763ea28a00c25ffd8ba8941cff29bae5ae117a2
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/registry/RegistryKey.java
|
||||
@@ -0,0 +1,147 @@
|
||||
@@ -0,0 +1,149 @@
|
||||
+package io.papermc.paper.registry;
|
||||
+
|
||||
+import net.kyori.adventure.key.Keyed;
|
||||
|
@ -114,6 +114,7 @@ index 0000000000000000000000000000000000000000..76daccf4ea502e1747a6f9176dc16fd2
|
|||
+import org.bukkit.generator.structure.Structure;
|
||||
+import org.bukkit.generator.structure.StructureType;
|
||||
+import org.bukkit.inventory.ItemType;
|
||||
+import org.bukkit.inventory.MenuType;
|
||||
+import org.bukkit.inventory.meta.trim.TrimMaterial;
|
||||
+import org.bukkit.inventory.meta.trim.TrimPattern;
|
||||
+import org.bukkit.map.MapCursor;
|
||||
|
@ -235,6 +236,7 @@ index 0000000000000000000000000000000000000000..76daccf4ea502e1747a6f9176dc16fd2
|
|||
+ RegistryKey<Fluid> FLUID = create("fluid");
|
||||
+ RegistryKey<Frog.Variant> FROG_VARIANT = create("frog_variant");
|
||||
+ RegistryKey<MapCursor.Type> MAP_DECORATION_TYPE = create("map_decoration_type");
|
||||
+ RegistryKey<MenuType> MENU = create("menu");
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/registry/RegistryKeyImpl.java b/src/main/java/io/papermc/paper/registry/RegistryKeyImpl.java
|
||||
new file mode 100644
|
||||
|
|
|
@ -3343,16 +3343,16 @@ index 133760be6c73436512ba684a3ac77a514b2d8765..9473303bd8ab1f6b63b6999a5f5ff3ec
|
|||
* Gets how much EXP the Player should have at respawn.
|
||||
* <p>
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
index c5734d66686e68080f55034754d43ae55030c3eb..32cd8ee2e849df602a7e10aa5d0a218007faa0ac 100644
|
||||
index 094963b16eccc303fb1a10b1e052feebe4a4d68b..3e6ac5beb137efd8ecd80e2e9b17015cb38e8a0a 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
@@ -161,6 +161,18 @@ public enum InventoryType {
|
||||
@@ -163,7 +163,18 @@ public enum InventoryType {
|
||||
private final String title;
|
||||
private final MenuType menuType;
|
||||
private final boolean isCreatable;
|
||||
|
||||
+ // Paper start
|
||||
+ private final net.kyori.adventure.text.Component defaultTitleComponent;
|
||||
+
|
||||
|
||||
+ /**
|
||||
+ * Gets the inventory's default title.
|
||||
+ *
|
||||
|
@ -3362,18 +3362,18 @@ index c5734d66686e68080f55034754d43ae55030c3eb..32cd8ee2e849df602a7e10aa5d0a2180
|
|||
+ return defaultTitleComponent;
|
||||
+ }
|
||||
+ // Paper end
|
||||
private InventoryType(int defaultSize, /*@NotNull*/ String defaultTitle) {
|
||||
this(defaultSize, defaultTitle, true);
|
||||
private InventoryType(int defaultSize, /*@NotNull*/ String defaultTitle, @Nullable MenuType type) {
|
||||
this(defaultSize, defaultTitle, type, true);
|
||||
}
|
||||
@@ -169,6 +181,7 @@ public enum InventoryType {
|
||||
size = defaultSize;
|
||||
@@ -173,6 +184,7 @@ public enum InventoryType {
|
||||
title = defaultTitle;
|
||||
this.menuType = type;
|
||||
this.isCreatable = isCreatable;
|
||||
+ this.defaultTitleComponent = net.kyori.adventure.text.Component.text(defaultTitle); // Paper - Adventure
|
||||
}
|
||||
|
||||
public int getDefaultSize() {
|
||||
@@ -176,6 +189,7 @@ public enum InventoryType {
|
||||
@@ -180,6 +192,7 @@ public enum InventoryType {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
@ -4421,6 +4421,56 @@ index eade62328895133c026e7e678e648e1fc846f5ee..730c42eddd38acec1cdbb19dfc8c6757
|
|||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/MenuType.java b/src/main/java/org/bukkit/inventory/MenuType.java
|
||||
index ee39bf9019fa0377beb895a22db0b2a0934a4d84..29dfad691cbdd09d043f6171defc8a7fabbc2b75 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/MenuType.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/MenuType.java
|
||||
@@ -146,11 +146,45 @@ public interface MenuType extends Keyed {
|
||||
* @param player the player the view belongs to
|
||||
* @param title the title of the view
|
||||
* @return the created {@link InventoryView}
|
||||
+ * @deprecated Use {@link #create(HumanEntity, net.kyori.adventure.text.Component)} instead.
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated(since = "1.21") // Paper - adventure
|
||||
V create(@NotNull HumanEntity player, @NotNull String title);
|
||||
+
|
||||
+ // Paper start - adventure
|
||||
+ /**
|
||||
+ * Creates a view of the specified menu type.
|
||||
+ * <p>
|
||||
+ * The player provided to create this view must be the player the view
|
||||
+ * is opened for. See {@link HumanEntity#openInventory(InventoryView)}
|
||||
+ * for more information.
|
||||
+ *
|
||||
+ * @param player the player the view belongs to
|
||||
+ * @param title the title of the view
|
||||
+ * @return the created {@link InventoryView}
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ V create(@NotNull HumanEntity player, @NotNull net.kyori.adventure.text.Component title);
|
||||
+ // Paper end - adventure
|
||||
}
|
||||
|
||||
+ // Paper start - adventure
|
||||
+ /**
|
||||
+ * Creates a view of the specified menu type.
|
||||
+ * <p>
|
||||
+ * The player provided to create this view must be the player the view
|
||||
+ * is opened for. See {@link HumanEntity#openInventory(InventoryView)}
|
||||
+ * for more information.
|
||||
+ *
|
||||
+ * @param player the player the view belongs to
|
||||
+ * @param title the title of the view
|
||||
+ * @return the created {@link InventoryView}
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ InventoryView create(@NotNull HumanEntity player, @NotNull net.kyori.adventure.text.Component title);
|
||||
+ // Paper end - adventure
|
||||
+
|
||||
/**
|
||||
* Yields this MenuType as a typed version of itself with a plain
|
||||
* {@link InventoryView} representing it.
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/BookMeta.java b/src/main/java/org/bukkit/inventory/meta/BookMeta.java
|
||||
index 9bab73c3c2ca759b8e1c7d07d98cc593c961666a..f0c6943da3f783101ca647b75b3230fae3a310da 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/BookMeta.java
|
||||
|
|
|
@ -7,7 +7,7 @@ Upstream added methods for this so the original methods
|
|||
are now deprecated
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 67115810d5e837f154c3accd92dbb5e4192d264f..32e89741ffd895e31af0104a0126c2f72742a1bb 100644
|
||||
index b5a302ba913d2de97f1bcd7c60fd5cd4f245d275..cafa79f80eec5ec6d8d31d40cc2b46acc06831f9 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -243,12 +243,44 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
|
@ -56,7 +56,7 @@ index 67115810d5e837f154c3accd92dbb5e4192d264f..32e89741ffd895e31af0104a0126c2f7
|
|||
|
||||
/**
|
||||
* Returns the living entity's current maximum no damage ticks.
|
||||
@@ -777,4 +809,24 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -787,4 +819,24 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
* @return Whether the entity is invisible
|
||||
*/
|
||||
public boolean isInvisible();
|
||||
|
|
|
@ -200,10 +200,10 @@ index 9885fd1adc1f93a80d650e6d42dfa3a0b084db9f..c4f2f03ec31998d486dad1d45ef83df3
|
|||
* <p>
|
||||
* The {@code radius} is not a rigid square radius. Each structure may alter
|
||||
diff --git a/src/main/java/org/bukkit/attribute/AttributeModifier.java b/src/main/java/org/bukkit/attribute/AttributeModifier.java
|
||||
index d66502c9df2592cd18694481e7e90a71a5c3a359..ee39c0b83e558681e8b006172d34c98e2c83cda2 100644
|
||||
index 6ffc895138088162cab827b3ca6c68961b7bcc64..8c53ac6b4381f3cf8b5e989c8b2a3ba77bd4e475 100644
|
||||
--- a/src/main/java/org/bukkit/attribute/AttributeModifier.java
|
||||
+++ b/src/main/java/org/bukkit/attribute/AttributeModifier.java
|
||||
@@ -117,8 +117,7 @@ public class AttributeModifier implements ConfigurationSerializable, Keyed {
|
||||
@@ -129,8 +129,7 @@ public class AttributeModifier implements ConfigurationSerializable, Keyed {
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -430,7 +430,7 @@ index 4e1fb0974d061d5bb64899cac576318d2e6f8bf6..539b3527d0c66611e21712f29b90fba9
|
|||
public int getEntityId();
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index 8fdfa1d79daf464f8e364fd9e19d1de3a2a6848c..195a7fa0ea8e056cbde7b9152cc014d2c94353ff 100644
|
||||
index 40214a136894270695746ac83fb5f7bcc406f34a..2bb4d2da99d3f0f70e19381c13b43c147c34f944 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -22,6 +22,11 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
@ -459,7 +459,7 @@ index b688b3856cb3068a539fcecfbfa113f8ab4160a9..c275b881cbd11307a6dcc7190d7a7d40
|
|||
* @return whether the item frame is visible or not
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 32e89741ffd895e31af0104a0126c2f72742a1bb..bc17c86da49faf4b6e07d4fb4c53649da0384d69 100644
|
||||
index cafa79f80eec5ec6d8d31d40cc2b46acc06831f9..b0fbad5de65c33710ec46734ad6c69ec9b2769d5 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -502,7 +502,7 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Shoulder Entities Release API
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index 195a7fa0ea8e056cbde7b9152cc014d2c94353ff..85eec2e57b03c11f4737addb0fa88b7bf29dc9e5 100644
|
||||
index 2bb4d2da99d3f0f70e19381c13b43c147c34f944..b8431d9722ef9fce0ac9e18367abef22717997ca 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -337,6 +337,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@@ -346,6 +346,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
*/
|
||||
public int getExpToLevel();
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add openSign method to HumanEntity
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index 85eec2e57b03c11f4737addb0fa88b7bf29dc9e5..58dbe34ab1b603c2cd53af1625c1f82f8890da01 100644
|
||||
index b8431d9722ef9fce0ac9e18367abef22717997ca..0d01fe9c96a1b9076dbd6d031fa8cd41954ea8db 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -498,6 +498,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@@ -507,6 +507,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
*/
|
||||
@Deprecated
|
||||
public void setShoulderEntityRight(@Nullable Entity entity);
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Make shield blocking delay configurable
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index f154c5607b1dc3585052d9f02cf8b28cf8a3c886..7b53064364e206bc1a0f4b7af4931f6c658b7c55 100644
|
||||
index e6bdfd14bffa394cd717de7118de951a997f50b3..2d4d93a4fc3f712a21bd61e203407f3a84e16310 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -837,5 +837,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -847,5 +847,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
*/
|
||||
@Deprecated
|
||||
void setArrowsStuck(int arrows);
|
||||
|
|
|
@ -9,10 +9,10 @@ such as a bow or eating food.
|
|||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index 58dbe34ab1b603c2cd53af1625c1f82f8890da01..9cbb9093e7d8cd21eef6a23c265d68d7d0ee97b8 100644
|
||||
index 0d01fe9c96a1b9076dbd6d031fa8cd41954ea8db..b0cb4377e14da5ef1e155513046c2340ab6e525e 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -327,7 +327,9 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
@@ -336,7 +336,9 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
* blocking).
|
||||
*
|
||||
* @return Whether their hand is raised
|
||||
|
@ -23,7 +23,7 @@ index 58dbe34ab1b603c2cd53af1625c1f82f8890da01..9cbb9093e7d8cd21eef6a23c265d68d7
|
|||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 7b53064364e206bc1a0f4b7af4931f6c658b7c55..0ed64618b3f62ee984fe4f99dc6a52d5fad7b3cc 100644
|
||||
index 2d4d93a4fc3f712a21bd61e203407f3a84e16310..434ad8b07b6ee0b0919de8044d14fe3c789e203f 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -202,15 +202,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
|
@ -56,7 +56,7 @@ index 7b53064364e206bc1a0f4b7af4931f6c658b7c55..0ed64618b3f62ee984fe4f99dc6a52d5
|
|||
public void setItemInUseTicks(int ticks);
|
||||
|
||||
/**
|
||||
@@ -852,4 +858,130 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -862,4 +868,130 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
*/
|
||||
void setShieldBlockingDelay(int delay);
|
||||
// Paper end
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Material API additions
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index 019cc6baf8c767d973feba55ddc99a8d222e00d8..6ffed5ef4331498ff318ffc5850f8b9a0b85eba7 100644
|
||||
index 111c9a6be1f3d095cf8e82b118371986b6cc0fc7..c407bc264ab6c2e5aa7122d4caec63f9b482d76d 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -127,6 +127,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -129,6 +129,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* An enum of all material IDs accepted by the official server and client
|
||||
*/
|
||||
|
@ -16,7 +16,7 @@ index 019cc6baf8c767d973feba55ddc99a8d222e00d8..6ffed5ef4331498ff318ffc5850f8b9a
|
|||
public enum Material implements Keyed, Translatable {
|
||||
//<editor-fold desc="Materials" defaultstate="collapsed">
|
||||
AIR(9648, 0),
|
||||
@@ -4660,6 +4661,22 @@ public enum Material implements Keyed, Translatable {
|
||||
@@ -4662,6 +4663,22 @@ public enum Material implements Keyed, Translatable {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -300,10 +300,10 @@ index c30600666e7b32b8b4ba1e20ede04fd5ebd5a692..eec6c9cd7da6938351905129bb5a66f4
|
|||
if (this.world == null) {
|
||||
return null;
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index 6ffed5ef4331498ff318ffc5850f8b9a0b85eba7..444406eb7f0c3cd13039bf809254e480ee6fa24f 100644
|
||||
index c407bc264ab6c2e5aa7122d4caec63f9b482d76d..a432e1c776cd5bda7ba9da8a1b608cb30495e647 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -4681,20 +4681,20 @@ public enum Material implements Keyed, Translatable {
|
||||
@@ -4683,20 +4683,20 @@ public enum Material implements Keyed, Translatable {
|
||||
* Do not use for any reason.
|
||||
*
|
||||
* @return ID of this material
|
||||
|
@ -328,7 +328,7 @@ index 6ffed5ef4331498ff318ffc5850f8b9a0b85eba7..444406eb7f0c3cd13039bf809254e480
|
|||
public boolean isLegacy() {
|
||||
return legacy;
|
||||
}
|
||||
@@ -4770,8 +4770,10 @@ public enum Material implements Keyed, Translatable {
|
||||
@@ -4772,8 +4772,10 @@ public enum Material implements Keyed, Translatable {
|
||||
* Gets the MaterialData class associated with this Material
|
||||
*
|
||||
* @return MaterialData associated with this Material
|
||||
|
@ -339,7 +339,7 @@ index 6ffed5ef4331498ff318ffc5850f8b9a0b85eba7..444406eb7f0c3cd13039bf809254e480
|
|||
public Class<? extends MaterialData> getData() {
|
||||
Preconditions.checkArgument(legacy, "Cannot get data class of Modern Material");
|
||||
return ctor.getDeclaringClass();
|
||||
@@ -5227,7 +5229,11 @@ public enum Material implements Keyed, Translatable {
|
||||
@@ -5229,7 +5231,11 @@ public enum Material implements Keyed, Translatable {
|
||||
* material.
|
||||
*
|
||||
* @return true if this material can be interacted with.
|
||||
|
@ -453,10 +453,10 @@ index 48aecc9421c500137bbef1dfe3bec8de277c3ff9..aff858346776386f1288b648b221404f
|
|||
return note;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index d1906d150a7d4c4852e085d6fd480aec317c22e4..e9edc8c17cbd29cfdad31df13acb15bab2304735 100644
|
||||
index 883338632b81f6eebc03c95d5883536a5d87fc59..fbede496b05c4b9b1ecd12e711a100586776d469 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -220,14 +220,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -228,14 +228,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @see TrimMaterial
|
||||
*/
|
||||
|
@ -471,7 +471,7 @@ index d1906d150a7d4c4852e085d6fd480aec317c22e4..e9edc8c17cbd29cfdad31df13acb15ba
|
|||
Registry<TrimPattern> TRIM_PATTERN = Bukkit.getRegistry(TrimPattern.class);
|
||||
/**
|
||||
* Damage types.
|
||||
@@ -335,8 +333,11 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -343,8 +341,11 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @param input non-null input
|
||||
* @return registered object or null if does not exist
|
||||
|
@ -890,7 +890,7 @@ index bafef53c1d449135f1300c8c8fbb06f482ba67e1..f50aaddf8582be55fd4860ad374d8f22
|
|||
+@Deprecated(forRemoval = true) // Paper
|
||||
public interface LingeringPotion extends ThrownPotion { }
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 3f1b74af137868e502792c65ccd7ca74f3c3cb8c..c89ffb0f98dccd015e80e299142252fed3ece4a8 100644
|
||||
index 9e0137ea412ec8c65b2903a76499ba8222446ea3..db7dafba43b50146a32d749ec043c5d548b0d6e3 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -716,7 +716,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
|
@ -903,7 +903,7 @@ index 3f1b74af137868e502792c65ccd7ca74f3c3cb8c..c89ffb0f98dccd015e80e299142252fe
|
|||
public void setSwimming(boolean swimming);
|
||||
|
||||
/**
|
||||
@@ -971,7 +973,7 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -981,7 +983,7 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
* @deprecated entity groupings are now managed by tags, not categories
|
||||
*/
|
||||
@NotNull
|
||||
|
@ -1267,16 +1267,16 @@ index f2a2a2ad9930499c5bf624e73571a3294a90db14..c8540a42ab44647fdd112ce4f731f3dc
|
|||
return getView().getCursor();
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
index 32cd8ee2e849df602a7e10aa5d0a218007faa0ac..fbdbd2f4da5e09d4b111ddcf72e2d7dd59046bd7 100644
|
||||
index 3e6ac5beb137efd8ecd80e2e9b17015cb38e8a0a..ae4ae1fa6d407665ef03edcdef683d741668acf1 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
@@ -153,7 +153,7 @@ public enum InventoryType {
|
||||
@@ -155,7 +155,7 @@ public enum InventoryType {
|
||||
*
|
||||
* @deprecated use {@link #SMITHING}
|
||||
*/
|
||||
- @Deprecated
|
||||
+ @Deprecated(forRemoval = true) // Paper
|
||||
SMITHING_NEW(4, "Upgrade Gear"),
|
||||
SMITHING_NEW(4, "Upgrade Gear", MenuType.SMITHING),
|
||||
;
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java b/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java
|
||||
|
|
|
@ -61,10 +61,10 @@ index 0000000000000000000000000000000000000000..a6306c957fcacdcbcc8037b4ee33a167
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index ec35111df4b38fd55cc34f4baedebcf39c7fc92b..fdb985763d0a7b0a31ad938616e11ef244f63062 100644
|
||||
index db7dafba43b50146a32d749ec043c5d548b0d6e3..c2352d75e02f7be27fcf9ea69df1bd104a2449bd 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -1149,4 +1149,26 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -1159,4 +1159,26 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
return this.getActiveItemHand();
|
||||
}
|
||||
// Paper end - active item API
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add playPickupItemAnimation to LivingEntity
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index fdb985763d0a7b0a31ad938616e11ef244f63062..d87c49550e697ad545742baed40068623e83bf0b 100644
|
||||
index c2352d75e02f7be27fcf9ea69df1bd104a2449bd..88d6a5aaf2a686186fab4916480a04f6503d887c 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -1171,4 +1171,29 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -1181,4 +1181,29 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
*/
|
||||
void setJumping(boolean jumping);
|
||||
// Paper end - entity jump API
|
||||
|
|
|
@ -144,10 +144,10 @@ index dc66bd69646ac949d1386ce8f6ff913e9475439d..4482e8f2c617c2f51b2b53762e775d11
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index 444406eb7f0c3cd13039bf809254e480ee6fa24f..c12bb07fcf29be1a284f5f272b35edf206633d4a 100644
|
||||
index a432e1c776cd5bda7ba9da8a1b608cb30495e647..c2552d37295443f79abfe58f91c8261ce06661e8 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -128,7 +128,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -130,7 +130,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* An enum of all material IDs accepted by the official server and client
|
||||
*/
|
||||
@SuppressWarnings({"DeprecatedIsStillUsed", "deprecation"}) // Paper
|
||||
|
@ -156,7 +156,7 @@ index 444406eb7f0c3cd13039bf809254e480ee6fa24f..c12bb07fcf29be1a284f5f272b35edf2
|
|||
//<editor-fold desc="Materials" defaultstate="collapsed">
|
||||
AIR(9648, 0),
|
||||
STONE(22948),
|
||||
@@ -4677,6 +4677,17 @@ public enum Material implements Keyed, Translatable {
|
||||
@@ -4679,6 +4679,17 @@ public enum Material implements Keyed, Translatable {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
|
@ -174,7 +174,7 @@ index 444406eb7f0c3cd13039bf809254e480ee6fa24f..c12bb07fcf29be1a284f5f272b35edf2
|
|||
/**
|
||||
* Do not use for any reason.
|
||||
*
|
||||
@@ -5426,9 +5437,11 @@ public enum Material implements Keyed, Translatable {
|
||||
@@ -5428,9 +5439,11 @@ public enum Material implements Keyed, Translatable {
|
||||
* material
|
||||
* @see #getBlockTranslationKey()
|
||||
* @see #getItemTranslationKey()
|
||||
|
@ -312,10 +312,10 @@ index 745413357506fa7399f8ba44dfe222d1f0c919f1..25db31b2e9a6d75f0c59f75237842f9a
|
|||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/block/BlockType.java b/src/main/java/org/bukkit/block/BlockType.java
|
||||
index 4288bebf690a9cee6ff9a712352d1dcbb035eb77..a08c52949af1d2416ecb089fc559db2e3b29105c 100644
|
||||
index dfd8187ef941e8afe9cb28a26bf0d2cf2e4c4bc5..8d85d74605457724cc206a55dbb16679c3791ea1 100644
|
||||
--- a/src/main/java/org/bukkit/block/BlockType.java
|
||||
+++ b/src/main/java/org/bukkit/block/BlockType.java
|
||||
@@ -123,7 +123,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -125,7 +125,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* changes may occur. Do not use this API in plugins.
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
|
@ -324,7 +324,7 @@ index 4288bebf690a9cee6ff9a712352d1dcbb035eb77..a08c52949af1d2416ecb089fc559db2e
|
|||
|
||||
/**
|
||||
* Typed represents a subtype of {@link BlockType}s that have a known block
|
||||
@@ -3491,4 +3491,13 @@ public interface BlockType extends Keyed, Translatable {
|
||||
@@ -3493,4 +3493,13 @@ public interface BlockType extends Keyed, Translatable {
|
||||
@Nullable
|
||||
@Deprecated
|
||||
Material asMaterial();
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#clearActiveItem
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index d87c49550e697ad545742baed40068623e83bf0b..a2489932c07b1b56d3e340ecfeddd3df95cf4eb6 100644
|
||||
index 88d6a5aaf2a686186fab4916480a04f6503d887c..784da48ffc63bc932caafe58cf56ad30e7a86be6 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -1061,6 +1061,11 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -1071,6 +1071,11 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
*/
|
||||
org.bukkit.inventory.@NotNull ItemStack getActiveItem();
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ Subject: [PATCH] Expose LivingEntity hurt direction
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
index f20b0a439c4d5cd2c6caa70a46b1b49f8ab23425..937c136f2499bd1660989d14c0f50a7ef9a1a2b6 100644
|
||||
index d06539841d973030c0cd5bb06a085ed2f0f73af6..7759062ca34506c56d2d1340cf1d9c2d36151d48 100644
|
||||
--- a/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/HumanEntity.java
|
||||
@@ -356,6 +356,16 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
|
@ -26,10 +26,10 @@ index f20b0a439c4d5cd2c6caa70a46b1b49f8ab23425..937c136f2499bd1660989d14c0f50a7e
|
|||
* Get the sleep ticks of the player. This value may be capped.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index a2489932c07b1b56d3e340ecfeddd3df95cf4eb6..4327045ec437c9c81bcd4c34c4959de6d5798132 100644
|
||||
index 784da48ffc63bc932caafe58cf56ad30e7a86be6..49352ed3928163c6322634b8e6f1d3dd8caa5e74 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -1201,4 +1201,22 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -1211,4 +1211,22 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
*/
|
||||
void playPickupItemAnimation(@NotNull Item item, int quantity);
|
||||
// Paper end - pickup animation API
|
||||
|
|
|
@ -206,10 +206,10 @@ index e0f652117e585882693736de8165ae9c689e1d68..fbe14c327ee9c1ac07893853ca7c699e
|
|||
return server.getRegistry(tClass);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index e9edc8c17cbd29cfdad31df13acb15bab2304735..d855e703339e6f6e50fcb19e8954a9434e718b2f 100644
|
||||
index fbede496b05c4b9b1ecd12e711a100586776d469..3777f9c92d0c183d0ab5e28bbe73f2125babf61c 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -87,8 +87,10 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -88,8 +88,10 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* Server banner patterns.
|
||||
*
|
||||
* @see PatternType
|
||||
|
@ -221,7 +221,7 @@ index e9edc8c17cbd29cfdad31df13acb15bab2304735..d855e703339e6f6e50fcb19e8954a943
|
|||
/**
|
||||
* Server biomes.
|
||||
*
|
||||
@@ -102,7 +104,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -103,7 +105,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* @apiNote BlockType is not ready for public usage yet
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
|
@ -230,7 +230,7 @@ index e9edc8c17cbd29cfdad31df13acb15bab2304735..d855e703339e6f6e50fcb19e8954a943
|
|||
/**
|
||||
* Custom boss bars.
|
||||
*
|
||||
@@ -134,13 +136,15 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -135,13 +137,15 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @see Cat.Type
|
||||
*/
|
||||
|
@ -248,7 +248,7 @@ index e9edc8c17cbd29cfdad31df13acb15bab2304735..d855e703339e6f6e50fcb19e8954a943
|
|||
/**
|
||||
* Server entity types.
|
||||
*
|
||||
@@ -152,7 +156,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -153,7 +157,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @see MusicInstrument
|
||||
*/
|
||||
|
@ -257,7 +257,7 @@ index e9edc8c17cbd29cfdad31df13acb15bab2304735..d855e703339e6f6e50fcb19e8954a943
|
|||
/**
|
||||
* Server item types.
|
||||
*
|
||||
@@ -160,7 +164,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -161,7 +165,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* @apiNote ItemType is not ready for public usage yet
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
|
@ -266,7 +266,14 @@ index e9edc8c17cbd29cfdad31df13acb15bab2304735..d855e703339e6f6e50fcb19e8954a943
|
|||
/**
|
||||
* Default server loot tables.
|
||||
*
|
||||
@@ -178,7 +182,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -180,13 +184,13 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* @see MenuType
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
- Registry<MenuType> MENU = Objects.requireNonNull(Bukkit.getRegistry(MenuType.class), "No registry present for MenuType. This is a bug.");
|
||||
+ Registry<MenuType> MENU = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.MENU); // Paper
|
||||
/**
|
||||
* Server mob effects.
|
||||
*
|
||||
* @see PotionEffectType
|
||||
*/
|
||||
|
@ -275,7 +282,7 @@ index e9edc8c17cbd29cfdad31df13acb15bab2304735..d855e703339e6f6e50fcb19e8954a943
|
|||
/**
|
||||
* Server particles.
|
||||
*
|
||||
@@ -201,14 +205,16 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -209,14 +213,16 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* Server structures.
|
||||
*
|
||||
* @see Structure
|
||||
|
@ -294,7 +301,7 @@ index e9edc8c17cbd29cfdad31df13acb15bab2304735..d855e703339e6f6e50fcb19e8954a943
|
|||
/**
|
||||
* Sound keys.
|
||||
*
|
||||
@@ -219,40 +225,47 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -227,40 +233,47 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* Trim materials.
|
||||
*
|
||||
* @see TrimMaterial
|
||||
|
@ -349,7 +356,7 @@ index e9edc8c17cbd29cfdad31df13acb15bab2304735..d855e703339e6f6e50fcb19e8954a943
|
|||
/**
|
||||
* Memory Keys.
|
||||
*
|
||||
@@ -289,25 +302,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -297,25 +310,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @see Frog.Variant
|
||||
*/
|
||||
|
|
|
@ -43,10 +43,10 @@ index 0000000000000000000000000000000000000000..f1cd5a4f37eee8975ac3d0421b524afc
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index c12bb07fcf29be1a284f5f272b35edf206633d4a..cc25734f3dcf6075eb44e39da01ed2f1b59b618e 100644
|
||||
index c2552d37295443f79abfe58f91c8261ce06661e8..7f6cb6471c5f324e2bcdf47d6c7628c2231d7727 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -4688,6 +4688,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
@@ -4690,6 +4690,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
}
|
||||
// Paper end - add Translatable
|
||||
|
||||
|
|
|
@ -101,10 +101,10 @@ index b558fa73dbcf3747690933e6aadf7061a0de2630..be68351555bde59a4e55bf1bad261e9f
|
|||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index cc25734f3dcf6075eb44e39da01ed2f1b59b618e..2721ad40d6ba025caad16455f74f2350dcb7a4ff 100644
|
||||
index 7f6cb6471c5f324e2bcdf47d6c7628c2231d7727..d0aaf145cf34e0c02d5c7b842c203d0630b04b53 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -5497,6 +5497,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
@@ -5499,6 +5499,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
* @param world the world to check
|
||||
* @return true if this material can be used in this World.
|
||||
*/
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Improve item default attribute API
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index cc25734f3dcf6075eb44e39da01ed2f1b59b618e..8b04e0d81c56712057f1fee288b3609ef5718c60 100644
|
||||
index d0aaf145cf34e0c02d5c7b842c203d0630b04b53..5c869feaecd95dbdd658e16f5739bb41540f18bd 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -4703,6 +4703,23 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
@@ -4705,6 +4705,23 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
}
|
||||
// Paper end - item rarity API
|
||||
|
||||
|
@ -32,7 +32,7 @@ index cc25734f3dcf6075eb44e39da01ed2f1b59b618e..8b04e0d81c56712057f1fee288b3609e
|
|||
/**
|
||||
* Do not use for any reason.
|
||||
*
|
||||
@@ -5410,13 +5427,34 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
@@ -5412,13 +5429,34 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ index cc25734f3dcf6075eb44e39da01ed2f1b59b618e..8b04e0d81c56712057f1fee288b3609e
|
|||
*
|
||||
* @param slot the {@link EquipmentSlot} to check
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
index 5dd1c084e42ee93f3a358f58ed76b0a7d36f0713..94587a97fcea81a43b160b01d2c81cef2b7f4413 100644
|
||||
index 2b5a18fe7e885fa9b581c0afb299e31f3db2690c..a6d1dde422de98f178c0c9add99e01203a35e5cb 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
@@ -2261,6 +2261,21 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans
|
||||
|
|
|
@ -609,10 +609,10 @@ index 6b3c9bef9a8a34ddc6ff42cf358541a2665bf5e3..9c618a27d590f186f29c5d9094fc565e
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 4ba92fe8979ed127c18cb78c2b8204daa2425ed7..73247ab2cd2cf0035cf88c98250736f9bc9ee517 100644
|
||||
index 2eb6f650610ca1a9b9fca49e453f79e08944be75..c0772f72768846cffd065c53de7326f9fe6386a2 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -994,6 +994,7 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -1004,6 +1004,7 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
*
|
||||
* @param invisible If the entity is invisible
|
||||
*/
|
||||
|
@ -620,7 +620,7 @@ index 4ba92fe8979ed127c18cb78c2b8204daa2425ed7..73247ab2cd2cf0035cf88c98250736f9
|
|||
public void setInvisible(boolean invisible);
|
||||
|
||||
/**
|
||||
@@ -1001,6 +1002,7 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -1011,6 +1012,7 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
*
|
||||
* @return Whether the entity is invisible
|
||||
*/
|
||||
|
@ -628,7 +628,7 @@ index 4ba92fe8979ed127c18cb78c2b8204daa2425ed7..73247ab2cd2cf0035cf88c98250736f9
|
|||
public boolean isInvisible();
|
||||
|
||||
// Paper start
|
||||
@@ -1037,6 +1039,57 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -1047,6 +1049,57 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
void setShieldBlockingDelay(int delay);
|
||||
// Paper end
|
||||
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add hasCollision methods to various places
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index 8b04e0d81c56712057f1fee288b3609ef5718c60..c4f067598a40b0381bc9e601a3809e2683c10407 100644
|
||||
index 5c869feaecd95dbdd658e16f5739bb41540f18bd..6959f36023b12ec2dece9b91a3b8a5d07b635430 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -4720,6 +4720,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
@@ -4722,6 +4722,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
}
|
||||
// Paper end - item default attributes API
|
||||
|
||||
|
@ -67,10 +67,10 @@ index f4a739d8022d19a7ae0ee9bf93eb5c4846b4bd40..94e1278340c0d9d2be9edc68f6454143
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/block/BlockType.java b/src/main/java/org/bukkit/block/BlockType.java
|
||||
index a08c52949af1d2416ecb089fc559db2e3b29105c..8f430a4067fc722ebfbca846cccded4fb0a3a4e5 100644
|
||||
index 8d85d74605457724cc206a55dbb16679c3791ea1..3dc165265af4a9cb0e05018b9273b7dfdecf730a 100644
|
||||
--- a/src/main/java/org/bukkit/block/BlockType.java
|
||||
+++ b/src/main/java/org/bukkit/block/BlockType.java
|
||||
@@ -3500,4 +3500,13 @@ public interface BlockType extends Keyed, Translatable, net.kyori.adventure.tran
|
||||
@@ -3502,4 +3502,13 @@ public interface BlockType extends Keyed, Translatable, net.kyori.adventure.tran
|
||||
@Override
|
||||
@NotNull String getTranslationKey();
|
||||
// Paper end - add Translatable
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] More PotionEffectType API
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index 5dbbc4eb764650395c6ebaaf5fdf0466ca107439..0ee9a8728035217bb95c7fba917b45a5ef2ea533 100644
|
||||
index c1f46c27f0571ce54f35ee0fab9b586ea62ee832..7870a796e719148a42d18f1497b56c0d8f651a43 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -323,6 +323,33 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -331,6 +331,33 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* @see GameEvent
|
||||
*/
|
||||
Registry<GameEvent> GAME_EVENT = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.GAME_EVENT); // Paper
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#swingHand(EquipmentSlot) convenience method
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 0c7d96bc296b56dc9ff0ada89bb4d715716f8adc..fb62933d589ccbe4181a7b9633bb742ae35f68dd 100644
|
||||
index f7a3dd62ae5e492a7bccf8167cec0fc560499fa2..4ed60d7eae1b1c8980f8844b33151fd7c53207c2 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -1331,4 +1331,24 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -1341,4 +1341,24 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@Deprecated
|
||||
void setHurtDirection(float hurtDirection);
|
||||
// Paper end - hurt direction API
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add entity knockback API
|
|||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index fb62933d589ccbe4181a7b9633bb742ae35f68dd..597a3b581cb6fa2605fd5916e5639c1020d688b7 100644
|
||||
index 4ed60d7eae1b1c8980f8844b33151fd7c53207c2..86c5ceddc722d28261f8a6d8368400fe2731aaf0 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -1351,4 +1351,18 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -1361,4 +1361,18 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
}
|
||||
}
|
||||
// Paper end - swing hand API
|
||||
|
|
|
@ -8,10 +8,10 @@ to simulate damage done to an itemstack and all
|
|||
the logic associated with damaging them
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 597a3b581cb6fa2605fd5916e5639c1020d688b7..c9c3b926c5bb408d964ed5acc9f95c8527837a25 100644
|
||||
index 86c5ceddc722d28261f8a6d8368400fe2731aaf0..9f3e2903c955f2a5d1b25825c49188df62d20cef 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -1365,4 +1365,53 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -1375,4 +1375,53 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
*/
|
||||
void knockback(double strength, double directionX, double directionZ);
|
||||
// Paper end - knockback API
|
||||
|
|
|
@ -53,10 +53,10 @@ index 6dcaf7e9bc9afb708ab569e82f27c87833450ff1..a76e537c9b3b9519cd46894c90b750f0
|
|||
|
||||
// Paper start - Collision API
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 7c027d7bbd6b8a1543fa92d44e99674925f093b3..f5149d54d6cb5019f398718b9aa52bc3ab34a5ae 100644
|
||||
index 016529563381a674db8050cb328f9e8f16e72e93..c610731928ac9b01b111a7ccf0340ad59fcfb867 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -1414,4 +1414,22 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -1424,4 +1424,22 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
*/
|
||||
void damageItemStack(org.bukkit.inventory.@NotNull EquipmentSlot slot, int amount);
|
||||
// Paper end - ItemStack damage API
|
||||
|
|
|
@ -70,34 +70,10 @@ index f08ee26cc4d479e1bfc5264b8cbe721315de91f2..f1fa86ddf1f50a357c9e94cc61261d8c
|
|||
* Remove a modifier from this instance.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/attribute/AttributeModifier.java b/src/main/java/org/bukkit/attribute/AttributeModifier.java
|
||||
index ee39c0b83e558681e8b006172d34c98e2c83cda2..c57690798108e9f91f8c552f39dcc2b080fe1b61 100644
|
||||
index 8c53ac6b4381f3cf8b5e989c8b2a3ba77bd4e475..def473b6424da1e81448bd492b7fef46691eaf8c 100644
|
||||
--- a/src/main/java/org/bukkit/attribute/AttributeModifier.java
|
||||
+++ b/src/main/java/org/bukkit/attribute/AttributeModifier.java
|
||||
@@ -25,26 +25,32 @@ public class AttributeModifier implements ConfigurationSerializable, Keyed {
|
||||
private final Operation operation;
|
||||
private final EquipmentSlotGroup slot;
|
||||
|
||||
- @Deprecated
|
||||
+ @Deprecated(forRemoval = true, since = "1.21")
|
||||
public AttributeModifier(@NotNull String name, double amount, @NotNull Operation operation) {
|
||||
this(UUID.randomUUID(), name, amount, operation);
|
||||
}
|
||||
|
||||
- @Deprecated
|
||||
+ @Deprecated(forRemoval = true, since = "1.21")
|
||||
public AttributeModifier(@NotNull UUID uuid, @NotNull String name, double amount, @NotNull Operation operation) {
|
||||
this(uuid, name, amount, operation, (EquipmentSlot) null);
|
||||
}
|
||||
|
||||
- @Deprecated
|
||||
+ @Deprecated(forRemoval = true, since = "1.21")
|
||||
public AttributeModifier(@NotNull UUID uuid, @NotNull String name, double amount, @NotNull Operation operation, @Nullable EquipmentSlot slot) {
|
||||
this(uuid, name, amount, operation, (slot) == null ? EquipmentSlotGroup.ANY : slot.getGroup());
|
||||
}
|
||||
|
||||
- @Deprecated
|
||||
+ @Deprecated(forRemoval = true, since = "1.21")
|
||||
public AttributeModifier(@NotNull UUID uuid, @NotNull String name, double amount, @NotNull Operation operation, @NotNull EquipmentSlotGroup slot) {
|
||||
@@ -48,6 +48,12 @@ public class AttributeModifier implements ConfigurationSerializable, Keyed {
|
||||
this(NamespacedKey.fromString(uuid.toString()), amount, operation, slot);
|
||||
}
|
||||
|
||||
|
@ -110,12 +86,3 @@ index ee39c0b83e558681e8b006172d34c98e2c83cda2..c57690798108e9f91f8c552f39dcc2b0
|
|||
public AttributeModifier(@NotNull NamespacedKey key, double amount, @NotNull Operation operation, @NotNull EquipmentSlotGroup slot) {
|
||||
Preconditions.checkArgument(key != null, "Key cannot be null");
|
||||
Preconditions.checkArgument(operation != null, "Operation cannot be null");
|
||||
@@ -63,7 +69,7 @@ public class AttributeModifier implements ConfigurationSerializable, Keyed {
|
||||
* @deprecated attributes are now identified by keys
|
||||
*/
|
||||
@NotNull
|
||||
- @Deprecated
|
||||
+ @Deprecated(forRemoval = true, since = "1.21")
|
||||
public UUID getUniqueId() {
|
||||
return UUID.fromString(getKey().toString());
|
||||
}
|
||||
|
|
|
@ -25,10 +25,10 @@ index 7522c611b5214dd09867c434d5f7cf161f5c04ca..026b1832bcd163ab89668c991bf002e6
|
|||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index c4f067598a40b0381bc9e601a3809e2683c10407..54704da43cf9c429f3914f0580246dde99aa93c0 100644
|
||||
index 6959f36023b12ec2dece9b91a3b8a5d07b635430..de469f32dd9a01e0e2fde016044a783dde0c5b98 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -2497,6 +2497,8 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
@@ -2499,6 +2499,8 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
EGG(21603, 16),
|
||||
COMPASS(24139),
|
||||
RECOVERY_COMPASS(12710),
|
||||
|
@ -162,15 +162,15 @@ index 4adc91ba3dff00ab44303778e9d4499f7808ad00..beb62426490a361af793fb530106d854
|
|||
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
index fbdbd2f4da5e09d4b111ddcf72e2d7dd59046bd7..126d60a4d0b3b140b922fb24aa425e805892ad32 100644
|
||||
index ae4ae1fa6d407665ef03edcdef683d741668acf1..b4fe8108e8b36b8ce859cdd4a5b557034f923c85 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
@@ -146,7 +146,6 @@ public enum InventoryType {
|
||||
@@ -148,7 +148,6 @@ public enum InventoryType {
|
||||
/**
|
||||
* A crafter inventory, with 9 CRAFTING slots.
|
||||
*/
|
||||
- @ApiStatus.Experimental
|
||||
CRAFTER(9, "Crafter"),
|
||||
CRAFTER(9, "Crafter", MenuType.CRAFTER_3X3),
|
||||
/**
|
||||
* The new smithing inventory, with 3 CRAFTING slots and 1 RESULT slot.
|
||||
diff --git a/src/main/java/org/bukkit/inventory/CrafterInventory.java b/src/main/java/org/bukkit/inventory/CrafterInventory.java
|
||||
|
|
|
@ -49,10 +49,10 @@ index 62d2b3f950860dee0898d77b0a29635c3f9a7e23..98fdfc8978fea1937e31a7427433a192
|
|||
@Override
|
||||
public @NotNull String translationKey() {
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index 1df2b8fcf90333d5981f16d9dddddd48289f94e4..5d21459e9128c515508a2b4b2265d9824e10d9d5 100644
|
||||
index 7870a796e719148a42d18f1497b56c0d8f651a43..ff82bf3ea959c78e71ec7b0972a2d472f20aaf04 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -359,6 +359,79 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -367,6 +367,79 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@Nullable
|
||||
T get(@NotNull NamespacedKey key);
|
||||
|
||||
|
@ -132,7 +132,7 @@ index 1df2b8fcf90333d5981f16d9dddddd48289f94e4..5d21459e9128c515508a2b4b2265d982
|
|||
/**
|
||||
* Returns a new stream, which contains all registry items, which are registered to the registry.
|
||||
*
|
||||
@@ -433,5 +506,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -441,5 +514,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
public Class<T> getType() {
|
||||
return this.type;
|
||||
}
|
||||
|
|
|
@ -6,18 +6,18 @@ Subject: [PATCH] Add missing InventoryType
|
|||
Upstream did not add a DECORATED_POT inventory type
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
index 126d60a4d0b3b140b922fb24aa425e805892ad32..398f74ba0d2e890fb556cd964f61da7c623a7c6d 100644
|
||||
index b4fe8108e8b36b8ce859cdd4a5b557034f923c85..7184f80899206bedeac387e9f8a35482801efd4b 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
@@ -143,6 +143,12 @@ public enum InventoryType {
|
||||
@@ -145,6 +145,12 @@ public enum InventoryType {
|
||||
* Pseudo jukebox inventory with 1 slot of undefined type.
|
||||
*/
|
||||
JUKEBOX(1, "Jukebox", false),
|
||||
JUKEBOX(1, "Jukebox", null, false),
|
||||
+ // Paper start - add missing type
|
||||
+ /**
|
||||
+ * Pseudo decorated pot with 1 slot of undefined type.
|
||||
+ */
|
||||
+ DECORATED_POT(1, "Decorated Pot", false),
|
||||
+ DECORATED_POT(1, "Decorated Pot", null, false),
|
||||
+ // Paper end - add missing type
|
||||
/**
|
||||
* A crafter inventory, with 9 CRAFTING slots.
|
||||
|
|
|
@ -10,10 +10,10 @@ Adds the following:
|
|||
Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/attribute/AttributeModifier.java b/src/main/java/org/bukkit/attribute/AttributeModifier.java
|
||||
index c57690798108e9f91f8c552f39dcc2b080fe1b61..bfa378fe3d074bafbc0af2c4d858e2a34d3126bd 100644
|
||||
index def473b6424da1e81448bd492b7fef46691eaf8c..027a7d3b6feb52f6c3424edc0820d29fdaf6ebae 100644
|
||||
--- a/src/main/java/org/bukkit/attribute/AttributeModifier.java
|
||||
+++ b/src/main/java/org/bukkit/attribute/AttributeModifier.java
|
||||
@@ -118,6 +118,7 @@ public class AttributeModifier implements ConfigurationSerializable, Keyed {
|
||||
@@ -130,6 +130,7 @@ public class AttributeModifier implements ConfigurationSerializable, Keyed {
|
||||
*/
|
||||
@Nullable
|
||||
@Deprecated
|
||||
|
@ -22,10 +22,10 @@ index c57690798108e9f91f8c552f39dcc2b080fe1b61..bfa378fe3d074bafbc0af2c4d858e2a3
|
|||
return slot == EquipmentSlotGroup.ANY ? null : slot.getExample();
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 8369da45206d2606f0715f3d803163dd8028251e..fcdc5fce88720cc926a3953d80b5045113d1516c 100644
|
||||
index 51a428473e702be3ab79bd1e579d1114f747791b..68c08e7a212bc3e3885f9b5a4d9aef85fcb3b029 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -1447,4 +1447,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -1457,4 +1457,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
*/
|
||||
void setBodyYaw(float bodyYaw);
|
||||
// Paper end - body yaw API
|
||||
|
|
|
@ -132,31 +132,6 @@ index ff6818b6d9e0207eafdd749928f33aeac3f27191..992f39da07bafe9769effaa7dc6adc01
|
|||
/**
|
||||
* Checks to see if this item has a maximum amount of damage.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/FireworkMeta.java b/src/main/java/org/bukkit/inventory/meta/FireworkMeta.java
|
||||
index 9bd15803cd3526da951ed197305a1b9385305927..5833c4c16b08a0f338a5cd7c0011e82eeda222c2 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/FireworkMeta.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/FireworkMeta.java
|
||||
@@ -75,10 +75,20 @@ public interface FireworkMeta extends ItemMeta {
|
||||
*/
|
||||
boolean hasEffects();
|
||||
|
||||
+ // Paper start - add hasPower
|
||||
+ /**
|
||||
+ * Checks if power is defined on this meta.
|
||||
+ *
|
||||
+ * @return true if there is a power specified
|
||||
+ */
|
||||
+ boolean hasPower();
|
||||
+ // Paper end - add hasPower
|
||||
+
|
||||
/**
|
||||
* Gets the approximate height the firework will fly.
|
||||
*
|
||||
* @return approximate flight height of the firework.
|
||||
+ * @see #hasPower()
|
||||
*/
|
||||
int getPower();
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
index 1a4260b00b193b94ce4b1b2954644f4e41baff4c..5d5fcb2720b62e47d47f441032c4de02574b051a 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
|
|
|
@ -795,10 +795,10 @@ index 0000000000000000000000000000000000000000..5fde17e97eddcd1d01ee39694c9159d0
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index 5d21459e9128c515508a2b4b2265d9824e10d9d5..20015393f91af405c99db2635a471fb6ff19e4bf 100644
|
||||
index ff82bf3ea959c78e71ec7b0972a2d472f20aaf04..1392a1295349cfc43fbc115c912c1995779ffe62 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -358,6 +358,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -366,6 +366,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*/
|
||||
@Nullable
|
||||
T get(@NotNull NamespacedKey key);
|
||||
|
@ -826,7 +826,7 @@ index 5d21459e9128c515508a2b4b2265d9824e10d9d5..20015393f91af405c99db2635a471fb6
|
|||
|
||||
// Paper start - improve Registry
|
||||
/**
|
||||
@@ -432,6 +453,34 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -440,6 +461,34 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
}
|
||||
// Paper end - improve Registry
|
||||
|
||||
|
@ -861,7 +861,7 @@ index 5d21459e9128c515508a2b4b2265d9824e10d9d5..20015393f91af405c99db2635a471fb6
|
|||
/**
|
||||
* Returns a new stream, which contains all registry items, which are registered to the registry.
|
||||
*
|
||||
@@ -513,5 +562,23 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -521,5 +570,23 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
return value.getKey();
|
||||
}
|
||||
// Paper end - improve Registry
|
||||
|
|
|
@ -5,10 +5,10 @@ Subject: [PATCH] Introduce registry entry and builders
|
|||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/registry/RegistryKey.java b/src/main/java/io/papermc/paper/registry/RegistryKey.java
|
||||
index 76daccf4ea502e1747a6f9176dc16fd20c561286..2945dde566682f977e84fde5d473a6c69be24df1 100644
|
||||
index 7763ea28a00c25ffd8ba8941cff29bae5ae117a2..ccbe3fa2e01a80abb801d14891dce34ed179b5ee 100644
|
||||
--- a/src/main/java/io/papermc/paper/registry/RegistryKey.java
|
||||
+++ b/src/main/java/io/papermc/paper/registry/RegistryKey.java
|
||||
@@ -76,9 +76,10 @@ public sealed interface RegistryKey<T> extends Keyed permits RegistryKeyImpl {
|
||||
@@ -77,9 +77,10 @@ public sealed interface RegistryKey<T> extends Keyed permits RegistryKeyImpl {
|
||||
@ApiStatus.Internal
|
||||
RegistryKey<BlockType> BLOCK = create("block");
|
||||
/**
|
||||
|
|
|
@ -242,10 +242,10 @@ index 330e3013eda204aa9b33d5e1c3104e0b595abdbc..c80e0ef587a001ee6de3f5c182cc9696
|
|||
/**
|
||||
* Do not use, method will get removed, and the plugin won't run
|
||||
diff --git a/src/main/java/org/bukkit/block/BlockType.java b/src/main/java/org/bukkit/block/BlockType.java
|
||||
index 8f430a4067fc722ebfbca846cccded4fb0a3a4e5..a98cc1bc25fcde49b525ae6f841ea2841111e028 100644
|
||||
index 3dc165265af4a9cb0e05018b9273b7dfdecf730a..72aa7e4004afcaa132dc4dbbe2ff050b503928af 100644
|
||||
--- a/src/main/java/org/bukkit/block/BlockType.java
|
||||
+++ b/src/main/java/org/bukkit/block/BlockType.java
|
||||
@@ -123,7 +123,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -125,7 +125,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* changes may occur. Do not use this API in plugins.
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
|
@ -254,7 +254,7 @@ index 8f430a4067fc722ebfbca846cccded4fb0a3a4e5..a98cc1bc25fcde49b525ae6f841ea284
|
|||
|
||||
/**
|
||||
* Typed represents a subtype of {@link BlockType}s that have a known block
|
||||
@@ -3479,7 +3479,9 @@ public interface BlockType extends Keyed, Translatable, net.kyori.adventure.tran
|
||||
@@ -3481,7 +3481,9 @@ public interface BlockType extends Keyed, Translatable, net.kyori.adventure.tran
|
||||
*
|
||||
* @param world the world to check
|
||||
* @return true if this BlockType can be used in this World.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue