1919@ Mixin (TitleScreen .class )
2020public class MTitleScreen extends Screen {
2121
22+ // Valid positions: "top_left" && "bottom_right".
23+ // DM 8Blits if you would like to have the numbers be in another position, or if you want other texture changes.
24+ private static final String NUM_LOCATION = "top_left" ;
25+
2226 private final Identifier identifier_main = new Identifier (CodeUtilities .MOD_ID + ":textures/gui/df.png" );
23- private final Identifier identifier_beta = new Identifier (CodeUtilities .MOD_ID + ":textures/gui/beta.png" );
24- private final Identifier identifier_node1 = new Identifier (CodeUtilities .MOD_ID + ":textures/gui/node1.png" );
25- private final Identifier identifier_node2 = new Identifier (CodeUtilities .MOD_ID + ":textures/gui/node2.png" );
26- private final Identifier identifier_node3 = new Identifier (CodeUtilities .MOD_ID + ":textures/gui/node3.png" );
27- private final Identifier identifier_node4 = new Identifier (CodeUtilities .MOD_ID + ":textures/gui/node4-valley.png" );
28- private final Identifier identifier_node5 = new Identifier (CodeUtilities .MOD_ID + ":textures/gui/node5.png" );
27+ private final Identifier identifier_beta = new Identifier (CodeUtilities .MOD_ID + ":textures/gui/" + NUM_LOCATION + "/beta.png" );
28+ private final Identifier identifier_node1 = new Identifier (CodeUtilities .MOD_ID + ":textures/gui/" + NUM_LOCATION + "/node1.png" );
29+ private final Identifier identifier_node2 = new Identifier (CodeUtilities .MOD_ID + ":textures/gui/" + NUM_LOCATION + "/node2.png" );
30+ private final Identifier identifier_node3 = new Identifier (CodeUtilities .MOD_ID + ":textures/gui/" + NUM_LOCATION + "/node3.png" );
31+ private final Identifier identifier_node4 = new Identifier (CodeUtilities .MOD_ID + ":textures/gui/" + NUM_LOCATION + "/node4.png" );
32+ private final Identifier identifier_node5 = new Identifier (CodeUtilities .MOD_ID + ":textures/gui/" + NUM_LOCATION + "/node5.png" );
33+ private final Identifier identifier_node6 = new Identifier (CodeUtilities .MOD_ID + ":textures/gui/" + NUM_LOCATION + "/node6.png" );
34+ private final Identifier identifier_node7 = new Identifier (CodeUtilities .MOD_ID + ":textures/gui/" + NUM_LOCATION + "/node7.png" );
2935
3036 protected MTitleScreen (LiteralText title ) {
3137 super (title );
@@ -35,6 +41,7 @@ protected MTitleScreen(LiteralText title) {
3541 public void drawMenuButton (int y , int spacingY , CallbackInfo info ) {
3642 if (Config .getBoolean ("dfButton" )) {
3743 if (!Config .getBoolean ("dfNodeButtons" )) {
44+ // Default Server Join
3845 this .addButton (new BlendableTexturedButtonWidget (this .width / 2 + 104 , y + spacingY , 20 , 20 , 0 , 0 , 20 , identifier_main , 20 , 40 ,
3946 (button ) -> {
4047 MinecraftClient mc = MinecraftClient .getInstance ();
@@ -50,54 +57,77 @@ public void drawMenuButton(int y, int spacingY, CallbackInfo info) {
5057 modMenuButtonPresent = io .github .codeutilities .sys .util .ModMenuSupport .isModsButtonPresent ();
5158 }
5259
60+ // Default Server Join
5361 this .addButton (new BlendableTexturedButtonWidget (this .width / 2 + 104 , y - spacingY , 20 , 20 , 0 , 0 , 20 , identifier_main , 20 , 40 ,
5462 (button ) -> {
5563 MinecraftClient mc = MinecraftClient .getInstance ();
5664 ServerInfo serverInfo = new ServerInfo ("DF" , "mcdiamondfire.com:25565" , false );
5765 mc .openScreen (new ConnectScreen (mc .currentScreen , mc , serverInfo ));
5866 }));
5967
68+ // Node Beta
6069 this .addButton (new BlendableTexturedButtonWidget (this .width / 2 + 104 + 22 , y - spacingY , 20 , 20 , 0 , 0 , 20 , identifier_beta , 20 , 40 ,
6170 (button ) -> {
6271 MinecraftClient mc = MinecraftClient .getInstance ();
6372 ServerInfo serverInfo = new ServerInfo ("DF Beta" , "beta.mcdiamondfire.com:25565" , false );
6473 mc .openScreen (new ConnectScreen (mc .currentScreen , mc , serverInfo ));
6574 }));
6675
67- this .addButton (new BlendableTexturedButtonWidget (this .width / 2 + 104 , y , 20 , 20 , 0 , 0 , 20 , identifier_node1 , 20 , 40 ,
76+ // Node 1
77+ this .addButton (new BlendableTexturedButtonWidget (this .width / 2 + 104 + 44 , y - spacingY , 20 , 20 , 0 , 0 , 20 , identifier_node1 , 20 , 40 ,
6878 (button ) -> {
6979 MinecraftClient mc = MinecraftClient .getInstance ();
7080 ServerInfo serverInfo = new ServerInfo ("DF Node1" , "node1.mcdiamondfire.com:25565" , false );
7181 mc .openScreen (new ConnectScreen (mc .currentScreen , mc , serverInfo ));
7282 }));
7383
74- this .addButton (new BlendableTexturedButtonWidget (this .width / 2 + 104 + 22 , y , 20 , 20 , 0 , 0 , 20 , identifier_node2 , 20 , 40 ,
84+ // Node 2
85+ this .addButton (new BlendableTexturedButtonWidget (this .width / 2 + 104 , y , 20 , 20 , 0 , 0 , 20 , identifier_node2 , 20 , 40 ,
7586 (button ) -> {
7687 MinecraftClient mc = MinecraftClient .getInstance ();
7788 ServerInfo serverInfo = new ServerInfo ("DF Node2" , "node2.mcdiamondfire.com:25565" , false );
7889 mc .openScreen (new ConnectScreen (mc .currentScreen , mc , serverInfo ));
7990 }));
8091
81- this .addButton (new BlendableTexturedButtonWidget (this .width / 2 + 104 , y + spacingY , 20 , 20 , 0 , 0 , 20 , identifier_node3 , 20 , 40 ,
92+ // Node 3
93+ this .addButton (new BlendableTexturedButtonWidget (this .width / 2 + 104 + 22 , y , 20 , 20 , 0 , 0 , 20 , identifier_node3 , 20 , 40 ,
8294 (button ) -> {
8395 MinecraftClient mc = MinecraftClient .getInstance ();
8496 ServerInfo serverInfo = new ServerInfo ("DF Node3" , "node3.mcdiamondfire.com:25565" , false );
8597 mc .openScreen (new ConnectScreen (mc .currentScreen , mc , serverInfo ));
8698 }));
8799
88- this .addButton (new BlendableTexturedButtonWidget (this .width / 2 + 104 + 22 , y + spacingY , 20 , 20 , 0 , 0 , 20 , identifier_node4 , 20 , 40 ,
100+ // Node 4
101+ this .addButton (new BlendableTexturedButtonWidget (this .width / 2 + 104 + 44 , y , 20 , 20 , 0 , 0 , 20 , identifier_node4 , 20 , 40 ,
89102 (button ) -> {
90103 MinecraftClient mc = MinecraftClient .getInstance ();
91104 ServerInfo serverInfo = new ServerInfo ("DF Node4" , "node4.mcdiamondfire.com:25565" , false );
92105 mc .openScreen (new ConnectScreen (mc .currentScreen , mc , serverInfo ));
93106 }));
94107
95- this .addButton (new BlendableTexturedButtonWidget (this .width / 2 + 104 + (modMenuButtonPresent ? 22 : 0 ), y + spacingY + 24 , 20 , 20 , 0 , 0 , 20 , identifier_node5 , 20 , 40 ,
108+ // Node 5
109+ this .addButton (new BlendableTexturedButtonWidget (this .width / 2 + 104 , y + spacingY , 20 , 20 , 0 , 0 , 20 , identifier_node5 , 20 , 40 ,
96110 (button ) -> {
97111 MinecraftClient mc = MinecraftClient .getInstance ();
98112 ServerInfo serverInfo = new ServerInfo ("DF Node5" , "node5.mcdiamondfire.com:25565" , false );
99113 mc .openScreen (new ConnectScreen (mc .currentScreen , mc , serverInfo ));
100114 }));
115+
116+ // Node 6
117+ this .addButton (new BlendableTexturedButtonWidget (this .width / 2 + 104 + 22 , y + spacingY , 20 , 20 , 0 , 0 , 20 , identifier_node6 , 20 , 40 ,
118+ (button ) -> {
119+ MinecraftClient mc = MinecraftClient .getInstance ();
120+ ServerInfo serverInfo = new ServerInfo ("DF Node6" , "node6.mcdiamondfire.com:25565" , false );
121+ mc .openScreen (new ConnectScreen (mc .currentScreen , mc , serverInfo ));
122+ }));
123+
124+ // Node 7
125+ this .addButton (new BlendableTexturedButtonWidget (this .width / 2 + 104 + 44 , y + spacingY , 20 , 20 , 0 , 0 , 20 , identifier_node7 , 20 , 40 ,
126+ (button ) -> {
127+ MinecraftClient mc = MinecraftClient .getInstance ();
128+ ServerInfo serverInfo = new ServerInfo ("DF Node7" , "node7.mcdiamondfire.com:25565" , false );
129+ mc .openScreen (new ConnectScreen (mc .currentScreen , mc , serverInfo ));
130+ }));
101131 }
102132 }
103133
0 commit comments