diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/DynamicHUD.java b/src/main/java/com/tanishisherewith/dynamichud/DynamicHUD.java similarity index 92% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/DynamicHUD.java rename to src/main/java/com/tanishisherewith/dynamichud/DynamicHUD.java index b3bb2cd..84166ea 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/DynamicHUD.java +++ b/src/main/java/com/tanishisherewith/dynamichud/DynamicHUD.java @@ -1,11 +1,11 @@ -package com.tanishisherewith.dynamichud.newTrial; - -import com.tanishisherewith.dynamichud.newTrial.config.GlobalConfig; -import com.tanishisherewith.dynamichud.newTrial.screens.AbstractMoveableScreen; -import com.tanishisherewith.dynamichud.newTrial.widget.Widget; -import com.tanishisherewith.dynamichud.newTrial.widget.WidgetManager; -import com.tanishisherewith.dynamichud.newTrial.widget.WidgetRenderer; -import com.tanishisherewith.dynamichud.newTrial.widgets.TextWidget; +package com.tanishisherewith.dynamichud; + +import com.tanishisherewith.dynamichud.config.GlobalConfig; +import com.tanishisherewith.dynamichud.screens.AbstractMoveableScreen; +import com.tanishisherewith.dynamichud.widget.Widget; +import com.tanishisherewith.dynamichud.widget.WidgetManager; +import com.tanishisherewith.dynamichud.widget.WidgetRenderer; +import com.tanishisherewith.dynamichud.widgets.TextWidget; import net.fabricmc.api.ClientModInitializer; import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents; import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents; @@ -144,7 +144,7 @@ public void onInitializeClient() { ServerPlayConnectionEvents.DISCONNECT.register((handler, packetSender) -> saveWidgetsSafely(widgetsFile, FILE_MAP.get(widgetsFile.getName()))); //When minecraft closes - ClientLifecycleEvents.CLIENT_STOPPING.register((minecraftClient)->saveWidgetsSafely(widgetsFile,FILE_MAP.get(widgetsFile.getName()))); + ClientLifecycleEvents.CLIENT_STOPPING.register((minecraftClient) -> saveWidgetsSafely(widgetsFile, FILE_MAP.get(widgetsFile.getName()))); printInfo(String.format("Integration of mod %s was successful", modId)); } catch (Throwable e) { @@ -159,7 +159,7 @@ public void onInitializeClient() { ServerLifecycleEvents.SERVER_STOPPING.register(server -> GlobalConfig.HANDLER.save()); ServerLifecycleEvents.END_DATA_PACK_RELOAD.register((server, resourceManager, s) -> GlobalConfig.HANDLER.save()); ServerPlayConnectionEvents.DISCONNECT.register((handler, packetSender) -> GlobalConfig.HANDLER.save()); - ClientLifecycleEvents.CLIENT_STOPPING.register((minecraftClient)->GlobalConfig.HANDLER.save()); + ClientLifecycleEvents.CLIENT_STOPPING.register((minecraftClient) -> GlobalConfig.HANDLER.save()); HudRenderCallback.EVENT.register(new HudRender()); diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/DynamicHudIntegration.java b/src/main/java/com/tanishisherewith/dynamichud/DynamicHudIntegration.java similarity index 88% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/DynamicHudIntegration.java rename to src/main/java/com/tanishisherewith/dynamichud/DynamicHudIntegration.java index e28a507..d8959f7 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/DynamicHudIntegration.java +++ b/src/main/java/com/tanishisherewith/dynamichud/DynamicHudIntegration.java @@ -1,9 +1,9 @@ -package com.tanishisherewith.dynamichud.newTrial; +package com.tanishisherewith.dynamichud; -import com.tanishisherewith.dynamichud.newTrial.screens.AbstractMoveableScreen; -import com.tanishisherewith.dynamichud.newTrial.widget.WidgetData; -import com.tanishisherewith.dynamichud.newTrial.widget.WidgetManager; -import com.tanishisherewith.dynamichud.newTrial.widget.WidgetRenderer; +import com.tanishisherewith.dynamichud.screens.AbstractMoveableScreen; +import com.tanishisherewith.dynamichud.widget.WidgetData; +import com.tanishisherewith.dynamichud.widget.WidgetManager; +import com.tanishisherewith.dynamichud.widget.WidgetRenderer; import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper; import net.fabricmc.loader.api.FabricLoader; import net.minecraft.client.option.KeyBinding; @@ -64,7 +64,7 @@ public interface DynamicHudIntegration { /** * Initializes the DynamicHud integration. *

- * Suggested to be used to initialize {@link com.tanishisherewith.dynamichud.newTrial.utils.DynamicValueRegistry} and widgets with their respective values + * Suggested to be used to initialize {@link com.tanishisherewith.dynamichud.utils.DynamicValueRegistry} and widgets with their respective values *

*/ void init(); diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/DynamicHudTest.java b/src/main/java/com/tanishisherewith/dynamichud/DynamicHudTest.java similarity index 82% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/DynamicHudTest.java rename to src/main/java/com/tanishisherewith/dynamichud/DynamicHudTest.java index fd888c5..cc256c6 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/DynamicHudTest.java +++ b/src/main/java/com/tanishisherewith/dynamichud/DynamicHudTest.java @@ -1,11 +1,11 @@ -package com.tanishisherewith.dynamichud.newTrial; +package com.tanishisherewith.dynamichud; -import com.tanishisherewith.dynamichud.newTrial.screens.AbstractMoveableScreen; -import com.tanishisherewith.dynamichud.newTrial.utils.DynamicValueRegistry; -import com.tanishisherewith.dynamichud.newTrial.widget.Widget; -import com.tanishisherewith.dynamichud.newTrial.widget.WidgetManager; -import com.tanishisherewith.dynamichud.newTrial.widget.WidgetRenderer; -import com.tanishisherewith.dynamichud.newTrial.widgets.TextWidget; +import com.tanishisherewith.dynamichud.screens.AbstractMoveableScreen; +import com.tanishisherewith.dynamichud.utils.DynamicValueRegistry; +import com.tanishisherewith.dynamichud.widget.Widget; +import com.tanishisherewith.dynamichud.widget.WidgetManager; +import com.tanishisherewith.dynamichud.widget.WidgetRenderer; +import com.tanishisherewith.dynamichud.widgets.TextWidget; import net.minecraft.client.gui.screen.TitleScreen; import net.minecraft.client.gui.screen.multiplayer.MultiplayerScreen; import net.minecraft.text.Text; diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/HudRender.java b/src/main/java/com/tanishisherewith/dynamichud/HudRender.java similarity index 83% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/HudRender.java rename to src/main/java/com/tanishisherewith/dynamichud/HudRender.java index 2a80dc3..b4e301e 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/HudRender.java +++ b/src/main/java/com/tanishisherewith/dynamichud/HudRender.java @@ -1,6 +1,6 @@ -package com.tanishisherewith.dynamichud.newTrial; +package com.tanishisherewith.dynamichud; -import com.tanishisherewith.dynamichud.newTrial.widget.WidgetRenderer; +import com.tanishisherewith.dynamichud.widget.WidgetRenderer; import net.fabricmc.fabric.api.client.rendering.v1.HudRenderCallback; import net.minecraft.client.gui.DrawContext; diff --git a/src/main/java/com/tanishisherewith/dynamichud/ModMenuIntegration.java b/src/main/java/com/tanishisherewith/dynamichud/ModMenuIntegration.java index c9aec49..30fffb4 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/ModMenuIntegration.java +++ b/src/main/java/com/tanishisherewith/dynamichud/ModMenuIntegration.java @@ -1,6 +1,6 @@ package com.tanishisherewith.dynamichud; -import com.tanishisherewith.dynamichud.newTrial.config.GlobalConfig; +import com.tanishisherewith.dynamichud.config.GlobalConfig; import com.terraformersmc.modmenu.api.ConfigScreenFactory; import com.terraformersmc.modmenu.api.ModMenuApi; import net.minecraft.client.gui.screen.Screen; @@ -8,6 +8,7 @@ public class ModMenuIntegration implements ModMenuApi { public static Screen YACL_CONFIG_SCREEN = GlobalConfig.get().createYACLGUI(); + @Override public ConfigScreenFactory getModConfigScreenFactory() { return parent -> YACL_CONFIG_SCREEN; diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/config/GlobalConfig.java b/src/main/java/com/tanishisherewith/dynamichud/config/GlobalConfig.java similarity index 97% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/config/GlobalConfig.java rename to src/main/java/com/tanishisherewith/dynamichud/config/GlobalConfig.java index 4ce8478..0fd6e0a 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/config/GlobalConfig.java +++ b/src/main/java/com/tanishisherewith/dynamichud/config/GlobalConfig.java @@ -1,4 +1,4 @@ -package com.tanishisherewith.dynamichud.newTrial.config; +package com.tanishisherewith.dynamichud.config; import dev.isxander.yacl3.api.*; import dev.isxander.yacl3.api.controller.FloatSliderControllerBuilder; diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/helpers/ColorHelper.java b/src/main/java/com/tanishisherewith/dynamichud/helpers/ColorHelper.java similarity index 98% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/helpers/ColorHelper.java rename to src/main/java/com/tanishisherewith/dynamichud/helpers/ColorHelper.java index 7426687..b119142 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/helpers/ColorHelper.java +++ b/src/main/java/com/tanishisherewith/dynamichud/helpers/ColorHelper.java @@ -1,4 +1,4 @@ -package com.tanishisherewith.dynamichud.newTrial.helpers; +package com.tanishisherewith.dynamichud.helpers; import net.minecraft.util.math.MathHelper; diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/helpers/DrawHelper.java b/src/main/java/com/tanishisherewith/dynamichud/helpers/DrawHelper.java similarity index 99% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/helpers/DrawHelper.java rename to src/main/java/com/tanishisherewith/dynamichud/helpers/DrawHelper.java index ab6b5b0..3794f06 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/helpers/DrawHelper.java +++ b/src/main/java/com/tanishisherewith/dynamichud/helpers/DrawHelper.java @@ -1,8 +1,8 @@ -package com.tanishisherewith.dynamichud.newTrial.helpers; +package com.tanishisherewith.dynamichud.helpers; import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.systems.RenderSystem; -import com.tanishisherewith.dynamichud.newTrial.DynamicHUD; +import com.tanishisherewith.dynamichud.DynamicHUD; import net.minecraft.client.gui.DrawContext; import net.minecraft.client.render.*; import net.minecraft.client.util.math.MatrixStack; diff --git a/src/main/java/com/tanishisherewith/dynamichud/mixins/ScreenMixin.java b/src/main/java/com/tanishisherewith/dynamichud/mixins/ScreenMixin.java index 226f3ad..1ce36e5 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/mixins/ScreenMixin.java +++ b/src/main/java/com/tanishisherewith/dynamichud/mixins/ScreenMixin.java @@ -1,8 +1,8 @@ package com.tanishisherewith.dynamichud.mixins; -import com.tanishisherewith.dynamichud.newTrial.DynamicHUD; -import com.tanishisherewith.dynamichud.newTrial.widget.WidgetManager; -import com.tanishisherewith.dynamichud.newTrial.widget.WidgetRenderer; +import com.tanishisherewith.dynamichud.DynamicHUD; +import com.tanishisherewith.dynamichud.widget.WidgetManager; +import com.tanishisherewith.dynamichud.widget.WidgetRenderer; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.DrawContext; import net.minecraft.client.gui.screen.Screen; @@ -14,23 +14,27 @@ @Mixin(Screen.class) public abstract class ScreenMixin { - @Shadow public int width; + @Shadow + public int width; - @Shadow public int height; + @Shadow + public int height; @Inject(at = @At("TAIL"), method = "render") private void render(DrawContext context, int mouseX, int mouseY, float delta, CallbackInfo ci) { - for(WidgetRenderer widgetRenderer: DynamicHUD.getWidgetRenderers()){ - widgetRenderer.renderWidgets(context,mouseX,mouseY); + for (WidgetRenderer widgetRenderer : DynamicHUD.getWidgetRenderers()) { + widgetRenderer.renderWidgets(context, mouseX, mouseY); } } + @Inject(at = @At("HEAD"), method = "resize") - private void onScreenResize(MinecraftClient client,int width, int height, CallbackInfo ci) { - WidgetManager.onScreenResized(width,height,this.width,this.height); + private void onScreenResize(MinecraftClient client, int width, int height, CallbackInfo ci) { + WidgetManager.onScreenResized(width, height, this.width, this.height); } + @Inject(at = @At("HEAD"), method = "close") private void onClose(CallbackInfo ci) { - for(WidgetRenderer widgetRenderer: DynamicHUD.getWidgetRenderers()){ + for (WidgetRenderer widgetRenderer : DynamicHUD.getWidgetRenderers()) { widgetRenderer.onCloseScreen(); } } diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/screens/AbstractMoveableScreen.java b/src/main/java/com/tanishisherewith/dynamichud/screens/AbstractMoveableScreen.java similarity index 96% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/screens/AbstractMoveableScreen.java rename to src/main/java/com/tanishisherewith/dynamichud/screens/AbstractMoveableScreen.java index 313823a..f1bcfe7 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/screens/AbstractMoveableScreen.java +++ b/src/main/java/com/tanishisherewith/dynamichud/screens/AbstractMoveableScreen.java @@ -1,6 +1,6 @@ -package com.tanishisherewith.dynamichud.newTrial.screens; +package com.tanishisherewith.dynamichud.screens; -import com.tanishisherewith.dynamichud.newTrial.widget.WidgetRenderer; +import com.tanishisherewith.dynamichud.widget.WidgetRenderer; import net.minecraft.client.gui.DrawContext; import net.minecraft.client.gui.screen.Screen; import net.minecraft.text.Text; diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/DynamicValueRegistry.java b/src/main/java/com/tanishisherewith/dynamichud/utils/DynamicValueRegistry.java similarity index 98% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/DynamicValueRegistry.java rename to src/main/java/com/tanishisherewith/dynamichud/utils/DynamicValueRegistry.java index 6eee0ba..f3c8390 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/DynamicValueRegistry.java +++ b/src/main/java/com/tanishisherewith/dynamichud/utils/DynamicValueRegistry.java @@ -1,4 +1,4 @@ -package com.tanishisherewith.dynamichud.newTrial.utils; +package com.tanishisherewith.dynamichud.utils; import java.util.ArrayList; import java.util.HashMap; diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/System.java b/src/main/java/com/tanishisherewith/dynamichud/utils/System.java similarity index 91% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/System.java rename to src/main/java/com/tanishisherewith/dynamichud/utils/System.java index f741907..3cbc6a0 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/System.java +++ b/src/main/java/com/tanishisherewith/dynamichud/utils/System.java @@ -1,4 +1,4 @@ -package com.tanishisherewith.dynamichud.newTrial.utils; +package com.tanishisherewith.dynamichud.utils; import java.util.List; import java.util.Map; diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/UID.java b/src/main/java/com/tanishisherewith/dynamichud/utils/UID.java similarity index 93% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/UID.java rename to src/main/java/com/tanishisherewith/dynamichud/utils/UID.java index cbe721b..6a1735f 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/UID.java +++ b/src/main/java/com/tanishisherewith/dynamichud/utils/UID.java @@ -1,4 +1,4 @@ -package com.tanishisherewith.dynamichud.newTrial.utils; +package com.tanishisherewith.dynamichud.utils; import java.util.Random; diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/Util.java b/src/main/java/com/tanishisherewith/dynamichud/utils/Util.java similarity index 86% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/Util.java rename to src/main/java/com/tanishisherewith/dynamichud/utils/Util.java index d1e04c4..b7f2ccc 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/Util.java +++ b/src/main/java/com/tanishisherewith/dynamichud/utils/Util.java @@ -1,6 +1,6 @@ -package com.tanishisherewith.dynamichud.newTrial.utils; +package com.tanishisherewith.dynamichud.utils; -import com.tanishisherewith.dynamichud.newTrial.DynamicHUD; +import com.tanishisherewith.dynamichud.DynamicHUD; public class Util { public static Quadrant getQuadrant(int x, int y) { diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/ContextMenu.java b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/ContextMenu.java similarity index 95% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/ContextMenu.java rename to src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/ContextMenu.java index 2750069..6de1633 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/ContextMenu.java +++ b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/ContextMenu.java @@ -1,6 +1,6 @@ -package com.tanishisherewith.dynamichud.newTrial.utils.contextmenu; +package com.tanishisherewith.dynamichud.utils.contextmenu; -import com.tanishisherewith.dynamichud.newTrial.helpers.DrawHelper; +import com.tanishisherewith.dynamichud.helpers.DrawHelper; import net.minecraft.client.gui.DrawContext; import java.awt.*; @@ -46,7 +46,7 @@ public void render(DrawContext drawContext, int x, int y, int height) { int yOffset = y1 + 3; this.width = 10; for (Option option : options) { - if(!option.shouldRender())continue; + if (!option.shouldRender()) continue; option.render(drawContext, x + 2, yOffset); this.width = Math.max(this.width, option.width + padding); yOffset += option.height + 1; diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/Option.java b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/Option.java similarity index 86% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/Option.java rename to src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/Option.java index 4f2e080..7d1831d 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/Option.java +++ b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/Option.java @@ -1,6 +1,6 @@ -package com.tanishisherewith.dynamichud.newTrial.utils.contextmenu; +package com.tanishisherewith.dynamichud.utils.contextmenu; -import com.tanishisherewith.dynamichud.newTrial.widget.Widget; +import com.tanishisherewith.dynamichud.widget.Widget; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.DrawContext; @@ -12,13 +12,13 @@ public abstract class Option { public int width = 0; public int height = 0; public T value = null; + public Supplier shouldRender = () -> true; protected float scale = 0.0f; protected Supplier getter; protected Consumer setter; protected T defaultValue = null; protected MinecraftClient mc = MinecraftClient.getInstance(); private Widget selectedWidget; // The widget that this context menu is associated with - public Supplier shouldRender = ()->true; public Option(Supplier getter, Consumer setter) { this.getter = getter; @@ -26,7 +26,8 @@ public Option(Supplier getter, Consumer setter) { value = get(); defaultValue = get(); } - public Option(Supplier getter, Consumer setter,Supplier shouldRender) { + + public Option(Supplier getter, Consumer setter, Supplier shouldRender) { this.getter = getter; this.setter = setter; this.shouldRender = shouldRender; @@ -77,7 +78,7 @@ public Option setShouldRender(Supplier shouldRender) { return this; } - public boolean shouldRender(){ + public boolean shouldRender() { return shouldRender.get(); } } diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/BooleanOption.java b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/BooleanOption.java similarity index 88% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/BooleanOption.java rename to src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/BooleanOption.java index bc23270..5b32b6b 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/BooleanOption.java +++ b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/BooleanOption.java @@ -1,6 +1,6 @@ -package com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.options; +package com.tanishisherewith.dynamichud.utils.contextmenu.options; -import com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.Option; +import com.tanishisherewith.dynamichud.utils.contextmenu.Option; import net.minecraft.client.gui.DrawContext; import net.minecraft.text.Text; diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/DoubleOption.java b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/DoubleOption.java similarity index 94% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/DoubleOption.java rename to src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/DoubleOption.java index 05a6319..399a10c 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/DoubleOption.java +++ b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/DoubleOption.java @@ -1,7 +1,7 @@ -package com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.options; +package com.tanishisherewith.dynamichud.utils.contextmenu.options; -import com.tanishisherewith.dynamichud.newTrial.helpers.DrawHelper; -import com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.Option; +import com.tanishisherewith.dynamichud.helpers.DrawHelper; +import com.tanishisherewith.dynamichud.utils.contextmenu.Option; import net.minecraft.client.font.TextRenderer; import net.minecraft.client.gui.DrawContext; import org.apache.commons.lang3.Validate; diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/EnumOption.java b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/EnumOption.java similarity index 93% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/EnumOption.java rename to src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/EnumOption.java index 5cd0725..1351d17 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/EnumOption.java +++ b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/EnumOption.java @@ -1,6 +1,6 @@ -package com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.options; +package com.tanishisherewith.dynamichud.utils.contextmenu.options; -import com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.Option; +import com.tanishisherewith.dynamichud.utils.contextmenu.Option; import net.minecraft.client.gui.DrawContext; import net.minecraft.text.Text; diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/ListOption.java b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/ListOption.java similarity index 93% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/ListOption.java rename to src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/ListOption.java index 3622dd3..e7d63bb 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/ListOption.java +++ b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/ListOption.java @@ -1,6 +1,6 @@ -package com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.options; +package com.tanishisherewith.dynamichud.utils.contextmenu.options; -import com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.Option; +import com.tanishisherewith.dynamichud.utils.contextmenu.Option; import net.minecraft.client.gui.DrawContext; import net.minecraft.text.Text; diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/RunnableOption.java b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/RunnableOption.java similarity index 91% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/RunnableOption.java rename to src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/RunnableOption.java index 43d230e..6b8c4f5 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/RunnableOption.java +++ b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/RunnableOption.java @@ -1,6 +1,6 @@ -package com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.options; +package com.tanishisherewith.dynamichud.utils.contextmenu.options; -import com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.Option; +import com.tanishisherewith.dynamichud.utils.contextmenu.Option; import net.minecraft.client.gui.DrawContext; import net.minecraft.text.Text; @@ -9,8 +9,8 @@ import java.util.function.Supplier; public class RunnableOption extends Option { - public String name = "Empty"; private final Runnable task; + public String name = "Empty"; /** * Runnable option which runs a task when clicked on it. diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/SubMenuOption.java b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/SubMenuOption.java similarity index 79% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/SubMenuOption.java rename to src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/SubMenuOption.java index 9bc04e9..7546c4a 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/SubMenuOption.java +++ b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/SubMenuOption.java @@ -1,7 +1,7 @@ -package com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.options; +package com.tanishisherewith.dynamichud.utils.contextmenu.options; -import com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.ContextMenu; -import com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.Option; +import com.tanishisherewith.dynamichud.utils.contextmenu.ContextMenu; +import com.tanishisherewith.dynamichud.utils.contextmenu.Option; import net.minecraft.client.gui.DrawContext; import net.minecraft.text.Text; import org.jetbrains.annotations.NotNull; @@ -14,9 +14,9 @@ /** * SubMenu option displays a sub menu beside a boolean-like button. *

- * The {@link #getter} gets a boolean value to display/close the subMenu by default. + * The {@link #getter} gets a boolean value to display/close the subMenu by default. *

- * The {@link #setter} returns a boolean value depending on if the subMenu is visible or not + * The {@link #setter} returns a boolean value depending on if the subMenu is visible or not */ public class SubMenuOption extends Option { private final ContextMenu subMenu; @@ -26,10 +26,10 @@ public class SubMenuOption extends Option { public SubMenuOption(String name, @NotNull ContextMenu parentMenu, Supplier getter, Consumer setter) { super(getter, setter); - Objects.requireNonNull(parentMenu,"Parent Menu cannot be null"); + Objects.requireNonNull(parentMenu, "Parent Menu cannot be null"); this.name = name; this.parentMenu = parentMenu; - this.subMenu = new ContextMenu(parentMenu.x + parentMenu.width,this.y); + this.subMenu = new ContextMenu(parentMenu.x + parentMenu.width, this.y); this.subMenu.heightOffset = 0; this.subMenu.shouldDisplay = get(); } @@ -67,7 +67,7 @@ public boolean mouseDragged(double mouseX, double mouseY, int button) { return super.mouseDragged(mouseX, mouseY, button); } - public SubMenuOption getOption(){ + public SubMenuOption getOption() { return this; } diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/coloroption/AlphaSlider.java b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/coloroption/AlphaSlider.java similarity index 91% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/coloroption/AlphaSlider.java rename to src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/coloroption/AlphaSlider.java index b85fbea..bd78b6f 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/coloroption/AlphaSlider.java +++ b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/coloroption/AlphaSlider.java @@ -1,7 +1,7 @@ -package com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.options.coloroption; +package com.tanishisherewith.dynamichud.utils.contextmenu.options.coloroption; -import com.tanishisherewith.dynamichud.newTrial.helpers.ColorHelper; -import com.tanishisherewith.dynamichud.newTrial.helpers.DrawHelper; +import com.tanishisherewith.dynamichud.helpers.ColorHelper; +import com.tanishisherewith.dynamichud.helpers.DrawHelper; import net.minecraft.client.gui.DrawContext; import java.awt.*; diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/coloroption/ColorGradientPicker.java b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/coloroption/ColorGradientPicker.java similarity index 97% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/coloroption/ColorGradientPicker.java rename to src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/coloroption/ColorGradientPicker.java index 4d00518..a11d61d 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/coloroption/ColorGradientPicker.java +++ b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/coloroption/ColorGradientPicker.java @@ -1,4 +1,4 @@ -package com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.options.coloroption; +package com.tanishisherewith.dynamichud.utils.contextmenu.options.coloroption; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gl.Framebuffer; @@ -11,13 +11,13 @@ import java.util.function.Consumer; public class ColorGradientPicker { + final MinecraftClient client = MinecraftClient.getInstance(); private final Consumer onColorSelected; // The callback to call when a color is selected private final GradientSlider gradientSlider; private final GradientBox gradientBox; private final ColorPickerButton colorPickerButton; private final AlphaSlider alphaSlider; private final int boxSize; - final MinecraftClient client = MinecraftClient.getInstance(); private int x, y; private boolean display = false; @@ -81,7 +81,7 @@ public void render(DrawContext drawContext, int x1, int y1) { int blue = buffer.get(2) & 0xFF; drawContext.getMatrices().push(); - drawContext.getMatrices().translate(0,0,500); + drawContext.getMatrices().translate(0, 0, 500); drawContext.fill((int) mouseX + 10, (int) mouseY, (int) mouseX + 26, (int) mouseY + 16, -1); drawContext.fill((int) mouseX + 11, (int) mouseY + 1, (int) mouseX + 25, (int) mouseY + 15, (red << 16) | (green << 8) | blue | 0xFF000000); drawContext.getMatrices().pop(); diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/coloroption/ColorOption.java b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/coloroption/ColorOption.java similarity index 88% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/coloroption/ColorOption.java rename to src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/coloroption/ColorOption.java index 9d90874..17f5eec 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/coloroption/ColorOption.java +++ b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/coloroption/ColorOption.java @@ -1,8 +1,8 @@ -package com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.options.coloroption; +package com.tanishisherewith.dynamichud.utils.contextmenu.options.coloroption; -import com.tanishisherewith.dynamichud.newTrial.helpers.DrawHelper; -import com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.ContextMenu; -import com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.Option; +import com.tanishisherewith.dynamichud.helpers.DrawHelper; +import com.tanishisherewith.dynamichud.utils.contextmenu.ContextMenu; +import com.tanishisherewith.dynamichud.utils.contextmenu.Option; import net.minecraft.client.gui.DrawContext; import net.minecraft.text.Text; diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/coloroption/ColorPickerButton.java b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/coloroption/ColorPickerButton.java similarity index 94% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/coloroption/ColorPickerButton.java rename to src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/coloroption/ColorPickerButton.java index 39f541e..fa2b8f1 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/coloroption/ColorPickerButton.java +++ b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/coloroption/ColorPickerButton.java @@ -1,4 +1,4 @@ -package com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.options.coloroption; +package com.tanishisherewith.dynamichud.utils.contextmenu.options.coloroption; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.DrawContext; diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/coloroption/GradientBox.java b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/coloroption/GradientBox.java similarity index 86% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/coloroption/GradientBox.java rename to src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/coloroption/GradientBox.java index 6f63968..e67d856 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/coloroption/GradientBox.java +++ b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/coloroption/GradientBox.java @@ -1,6 +1,6 @@ -package com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.options.coloroption; +package com.tanishisherewith.dynamichud.utils.contextmenu.options.coloroption; -import com.tanishisherewith.dynamichud.newTrial.helpers.DrawHelper; +import com.tanishisherewith.dynamichud.helpers.DrawHelper; import net.minecraft.client.gui.DrawContext; import java.awt.*; @@ -28,14 +28,14 @@ public void render(DrawContext drawContext, int x, int y) { DrawHelper.drawOutlinedBox(drawContext, x - 2, y - 2, x + size + 2, y + size + 2, -1); // Draw the gradient - com.tanishisherewith.dynamichud.newTrial.helpers.DrawHelper.drawRoundedGradientRectangle(drawContext.getMatrices().peek().getPositionMatrix(), Color.BLACK, Color.BLACK, Color.getHSBColor(hue, 1.0f, 1.0f), Color.WHITE, x, y, size, size, 2); + com.tanishisherewith.dynamichud.helpers.DrawHelper.drawRoundedGradientRectangle(drawContext.getMatrices().peek().getPositionMatrix(), Color.BLACK, Color.BLACK, Color.getHSBColor(hue, 1.0f, 1.0f), Color.WHITE, x, y, size, size, 2); // Draw the handle float handleSize = 3; float handleX = x + saturation * size - handleSize / 2.0f; float handleY = y + (1.0f - value) * size - handleSize / 2.0f; - DrawHelper.drawFilledCircle(drawContext.getMatrices().peek().getPositionMatrix(), handleX, handleY, 1,-1); + DrawHelper.drawFilledCircle(drawContext.getMatrices().peek().getPositionMatrix(), handleX, handleY, 1, -1); drawContext.getMatrices().pop(); } diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/coloroption/GradientSlider.java b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/coloroption/GradientSlider.java similarity index 94% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/coloroption/GradientSlider.java rename to src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/coloroption/GradientSlider.java index c56cf16..9115e19 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/utils/contextmenu/options/coloroption/GradientSlider.java +++ b/src/main/java/com/tanishisherewith/dynamichud/utils/contextmenu/options/coloroption/GradientSlider.java @@ -1,6 +1,6 @@ -package com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.options.coloroption; +package com.tanishisherewith.dynamichud.utils.contextmenu.options.coloroption; -import com.tanishisherewith.dynamichud.newTrial.helpers.DrawHelper; +import com.tanishisherewith.dynamichud.helpers.DrawHelper; import net.minecraft.client.gui.DrawContext; import java.awt.*; @@ -54,7 +54,7 @@ public void render(DrawContext drawContext, int x, int y) { float handleX = x + hue * width - handleWidth / 2.0f; float handleY = y - (handleHeight - height) / 2.0f; - DrawHelper.drawRoundedRectangle(drawContext.getMatrices().peek().getPositionMatrix(), handleX, handleY, handleWidth, handleHeight, 2,-1); + DrawHelper.drawRoundedRectangle(drawContext.getMatrices().peek().getPositionMatrix(), handleX, handleY, handleWidth, handleHeight, 2, -1); drawContext.getMatrices().pop(); } diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/widget/Widget.java b/src/main/java/com/tanishisherewith/dynamichud/widget/Widget.java similarity index 96% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/widget/Widget.java rename to src/main/java/com/tanishisherewith/dynamichud/widget/Widget.java index fe826d9..bda7cbf 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/widget/Widget.java +++ b/src/main/java/com/tanishisherewith/dynamichud/widget/Widget.java @@ -1,9 +1,9 @@ -package com.tanishisherewith.dynamichud.newTrial.widget; +package com.tanishisherewith.dynamichud.widget; -import com.tanishisherewith.dynamichud.newTrial.config.GlobalConfig; -import com.tanishisherewith.dynamichud.newTrial.helpers.ColorHelper; -import com.tanishisherewith.dynamichud.newTrial.helpers.DrawHelper; -import com.tanishisherewith.dynamichud.newTrial.utils.UID; +import com.tanishisherewith.dynamichud.config.GlobalConfig; +import com.tanishisherewith.dynamichud.helpers.ColorHelper; +import com.tanishisherewith.dynamichud.helpers.DrawHelper; +import com.tanishisherewith.dynamichud.utils.UID; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.DrawContext; import net.minecraft.nbt.NbtCompound; @@ -161,7 +161,7 @@ public void renderInEditor(DrawContext drawContext, int mouseX, int mouseY) { /** * Renders the widget on the screen *

- * The mouse position values are only passed when in a {@link com.tanishisherewith.dynamichud.newTrial.screens.AbstractMoveableScreen} screen. + * The mouse position values are only passed when in a {@link com.tanishisherewith.dynamichud.screens.AbstractMoveableScreen} screen. *

* * @param context diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/widget/WidgetBox.java b/src/main/java/com/tanishisherewith/dynamichud/widget/WidgetBox.java similarity index 97% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/widget/WidgetBox.java rename to src/main/java/com/tanishisherewith/dynamichud/widget/WidgetBox.java index 0082496..cf2670d 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/widget/WidgetBox.java +++ b/src/main/java/com/tanishisherewith/dynamichud/widget/WidgetBox.java @@ -1,4 +1,4 @@ -package com.tanishisherewith.dynamichud.newTrial.widget; +package com.tanishisherewith.dynamichud.widget; public class WidgetBox { public float x = 0, y = 0; diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/widget/WidgetData.java b/src/main/java/com/tanishisherewith/dynamichud/widget/WidgetData.java similarity index 86% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/widget/WidgetData.java rename to src/main/java/com/tanishisherewith/dynamichud/widget/WidgetData.java index 7939e21..0305a78 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/widget/WidgetData.java +++ b/src/main/java/com/tanishisherewith/dynamichud/widget/WidgetData.java @@ -1,4 +1,4 @@ -package com.tanishisherewith.dynamichud.newTrial.widget; +package com.tanishisherewith.dynamichud.widget; import java.util.function.Supplier; diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/widget/WidgetManager.java b/src/main/java/com/tanishisherewith/dynamichud/widget/WidgetManager.java similarity index 96% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/widget/WidgetManager.java rename to src/main/java/com/tanishisherewith/dynamichud/widget/WidgetManager.java index c4a685e..65a414e 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/widget/WidgetManager.java +++ b/src/main/java/com/tanishisherewith/dynamichud/widget/WidgetManager.java @@ -1,6 +1,6 @@ -package com.tanishisherewith.dynamichud.newTrial.widget; +package com.tanishisherewith.dynamichud.widget; -import com.tanishisherewith.dynamichud.newTrial.DynamicHUD; +import com.tanishisherewith.dynamichud.DynamicHUD; import net.fabricmc.fabric.api.util.NbtType; import net.minecraft.nbt.NbtCompound; import net.minecraft.nbt.NbtIo; @@ -15,8 +15,8 @@ import java.nio.file.StandardCopyOption; import java.util.*; -import static com.tanishisherewith.dynamichud.newTrial.DynamicHUD.printInfo; -import static com.tanishisherewith.dynamichud.newTrial.DynamicHUD.printWarn; +import static com.tanishisherewith.dynamichud.DynamicHUD.printInfo; +import static com.tanishisherewith.dynamichud.DynamicHUD.printWarn; /** * Manages a collection of widgets, providing methods to add, remove, save, and load widgets. @@ -187,7 +187,7 @@ public static void loadWidgets(File file) throws IOException { if (file.exists()) { NbtCompound rootTag = NbtIo.read(file.toPath()); NbtList widgetList = rootTag.getList("widgets", NbtType.COMPOUND); - if(widgetList == null){ + if (widgetList == null) { printWarn("RootTag is null. File is either empty or corrupted," + file); return; } diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/widget/WidgetRenderer.java b/src/main/java/com/tanishisherewith/dynamichud/widget/WidgetRenderer.java similarity index 96% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/widget/WidgetRenderer.java rename to src/main/java/com/tanishisherewith/dynamichud/widget/WidgetRenderer.java index b57043e..b850815 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/widget/WidgetRenderer.java +++ b/src/main/java/com/tanishisherewith/dynamichud/widget/WidgetRenderer.java @@ -1,7 +1,7 @@ -package com.tanishisherewith.dynamichud.newTrial.widget; +package com.tanishisherewith.dynamichud.widget; -import com.tanishisherewith.dynamichud.newTrial.DynamicHUD; -import com.tanishisherewith.dynamichud.newTrial.screens.AbstractMoveableScreen; +import com.tanishisherewith.dynamichud.DynamicHUD; +import com.tanishisherewith.dynamichud.screens.AbstractMoveableScreen; import net.minecraft.client.gui.DrawContext; import net.minecraft.client.gui.screen.GameMenuScreen; import net.minecraft.client.gui.screen.Screen; diff --git a/src/main/java/com/tanishisherewith/dynamichud/newTrial/widgets/TextWidget.java b/src/main/java/com/tanishisherewith/dynamichud/widgets/TextWidget.java similarity index 88% rename from src/main/java/com/tanishisherewith/dynamichud/newTrial/widgets/TextWidget.java rename to src/main/java/com/tanishisherewith/dynamichud/widgets/TextWidget.java index 311bc11..5805b36 100644 --- a/src/main/java/com/tanishisherewith/dynamichud/newTrial/widgets/TextWidget.java +++ b/src/main/java/com/tanishisherewith/dynamichud/widgets/TextWidget.java @@ -1,16 +1,16 @@ -package com.tanishisherewith.dynamichud.newTrial.widgets; - -import com.tanishisherewith.dynamichud.newTrial.config.GlobalConfig; -import com.tanishisherewith.dynamichud.newTrial.helpers.ColorHelper; -import com.tanishisherewith.dynamichud.newTrial.utils.DynamicValueRegistry; -import com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.ContextMenu; -import com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.options.BooleanOption; -import com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.options.DoubleOption; -import com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.options.EnumOption; -import com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.options.ListOption; -import com.tanishisherewith.dynamichud.newTrial.utils.contextmenu.options.coloroption.ColorOption; -import com.tanishisherewith.dynamichud.newTrial.widget.Widget; -import com.tanishisherewith.dynamichud.newTrial.widget.WidgetData; +package com.tanishisherewith.dynamichud.widgets; + +import com.tanishisherewith.dynamichud.config.GlobalConfig; +import com.tanishisherewith.dynamichud.helpers.ColorHelper; +import com.tanishisherewith.dynamichud.utils.DynamicValueRegistry; +import com.tanishisherewith.dynamichud.utils.contextmenu.ContextMenu; +import com.tanishisherewith.dynamichud.utils.contextmenu.options.BooleanOption; +import com.tanishisherewith.dynamichud.utils.contextmenu.options.DoubleOption; +import com.tanishisherewith.dynamichud.utils.contextmenu.options.EnumOption; +import com.tanishisherewith.dynamichud.utils.contextmenu.options.ListOption; +import com.tanishisherewith.dynamichud.utils.contextmenu.options.coloroption.ColorOption; +import com.tanishisherewith.dynamichud.widget.Widget; +import com.tanishisherewith.dynamichud.widget.WidgetData; import net.minecraft.client.gui.DrawContext; import net.minecraft.nbt.NbtCompound; import org.lwjgl.glfw.GLFW; @@ -23,8 +23,7 @@ public class TextWidget extends Widget { public Color textColor; - public static WidgetData DATA = new WidgetData<>("TextWidget", "Display Text on screen", TextWidget::new); - protected boolean shadow; // Whether to draw a shadow behind the text + protected boolean shadow; // Whether to draw a shadow behind the text public static WidgetData DATA = new WidgetData<>("TextWidget", "Display Text on screen", TextWidget::new); protected boolean rainbow; // Whether to apply a rainbow effect to the text protected int rainbowSpeed = 2; //Speed of the rainbow effect Supplier textSupplier; @@ -222,4 +221,6 @@ public TextWidget build() { } + + } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index cb56d52..13c0184 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -19,10 +19,10 @@ "environment": "client", "entrypoints": { "client": [ - "com.tanishisherewith.dynamichud.newTrial.DynamicHUD" + "com.tanishisherewith.dynamichud.DynamicHUD" ], "dynamicHud": [ - "com.tanishisherewith.dynamichud.newTrial.DynamicHudTest" + "com.tanishisherewith.dynamichud.DynamicHudTest" ], "modmenu": [ "com.tanishisherewith.dynamichud.ModMenuIntegration"