compile fixes
This commit is contained in:
@@ -21,12 +21,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ if (item == null) {
|
||||
+ throw new IllegalArgumentException(material + " is not an item, and rarity does not apply to blocks");
|
||||
+ }
|
||||
+ return io.papermc.paper.inventory.ItemRarity.values()[item.rarity.ordinal()];
|
||||
+ return io.papermc.paper.inventory.ItemRarity.values()[item.components().getOrDefault(net.minecraft.core.component.DataComponents.RARITY, net.minecraft.world.item.Rarity.COMMON).ordinal()];
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public io.papermc.paper.inventory.ItemRarity getItemStackRarity(org.bukkit.inventory.ItemStack itemStack) {
|
||||
+ return io.papermc.paper.inventory.ItemRarity.values()[getItem(itemStack.getType()).getRarity(CraftItemStack.asNMSCopy(itemStack)).ordinal()];
|
||||
+ return io.papermc.paper.inventory.ItemRarity.values()[itemStack.getRarity().ordinal()];
|
||||
+ }
|
||||
// Paper end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user