Skip to content

Commit cb602ee

Browse files
committed
Assign well-known label to AdButton
1 parent f4e3618 commit cb602ee

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/main/java/gg/essential/partnermod/AdButton.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ public class AdButton extends GuiButton {
5252
public static ResourceLocation TEXTURE_MULTIPLAYER = Resources.load("button_multiplayer.png");
5353
public static ResourceLocation TEXTURE_SINGLEPLAYER = Resources.load("button_singleplayer.png");
5454

55+
// Note: Other mods may rely on this label to identify the button.
56+
private static final String LABEL = "<essential_partner_integration_button>";
5557
private static final int BUTTON_ID = 0xe4c164f1;
5658

5759
private final ResourceLocation texture;
@@ -62,13 +64,13 @@ public class AdButton extends GuiButton {
6264

6365
public AdButton(int x, int y, ResourceLocation texture, Consumer<GuiButton> onPress, String tooltip) {
6466
//#if MC>=11903
65-
//$$ super(x, y, 20, 20, Text.empty(), onPress::accept, ButtonWidget.DEFAULT_NARRATION_SUPPLIER);
67+
//$$ super(x, y, 20, 20, Text.literal(LABEL), onPress::accept, ButtonWidget.DEFAULT_NARRATION_SUPPLIER);
6668
//#elseif MC>=11900
67-
//$$ super(x, y, 20, 20, Text.empty(), onPress::accept);
69+
//$$ super(x, y, 20, 20, Text.literal(LABEL), onPress::accept);
6870
//#elseif MC>=11600
69-
//$$ super(x, y, 20, 20, StringTextComponent.EMPTY, onPress::accept);
71+
//$$ super(x, y, 20, 20, new StringTextComponent(LABEL), onPress::accept);
7072
//#else
71-
super(BUTTON_ID, x, y, 20, 20, "");
73+
super(BUTTON_ID, x, y, 20, 20, LABEL);
7274
//#endif
7375
this.texture = texture;
7476
this.tooltip = tooltip;

0 commit comments

Comments
 (0)