diff --git a/common/src/main/java/dev/ftb/mods/ftbquests/client/FTBQuestsClientEventHandler.java b/common/src/main/java/dev/ftb/mods/ftbquests/client/FTBQuestsClientEventHandler.java index e5ac1ece6..e6992c9ed 100644 --- a/common/src/main/java/dev/ftb/mods/ftbquests/client/FTBQuestsClientEventHandler.java +++ b/common/src/main/java/dev/ftb/mods/ftbquests/client/FTBQuestsClientEventHandler.java @@ -10,6 +10,7 @@ import dev.architectury.networking.NetworkManager; import dev.architectury.registry.client.rendering.BlockEntityRendererRegistry; import dev.architectury.registry.client.rendering.ColorHandlerRegistry; +import dev.ftb.mods.ftblibrary.api.sidebar.ButtonOverlayRender; import dev.ftb.mods.ftblibrary.icon.Color4I; import dev.ftb.mods.ftblibrary.sidebar.SidebarButtonCreatedEvent; import dev.ftb.mods.ftblibrary.ui.CustomClickEvent; @@ -117,7 +118,7 @@ private void registerItemColors(Minecraft minecraft) { private void onSidebarButtonCreated(SidebarButtonCreatedEvent event) { if (event.getButton().getId().equals(QUESTS_BUTTON)) { - event.getButton().setCustomTextHandler(() -> + event.getButton().addOverlayRender(ButtonOverlayRender.ofSimpleString(() -> { if (ClientQuestFile.exists()) { if (ClientQuestFile.INSTANCE.isDisableGui() && !ClientQuestFile.INSTANCE.canEdit()) { @@ -130,7 +131,7 @@ private void onSidebarButtonCreated(SidebarButtonCreatedEvent event) { } return ""; - }); + })); } } diff --git a/common/src/main/resources/assets/ftbquests/sidebar_buttons.json b/common/src/main/resources/assets/ftbquests/sidebar_buttons.json deleted file mode 100644 index 4a24ee380..000000000 --- a/common/src/main/resources/assets/ftbquests/sidebar_buttons.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "quests": { - "group": "ftblibrary:info", - "icon": "ftbquests:item/book", - "x": 610, - "click": "ftbquests:open_gui", - "required_server_mods": [ - "ftbquests" - ], - "custom_text": true - } -} \ No newline at end of file diff --git a/common/src/main/resources/assets/ftbquests/sidebar_buttons/quests.json b/common/src/main/resources/assets/ftbquests/sidebar_buttons/quests.json new file mode 100644 index 000000000..f3cc13f3b --- /dev/null +++ b/common/src/main/resources/assets/ftbquests/sidebar_buttons/quests.json @@ -0,0 +1,10 @@ +{ + "icon": "ftbquests:item/book", + "sort_index": 575, + "click": [ + "ftbquests:open_gui" + ], + "required_server_mods": [ + "ftbquests" + ] +} \ No newline at end of file