From 33c57242ee51972227f5941c9634e02b24149607 Mon Sep 17 00:00:00 2001 From: exhq Date: Wed, 23 Aug 2023 20:30:53 +0330 Subject: [PATCH] im so fucking bad with commit messages --- src/client/java/dev/exhq/ESSMConfigModel.java | 2 +- src/client/java/dev/exhq/ESSMhud.java | 2 +- .../java/dev/exhq/EchosShittySkyBlockMod.java | 29 ++++++++++++++----- src/client/java/dev/exhq/ScoreboardInfo.java | 7 +++++ 4 files changed, 31 insertions(+), 9 deletions(-) diff --git a/src/client/java/dev/exhq/ESSMConfigModel.java b/src/client/java/dev/exhq/ESSMConfigModel.java index b4a1876..b9d8e3b 100644 --- a/src/client/java/dev/exhq/ESSMConfigModel.java +++ b/src/client/java/dev/exhq/ESSMConfigModel.java @@ -19,7 +19,7 @@ public class ESSMConfigModel { public ESSMhud.PosData Mana = new ESSMhud.PosData(); public ESSMhud.PosData UsedMana = new ESSMhud.PosData(); - + public ESSMhud.PosData PurseAmount = new ESSMhud.PosData(); } diff --git a/src/client/java/dev/exhq/ESSMhud.java b/src/client/java/dev/exhq/ESSMhud.java index 472fe8e..854062a 100644 --- a/src/client/java/dev/exhq/ESSMhud.java +++ b/src/client/java/dev/exhq/ESSMhud.java @@ -84,7 +84,7 @@ public int getHeight() { public static ESSMhud Trolley = new ESSMhud(Text.of("Health"), 128,16, EchosShittySkyBlockMod.CONFIG.Health()); public static ESSMhud Trolleymana = new ESSMhud(Text.of("Mana"), 128,16, EchosShittySkyBlockMod.CONFIG.Mana()); public static ESSMhud UsedMana = new ESSMhud(Text.of("UsedMana"), 128,16, EchosShittySkyBlockMod.CONFIG.UsedMana()); - public static ESSMhud PurseAmount = new ESSMhud(Text.of("UsedMana"), 128,16, EchosShittySkyBlockMod.CONFIG.UsedMana()); + public static ESSMhud PurseAmount = new ESSMhud(Text.of("PurseAmount"), 128,16, EchosShittySkyBlockMod.CONFIG.PurseAmount()); public static ESSMhud Skill = new ESSMhud(Text.of("Skill"), 128,16, 0,0); diff --git a/src/client/java/dev/exhq/EchosShittySkyBlockMod.java b/src/client/java/dev/exhq/EchosShittySkyBlockMod.java index e349fcb..8a4f9ea 100644 --- a/src/client/java/dev/exhq/EchosShittySkyBlockMod.java +++ b/src/client/java/dev/exhq/EchosShittySkyBlockMod.java @@ -13,6 +13,10 @@ import net.minecraft.scoreboard.Team; import net.minecraft.text.Text; +import java.awt.*; +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Collections; import java.util.Objects; @@ -25,6 +29,7 @@ public class EchosShittySkyBlockMod implements ClientModInitializer { public static final String MOD_ID = "essm"; public static boolean shouldShowskill; public static String PurseString; + public static boolean killDante; public static String coinLogo; public static String skillInfo; public class RegexSubstringMatcher { @@ -115,21 +120,31 @@ public void onInitializeClient() { return 0; })); }); + + ClientCommandRegistrationCallback.EVENT.register((dispatcher, registryAccess) -> { + dispatcher.register(literal("killdante").executes(context -> { + killDante = !killDante; + return 0; + })); + }); + HudRenderCallback.EVENT.register(new Trolley()); HudRenderCallback.EVENT.register(new ManaUsage()); HudRenderCallback.EVENT.register(new ScoreboardInfo()); - HudRenderCallback.EVENT.register((maxtrixStack, tickDelta) -> { - - }); ClientReceiveMessageEvents.ALLOW_GAME.register((message, overlay) -> { return true; }); - //ClientReceiveMessageEvents.MODIFY_GAME.register((message, overlay) -> { - // if(overlay) return message; - // return - //}); + ClientReceiveMessageEvents.MODIFY_GAME.register((message, overlay) -> { + if(overlay||!killDante) return message; + var words = message.getString().split(" "); + var newMessage = ""; + for (String word : words) { + newMessage += word + "ussy "; + } + return Text.of(newMessage); + }); } } \ No newline at end of file diff --git a/src/client/java/dev/exhq/ScoreboardInfo.java b/src/client/java/dev/exhq/ScoreboardInfo.java index 815fd96..1b3e39d 100644 --- a/src/client/java/dev/exhq/ScoreboardInfo.java +++ b/src/client/java/dev/exhq/ScoreboardInfo.java @@ -9,6 +9,13 @@ public class ScoreboardInfo implements HudRenderCallback { @Override public void onHudRender(DrawContext drawContext, float tickDelta) { + drawContext.getMatrices().push(); + drawContext.fill(0, (MinecraftClient.getInstance().getWindow().getHeight())-200, MinecraftClient.getInstance().getWindow().getWidth(), MinecraftClient.getInstance().getWindow().getHeight(), -1); + drawContext.getMatrices().pop(); + + + + drawContext.getMatrices().push(); ESSMhud.PurseAmount.applyTransformations(drawContext.getMatrices()); drawContext.drawTextWithShadow(MinecraftClient.getInstance().textRenderer,EchosShittySkyBlockMod.coinLogo, 0,0, 0xfffca800);