Push next version of WMD

This commit is contained in:
Zontreck 2022-10-12 23:50:06 -07:00
parent 689485e337
commit b8a065590c
10 changed files with 427 additions and 6 deletions

View file

@ -2,7 +2,10 @@ package dev.zontreck.mcmods;
import com.mojang.logging.LogUtils;
import dev.zontreck.libzontreck.chat.ChatColorFactory;
import dev.zontreck.libzontreck.chat.ChatColor.ColorOptions;
import dev.zontreck.mcmods.configs.WMDClientConfig;
import dev.zontreck.mcmods.gui.HeartsRenderer;
import net.minecraft.client.Minecraft;
import net.minecraft.client.User;
import net.minecraftforge.common.MinecraftForge;
@ -34,17 +37,21 @@ public class WatchMyDurability
public static User CurrentUser = null; // This is initialized by the client
public static boolean isInGame = false; // This locks the timer thread
public static ItemRegistry REGISTRY;
public static Health LastHealth;
public static String WMDPrefix;
public WatchMyDurability()
{
WMDPrefix = ChatColorFactory.MakeBuilder().set(ColorOptions.Dark_Gray).toString() + "[" + ChatColorFactory.MakeBuilder().set(ColorOptions.Dark_Green) + "WMD" + ChatColorFactory.MakeBuilder().set(ColorOptions.Dark_Gray) + "]";
IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
// Register the commonSetup method for modloading
modEventBus.addListener(this::commonSetup);
ModLoadingContext.get().registerConfig(Type.CLIENT, WMDClientConfig.SPEC, "watchmydurability-client.toml");
MinecraftForge.EVENT_BUS.register(new HeartsRenderer());
// Register ourselves for server and other game events we are interested in
MinecraftForge.EVENT_BUS.register(this);
}