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 From 3881303e47384cc0b619c9172fcef685f29a56ce Mon Sep 17 00:00:00 2001 From: Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> Date: Fri, 15 Sep 2023 00:18:36 -0400 Subject: Refactor CompactorDeletorPreview and add option --- src/main/resources/assets/skyblocker/lang/en_us.json | 1 + 1 file changed, 1 insertion(+) (limited to 'src/main/resources') diff --git a/src/main/resources/assets/skyblocker/lang/en_us.json b/src/main/resources/assets/skyblocker/lang/en_us.json index ffcb4e81..fb41b7a1 100644 --- a/src/main/resources/assets/skyblocker/lang/en_us.json +++ b/src/main/resources/assets/skyblocker/lang/en_us.json @@ -42,6 +42,7 @@ "text.autoconfig.skyblocker.option.general.quiverWarning.enableQuiverWarningInDungeons": "Enable Quiver Warning In Dungeons", "text.autoconfig.skyblocker.option.general.quiverWarning.enableQuiverWarningAfterDungeon": "Enable Quiver Warning After a Dungeon", "text.autoconfig.skyblocker.option.general.backpackPreviewWithoutShift": "View backpack preview without holding Shift", + "text.autoconfig.skyblocker.option.general.compactorDeletorPreview": "Enable Compactor/Deletor Preview", "text.autoconfig.skyblocker.option.general.tabHud": "Fancy tab HUD", "text.autoconfig.skyblocker.option.general.tabHud.tabHudEnabled": "Enable fancy tab HUD", "text.autoconfig.skyblocker.option.general.tabHud.tabHudScale": "Scale factor of fancy tab HUD", -- cgit