mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-16 04:33:56 -07:00
fix some issues on the todo list
This commit is contained in:
@@ -143,7 +143,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ static Codec<HoverEvent.ShowItem> showItemCodec(final Codec<Component> componentCodec) {
|
||||
+ return net.minecraft.network.chat.HoverEvent.ItemStackInfo.CODEC.xmap(isi -> {
|
||||
+ @Subst("key") final String typeKey = isi.item.unwrapKey().orElseThrow().toString();
|
||||
+ @Subst("key") final String typeKey = isi.item.unwrapKey().orElseThrow().location().toString();
|
||||
+ return HoverEvent.ShowItem.showItem(Key.key(typeKey), isi.count, PaperAdventure.asAdventure(isi.getItemStack().getComponentsPatch()));
|
||||
+ }, si -> {
|
||||
+ final Item itemType = BuiltInRegistries.ITEM.get(PaperAdventure.asVanilla(si.item()));
|
||||
|
Reference in New Issue
Block a user