mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
drop two config options in favor of PurpurExtras impl
dropped options: - `mobs.snow_golem.drop-pumpkin-when-sheared` - `mobs.sheep.jeb-shear-random-color`
This commit is contained in:
28
patches/server/0304-Add-hover-lines-API.patch
Normal file
28
patches/server/0304-Add-hover-lines-API.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Meln Cat <melncatuwu@gmail.com>
|
||||
Date: Mon, 2 Oct 2023 17:42:26 -0700
|
||||
Subject: [PATCH] Add hover lines API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
index c77634ec9c4e7a9eaacc81de7f95e9452b393a52..181a57cc22845d83f99b22b6c14cadd6cd3eeb36 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
@@ -602,4 +602,17 @@ public final class CraftItemFactory implements ItemFactory {
|
||||
return CraftItemStack.asCraftMirror(enchanted);
|
||||
}
|
||||
// Paper end - enchantWithLevels API
|
||||
+
|
||||
+ // Purpur start
|
||||
+ @Override
|
||||
+ public @org.jetbrains.annotations.NotNull java.util.List<net.kyori.adventure.text.@org.jetbrains.annotations.NotNull Component> getHoverLines(@org.jetbrains.annotations.NotNull ItemStack itemStack, boolean advanced) {
|
||||
+ return io.papermc.paper.adventure.PaperAdventure.asAdventure(
|
||||
+ CraftItemStack.asNMSCopy(itemStack).getTooltipLines(
|
||||
+ null,
|
||||
+ advanced ? net.minecraft.world.item.TooltipFlag.ADVANCED
|
||||
+ : net.minecraft.world.item.TooltipFlag.NORMAL
|
||||
+ )
|
||||
+ );
|
||||
+ }
|
||||
+ // Purpur end
|
||||
}
|
||||
Reference in New Issue
Block a user