From a7ba4feaaacc95b505b75ec78a169fed66aead93 Mon Sep 17 00:00:00 2001 From: victo Date: Wed, 13 Sep 2023 20:16:32 +0200 Subject: Add tooltip display for personal compactor items This update integrates a tooltip display for personal compactor items in the Skyblocker mod. The tooltip shows the contents of the personal compactor when hovered over. This is useful for players to quickly check the contents of their compactor without needing to open it. The commit includes creating a new Java file 'CompactorPreviewTooltipComponent.java' for the compactor tooltip component, adding new inject method 'skyblocker$addTooltipComponent' in 'HandledScreenMixin.java' executed when drawing mouseover tooltip, adding 'DrawContextInvoker.java' for invoking the 'drawTooltip' method in the 'DrawContext' class, and adding 'getItemStack' method in the 'ItemRegistry.java'. --- src/main/resources/skyblocker.mixins.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/resources') diff --git a/src/main/resources/skyblocker.mixins.json b/src/main/resources/skyblocker.mixins.json index 9d2ce7c2..d257d989 100644 --- a/src/main/resources/skyblocker.mixins.json +++ b/src/main/resources/skyblocker.mixins.json @@ -29,7 +29,8 @@ "accessor.PlayerListHudAccessor", "accessor.RecipeBookWidgetAccessor", "accessor.ScreenAccessor", - "accessor.WorldRendererAccessor" + "accessor.WorldRendererAccessor", + "accessor.DrawContextInvoker" ], "injectors": { "defaultRequire": 1 -- cgit