aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2021-05-10 00:25:35 -0700
committerGitHub <[email protected]>2021-05-10 07:25:35 +0000
commitf50171f3bbdf3545bd32a012493af19e5296e0cd (patch)
treea2ebd825071f1a1b5018c808298cbb3ebd44b80a
parentaeb6e7dd25439d23f11f956215927bcbf03a8e87 (diff)
downloadPaper-f50171f3bbdf3545bd32a012493af19e5296e0cd.tar.gz
Paper-f50171f3bbdf3545bd32a012493af19e5296e0cd.zip
Add missing rarity method on ItemStack (#5594)
-rw-r--r--Spigot-API-Patches/0282-Item-Rarity-API.patch20
-rw-r--r--Spigot-Server-Patches/0699-fix-cancelling-block-falling-causing-client-desync.patch (renamed from Spigot-Server-Patches/0698-fix-cancelling-block-falling-causing-client-desync.patch)4
-rw-r--r--Spigot-Server-Patches/0700-Expose-protocol-version.patch (renamed from Spigot-Server-Patches/0699-Expose-protocol-version.patch)0
-rw-r--r--Spigot-Server-Patches/0701-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch (renamed from Spigot-Server-Patches/0700-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch)0
-rw-r--r--Spigot-Server-Patches/0702-Enhance-console-tab-completions-for-brigadier-comman.patch (renamed from Spigot-Server-Patches/0701-Enhance-console-tab-completions-for-brigadier-comman.patch)0
-rw-r--r--Spigot-Server-Patches/0703-Fix-PlayerItemConsumeEvent-cancelling-properly.patch (renamed from Spigot-Server-Patches/0702-Fix-PlayerItemConsumeEvent-cancelling-properly.patch)0
-rw-r--r--Spigot-Server-Patches/0704-Add-bypass-host-check.patch (renamed from Spigot-Server-Patches/0703-Add-bypass-host-check.patch)0
-rw-r--r--Spigot-Server-Patches/0705-don-t-throw-when-loading-invalid-TEs.patch (renamed from Spigot-Server-Patches/0704-don-t-throw-when-loading-invalid-TEs.patch)0
-rw-r--r--Spigot-Server-Patches/0706-Set-area-affect-cloud-rotation.patch (renamed from Spigot-Server-Patches/0705-Set-area-affect-cloud-rotation.patch)0
-rw-r--r--Spigot-Server-Patches/0707-add-isDeeplySleeping-to-HumanEntity.patch (renamed from Spigot-Server-Patches/0706-add-isDeeplySleeping-to-HumanEntity.patch)0
-rw-r--r--Spigot-Server-Patches/0708-Fix-duplicating-give-items-on-item-drop-cancel.patch (renamed from Spigot-Server-Patches/0707-Fix-duplicating-give-items-on-item-drop-cancel.patch)0
-rw-r--r--Spigot-Server-Patches/0709-add-consumeFuel-to-FurnaceBurnEvent.patch (renamed from Spigot-Server-Patches/0708-add-consumeFuel-to-FurnaceBurnEvent.patch)0
-rw-r--r--Spigot-Server-Patches/0710-add-get-set-drop-chance-to-EntityEquipment.patch (renamed from Spigot-Server-Patches/0709-add-get-set-drop-chance-to-EntityEquipment.patch)0
-rw-r--r--Spigot-Server-Patches/0711-fix-PigZombieAngerEvent-cancellation.patch (renamed from Spigot-Server-Patches/0710-fix-PigZombieAngerEvent-cancellation.patch)0
-rw-r--r--Spigot-Server-Patches/0712-Fix-checkReach-check-for-Shulker-boxes.patch (renamed from Spigot-Server-Patches/0711-Fix-checkReach-check-for-Shulker-boxes.patch)0
-rw-r--r--Spigot-Server-Patches/0713-fix-PlayerItemHeldEvent-firing-twice.patch (renamed from Spigot-Server-Patches/0712-fix-PlayerItemHeldEvent-firing-twice.patch)0
-rw-r--r--Spigot-Server-Patches/0714-Added-PlayerDeepSleepEvent.patch (renamed from Spigot-Server-Patches/0713-Added-PlayerDeepSleepEvent.patch)0
-rw-r--r--Spigot-Server-Patches/0715-More-World-API.patch (renamed from Spigot-Server-Patches/0714-More-World-API.patch)0
-rw-r--r--Spigot-Server-Patches/0716-Added-PlayerBedFailEnterEvent.patch (renamed from Spigot-Server-Patches/0715-Added-PlayerBedFailEnterEvent.patch)0
-rw-r--r--Spigot-Server-Patches/0717-Implement-methods-to-convert-between-Component-and-B.patch (renamed from Spigot-Server-Patches/0716-Implement-methods-to-convert-between-Component-and-B.patch)0
-rw-r--r--Spigot-Server-Patches/0718-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch (renamed from Spigot-Server-Patches/0717-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch)0
-rw-r--r--Spigot-Server-Patches/0719-add-RespawnFlags-to-PlayerRespawnEvent.patch (renamed from Spigot-Server-Patches/0718-add-RespawnFlags-to-PlayerRespawnEvent.patch)0
-rw-r--r--Spigot-Server-Patches/0720-Introduce-beacon-activation-deactivation-events.patch (renamed from Spigot-Server-Patches/0719-Introduce-beacon-activation-deactivation-events.patch)0
-rw-r--r--Spigot-Server-Patches/0721-Add-Channel-initialization-listeners.patch (renamed from Spigot-Server-Patches/0720-Add-Channel-initialization-listeners.patch)0
-rw-r--r--Spigot-Server-Patches/0722-Send-empty-commands-if-tab-completion-is-disabled.patch (renamed from Spigot-Server-Patches/0721-Send-empty-commands-if-tab-completion-is-disabled.patch)0
-rw-r--r--Spigot-Server-Patches/0723-Add-more-WanderingTrader-API.patch (renamed from Spigot-Server-Patches/0722-Add-more-WanderingTrader-API.patch)0
26 files changed, 22 insertions, 2 deletions
diff --git a/Spigot-API-Patches/0282-Item-Rarity-API.patch b/Spigot-API-Patches/0282-Item-Rarity-API.patch
index 12b81466e5..d796b5f349 100644
--- a/Spigot-API-Patches/0282-Item-Rarity-API.patch
+++ b/Spigot-API-Patches/0282-Item-Rarity-API.patch
@@ -86,3 +86,23 @@ index fafc4d63b6202b00a133c50cd38dec54db9b3576..6db8c3bae9c9bb10eedf8102b3ac4c6e
+ public io.papermc.paper.inventory.ItemRarity getItemStackRarity(ItemStack itemStack);
// Paper end
}
+diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
+index 58f99e3ebac9a01ebffe4d208e16cbee474d4aa3..3c64c6ef397af102a3e085fe6b77a888d5c3de84 100644
+--- a/src/main/java/org/bukkit/inventory/ItemStack.java
++++ b/src/main/java/org/bukkit/inventory/ItemStack.java
+@@ -842,5 +842,15 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
+ ItemMeta itemMeta = getItemMeta();
+ return itemMeta != null && itemMeta.hasItemFlag(flag);
+ }
++
++ /**
++ * Gets the item rarity of the itemstack. The rarity can change based on enchantements.
++ *
++ * @return the itemstack rarity
++ */
++ @NotNull
++ public io.papermc.paper.inventory.ItemRarity getRarity() {
++ return Bukkit.getUnsafe().getItemStackRarity(this);
++ }
+ // Paper end
+ }
diff --git a/Spigot-Server-Patches/0698-fix-cancelling-block-falling-causing-client-desync.patch b/Spigot-Server-Patches/0699-fix-cancelling-block-falling-causing-client-desync.patch
index 132c6ed69e..099ef07a97 100644
--- a/Spigot-Server-Patches/0698-fix-cancelling-block-falling-causing-client-desync.patch
+++ b/Spigot-Server-Patches/0699-fix-cancelling-block-falling-causing-client-desync.patch
@@ -46,10 +46,10 @@ index 62d8b53c024888aa43b8fddf8a475dfb8284a4cc..2a61c24dd26edf4c72e977c6024fe233
this.die();
return;
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBase.java b/src/main/java/net/minecraft/world/level/block/state/BlockBase.java
-index ac3709c8158d42ccafd457cfa44a16dc8c9eb949..d9765da72c614260fdba47e7d1add4145991f97c 100644
+index 3fdafc0ff0c4148ec844dbdc1455d17cdcb4a75a..0d26250887f80d0c250bcd6bc7de303362427d3e 100644
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBase.java
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBase.java
-@@ -682,6 +682,7 @@ public abstract class BlockBase {
+@@ -683,6 +683,7 @@ public abstract class BlockBase {
return this.getBlock().a(tag) && predicate.test(this);
}
diff --git a/Spigot-Server-Patches/0699-Expose-protocol-version.patch b/Spigot-Server-Patches/0700-Expose-protocol-version.patch
index 9fb1e172db..9fb1e172db 100644
--- a/Spigot-Server-Patches/0699-Expose-protocol-version.patch
+++ b/Spigot-Server-Patches/0700-Expose-protocol-version.patch
diff --git a/Spigot-Server-Patches/0700-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch b/Spigot-Server-Patches/0701-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch
index fef6b7dd93..fef6b7dd93 100644
--- a/Spigot-Server-Patches/0700-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch
+++ b/Spigot-Server-Patches/0701-Allow-for-Component-suggestion-tooltips-in-AsyncTabC.patch
diff --git a/Spigot-Server-Patches/0701-Enhance-console-tab-completions-for-brigadier-comman.patch b/Spigot-Server-Patches/0702-Enhance-console-tab-completions-for-brigadier-comman.patch
index 5636a8b6e4..5636a8b6e4 100644
--- a/Spigot-Server-Patches/0701-Enhance-console-tab-completions-for-brigadier-comman.patch
+++ b/Spigot-Server-Patches/0702-Enhance-console-tab-completions-for-brigadier-comman.patch
diff --git a/Spigot-Server-Patches/0702-Fix-PlayerItemConsumeEvent-cancelling-properly.patch b/Spigot-Server-Patches/0703-Fix-PlayerItemConsumeEvent-cancelling-properly.patch
index d9657ceefb..d9657ceefb 100644
--- a/Spigot-Server-Patches/0702-Fix-PlayerItemConsumeEvent-cancelling-properly.patch
+++ b/Spigot-Server-Patches/0703-Fix-PlayerItemConsumeEvent-cancelling-properly.patch
diff --git a/Spigot-Server-Patches/0703-Add-bypass-host-check.patch b/Spigot-Server-Patches/0704-Add-bypass-host-check.patch
index 6993d14f49..6993d14f49 100644
--- a/Spigot-Server-Patches/0703-Add-bypass-host-check.patch
+++ b/Spigot-Server-Patches/0704-Add-bypass-host-check.patch
diff --git a/Spigot-Server-Patches/0704-don-t-throw-when-loading-invalid-TEs.patch b/Spigot-Server-Patches/0705-don-t-throw-when-loading-invalid-TEs.patch
index eb77500117..eb77500117 100644
--- a/Spigot-Server-Patches/0704-don-t-throw-when-loading-invalid-TEs.patch
+++ b/Spigot-Server-Patches/0705-don-t-throw-when-loading-invalid-TEs.patch
diff --git a/Spigot-Server-Patches/0705-Set-area-affect-cloud-rotation.patch b/Spigot-Server-Patches/0706-Set-area-affect-cloud-rotation.patch
index 25e0a9b5a8..25e0a9b5a8 100644
--- a/Spigot-Server-Patches/0705-Set-area-affect-cloud-rotation.patch
+++ b/Spigot-Server-Patches/0706-Set-area-affect-cloud-rotation.patch
diff --git a/Spigot-Server-Patches/0706-add-isDeeplySleeping-to-HumanEntity.patch b/Spigot-Server-Patches/0707-add-isDeeplySleeping-to-HumanEntity.patch
index 5e1db72d90..5e1db72d90 100644
--- a/Spigot-Server-Patches/0706-add-isDeeplySleeping-to-HumanEntity.patch
+++ b/Spigot-Server-Patches/0707-add-isDeeplySleeping-to-HumanEntity.patch
diff --git a/Spigot-Server-Patches/0707-Fix-duplicating-give-items-on-item-drop-cancel.patch b/Spigot-Server-Patches/0708-Fix-duplicating-give-items-on-item-drop-cancel.patch
index cee651ba1d..cee651ba1d 100644
--- a/Spigot-Server-Patches/0707-Fix-duplicating-give-items-on-item-drop-cancel.patch
+++ b/Spigot-Server-Patches/0708-Fix-duplicating-give-items-on-item-drop-cancel.patch
diff --git a/Spigot-Server-Patches/0708-add-consumeFuel-to-FurnaceBurnEvent.patch b/Spigot-Server-Patches/0709-add-consumeFuel-to-FurnaceBurnEvent.patch
index 410ceaf296..410ceaf296 100644
--- a/Spigot-Server-Patches/0708-add-consumeFuel-to-FurnaceBurnEvent.patch
+++ b/Spigot-Server-Patches/0709-add-consumeFuel-to-FurnaceBurnEvent.patch
diff --git a/Spigot-Server-Patches/0709-add-get-set-drop-chance-to-EntityEquipment.patch b/Spigot-Server-Patches/0710-add-get-set-drop-chance-to-EntityEquipment.patch
index c205b0e09c..c205b0e09c 100644
--- a/Spigot-Server-Patches/0709-add-get-set-drop-chance-to-EntityEquipment.patch
+++ b/Spigot-Server-Patches/0710-add-get-set-drop-chance-to-EntityEquipment.patch
diff --git a/Spigot-Server-Patches/0710-fix-PigZombieAngerEvent-cancellation.patch b/Spigot-Server-Patches/0711-fix-PigZombieAngerEvent-cancellation.patch
index 532dace60c..532dace60c 100644
--- a/Spigot-Server-Patches/0710-fix-PigZombieAngerEvent-cancellation.patch
+++ b/Spigot-Server-Patches/0711-fix-PigZombieAngerEvent-cancellation.patch
diff --git a/Spigot-Server-Patches/0711-Fix-checkReach-check-for-Shulker-boxes.patch b/Spigot-Server-Patches/0712-Fix-checkReach-check-for-Shulker-boxes.patch
index 0a4779d24e..0a4779d24e 100644
--- a/Spigot-Server-Patches/0711-Fix-checkReach-check-for-Shulker-boxes.patch
+++ b/Spigot-Server-Patches/0712-Fix-checkReach-check-for-Shulker-boxes.patch
diff --git a/Spigot-Server-Patches/0712-fix-PlayerItemHeldEvent-firing-twice.patch b/Spigot-Server-Patches/0713-fix-PlayerItemHeldEvent-firing-twice.patch
index 9d3a5dd90b..9d3a5dd90b 100644
--- a/Spigot-Server-Patches/0712-fix-PlayerItemHeldEvent-firing-twice.patch
+++ b/Spigot-Server-Patches/0713-fix-PlayerItemHeldEvent-firing-twice.patch
diff --git a/Spigot-Server-Patches/0713-Added-PlayerDeepSleepEvent.patch b/Spigot-Server-Patches/0714-Added-PlayerDeepSleepEvent.patch
index cf56b0987c..cf56b0987c 100644
--- a/Spigot-Server-Patches/0713-Added-PlayerDeepSleepEvent.patch
+++ b/Spigot-Server-Patches/0714-Added-PlayerDeepSleepEvent.patch
diff --git a/Spigot-Server-Patches/0714-More-World-API.patch b/Spigot-Server-Patches/0715-More-World-API.patch
index 3baa468876..3baa468876 100644
--- a/Spigot-Server-Patches/0714-More-World-API.patch
+++ b/Spigot-Server-Patches/0715-More-World-API.patch
diff --git a/Spigot-Server-Patches/0715-Added-PlayerBedFailEnterEvent.patch b/Spigot-Server-Patches/0716-Added-PlayerBedFailEnterEvent.patch
index f74fd8eb88..f74fd8eb88 100644
--- a/Spigot-Server-Patches/0715-Added-PlayerBedFailEnterEvent.patch
+++ b/Spigot-Server-Patches/0716-Added-PlayerBedFailEnterEvent.patch
diff --git a/Spigot-Server-Patches/0716-Implement-methods-to-convert-between-Component-and-B.patch b/Spigot-Server-Patches/0717-Implement-methods-to-convert-between-Component-and-B.patch
index 73865ff763..73865ff763 100644
--- a/Spigot-Server-Patches/0716-Implement-methods-to-convert-between-Component-and-B.patch
+++ b/Spigot-Server-Patches/0717-Implement-methods-to-convert-between-Component-and-B.patch
diff --git a/Spigot-Server-Patches/0717-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch b/Spigot-Server-Patches/0718-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch
index e6c955ba26..e6c955ba26 100644
--- a/Spigot-Server-Patches/0717-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch
+++ b/Spigot-Server-Patches/0718-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch
diff --git a/Spigot-Server-Patches/0718-add-RespawnFlags-to-PlayerRespawnEvent.patch b/Spigot-Server-Patches/0719-add-RespawnFlags-to-PlayerRespawnEvent.patch
index f74833a611..f74833a611 100644
--- a/Spigot-Server-Patches/0718-add-RespawnFlags-to-PlayerRespawnEvent.patch
+++ b/Spigot-Server-Patches/0719-add-RespawnFlags-to-PlayerRespawnEvent.patch
diff --git a/Spigot-Server-Patches/0719-Introduce-beacon-activation-deactivation-events.patch b/Spigot-Server-Patches/0720-Introduce-beacon-activation-deactivation-events.patch
index 4b084a47ec..4b084a47ec 100644
--- a/Spigot-Server-Patches/0719-Introduce-beacon-activation-deactivation-events.patch
+++ b/Spigot-Server-Patches/0720-Introduce-beacon-activation-deactivation-events.patch
diff --git a/Spigot-Server-Patches/0720-Add-Channel-initialization-listeners.patch b/Spigot-Server-Patches/0721-Add-Channel-initialization-listeners.patch
index 0f5e146c08..0f5e146c08 100644
--- a/Spigot-Server-Patches/0720-Add-Channel-initialization-listeners.patch
+++ b/Spigot-Server-Patches/0721-Add-Channel-initialization-listeners.patch
diff --git a/Spigot-Server-Patches/0721-Send-empty-commands-if-tab-completion-is-disabled.patch b/Spigot-Server-Patches/0722-Send-empty-commands-if-tab-completion-is-disabled.patch
index 818cc40fa3..818cc40fa3 100644
--- a/Spigot-Server-Patches/0721-Send-empty-commands-if-tab-completion-is-disabled.patch
+++ b/Spigot-Server-Patches/0722-Send-empty-commands-if-tab-completion-is-disabled.patch
diff --git a/Spigot-Server-Patches/0722-Add-more-WanderingTrader-API.patch b/Spigot-Server-Patches/0723-Add-more-WanderingTrader-API.patch
index 4679f25de7..4679f25de7 100644
--- a/Spigot-Server-Patches/0722-Add-more-WanderingTrader-API.patch
+++ b/Spigot-Server-Patches/0723-Add-more-WanderingTrader-API.patch