From 2affcea55e0a53221f3c12c90adbbf19cb2b7cd8 Mon Sep 17 00:00:00 2001 From: teksturepako <71150936+juraj-hrivnak@users.noreply.github.com> Date: Sun, 17 Sep 2023 13:39:38 +0200 Subject: [PATCH 1/2] Change to `areItemStacksEqual` --- docs/groovyscript/minecraft/tooltip.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/groovyscript/minecraft/tooltip.md b/docs/groovyscript/minecraft/tooltip.md index ad768fd..9e49dff 100644 --- a/docs/groovyscript/minecraft/tooltip.md +++ b/docs/groovyscript/minecraft/tooltip.md @@ -15,7 +15,7 @@ tooltips for multiple items inside the event. You don't need to call listen for import net.minecraftforge.event.entity.player.ItemTooltipEvent event_manager.listen { ItemTooltipEvent event -> - if (ItemStack.areItemsEqual(event.getItemStack(), item('minecraft:diamond'))) { + if (ItemStack.areItemStacksEqual(event.getItemStack(), item('minecraft:diamond'))) { event.getToolTip().add('Epic diamond tooltip') } } From 3fda576cfa6ae8aed01f59afe583d6d008ec26e3 Mon Sep 17 00:00:00 2001 From: teksturepako <71150936+juraj-hrivnak@users.noreply.github.com> Date: Fri, 22 Sep 2023 17:29:51 +0200 Subject: [PATCH 2/2] Change to `ItemHandlerHelper.canItemStacksStack()` --- docs/groovyscript/minecraft/tooltip.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/groovyscript/minecraft/tooltip.md b/docs/groovyscript/minecraft/tooltip.md index 9e49dff..67ff949 100644 --- a/docs/groovyscript/minecraft/tooltip.md +++ b/docs/groovyscript/minecraft/tooltip.md @@ -13,9 +13,10 @@ tooltips for multiple items inside the event. You don't need to call listen for ```groovy import net.minecraftforge.event.entity.player.ItemTooltipEvent + import net.minecraftforge.items.ItemHandlerHelper event_manager.listen { ItemTooltipEvent event -> - if (ItemStack.areItemStacksEqual(event.getItemStack(), item('minecraft:diamond'))) { + if (ItemHandlerHelper.canItemStacksStack(event.getItemStack(), item('minecraft:diamond'))) { event.getToolTip().add('Epic diamond tooltip') } }