11package dsns .betterhud ;
22
3+ import dsns .betterhud .mods .*;
4+ import dsns .betterhud .util .BaseMod ;
5+ import java .util .ArrayList ;
6+ import java .util .Arrays ;
37import net .fabricmc .api .ClientModInitializer ;
48import net .fabricmc .api .EnvType ;
59import net .fabricmc .api .Environment ;
610import net .fabricmc .fabric .api .client .event .lifecycle .v1 .ClientTickEvents ;
711import net .fabricmc .fabric .api .client .rendering .v1 .hud .HudElementRegistry ;
812import net .minecraft .util .Identifier ;
9-
1013import org .slf4j .Logger ;
1114import org .slf4j .LoggerFactory ;
1215
1316@ Environment (EnvType .CLIENT )
1417public class BetterHUD implements ClientModInitializer {
15- // This logger is used to write text to the console and the log file.
16- // It is considered best practice to use your mod id as the logger's name.
17- // That way, it's clear which mod wrote info, warnings, and errors.
18- public static final Logger LOGGER = LoggerFactory .getLogger ("betterhud" );
1918
20- @ Override
21- public void onInitializeClient () {
22- Config .configure ();
19+ // This logger is used to write text to the console and the log file.
20+ // It is considered best practice to use your mod id as the logger's name.
21+ // That way, it's clear which mod wrote info, warnings, and errors.
22+ public static final Logger LOGGER = LoggerFactory .getLogger ("betterhud" );
23+
24+ public static ArrayList <BaseMod > mods = new ArrayList <>(
25+ Arrays .asList (
26+ new FPS (),
27+ new Ping (),
28+ new Momentum (),
29+ new Coordinates (),
30+ new Biome (),
31+ new Facing (),
32+ new Time ()
33+ )
34+ );
35+
36+ @ Override
37+ public void onInitializeClient () {
38+ Config .configure ();
39+
40+ BetterHUDGUI betterHUDGUI = new BetterHUDGUI ();
2341
24- BetterHUDGUI betterHUDGUI = new BetterHUDGUI ();
25- HudElementRegistry .addLast (Identifier .of ("betterhud" , "hud" ), betterHUDGUI ::onHudRender );
26- ClientTickEvents .START_CLIENT_TICK .register (betterHUDGUI );
27- }
28- }
42+ HudElementRegistry .addLast (
43+ Identifier .of ("betterhud" , "hud" ),
44+ betterHUDGUI ::onHudRender
45+ );
46+ ClientTickEvents .START_CLIENT_TICK .register (betterHUDGUI );
47+ }
48+ }
0 commit comments