From 8a539233ac11b784982f974e3f4c2628c92706b1 Mon Sep 17 00:00:00 2001 From: ThisIsALegitUsername Date: Sat, 11 Feb 2023 21:25:12 +0000 Subject: [PATCH] Lambda fixes & removed crosshair --- src/main/java/dev/resent/Resent.java | 2 +- .../java/dev/resent/module/base/ModManager.java | 3 --- .../dev/resent/module/impl/misc/Crosshair.java | 14 -------------- .../java/net/minecraft/client/gui/GuiIngame.java | 14 ++------------ 4 files changed, 3 insertions(+), 30 deletions(-) delete mode 100644 src/main/java/dev/resent/module/impl/misc/Crosshair.java diff --git a/src/main/java/dev/resent/Resent.java b/src/main/java/dev/resent/Resent.java index fc32ffc1..405997e9 100644 --- a/src/main/java/dev/resent/Resent.java +++ b/src/main/java/dev/resent/Resent.java @@ -8,7 +8,7 @@ public class Resent { INSTANCE = new Resent(); } - public static final String NAME = "Resent", VERSION = "3.4"; + public static final String NAME = "Resent", VERSION = "3.5"; public static final Resent INSTANCE; //private ISound uwu; public ModManager modManager; diff --git a/src/main/java/dev/resent/module/base/ModManager.java b/src/main/java/dev/resent/module/base/ModManager.java index e00c4ce4..95b73c61 100644 --- a/src/main/java/dev/resent/module/base/ModManager.java +++ b/src/main/java/dev/resent/module/base/ModManager.java @@ -21,7 +21,6 @@ import dev.resent.module.impl.misc.AutoGG; import dev.resent.module.impl.misc.AutoRespawn; import dev.resent.module.impl.misc.ClearChat; import dev.resent.module.impl.misc.Cosmetics; -import dev.resent.module.impl.misc.Crosshair; import dev.resent.module.impl.misc.CrystalOptimizer; import dev.resent.module.impl.misc.DynamicFOV; import dev.resent.module.impl.misc.FPSB; @@ -63,7 +62,6 @@ public class ModManager { public static MinimalViewBobbing minimalViewBobbing = new MinimalViewBobbing(); public static NoSwingDelay noSwingDelay; public static PotCounter potCounter; - public static Crosshair crosshair = new Crosshair(); public static HUD hud = new HUD(); public static CrystalOptimizer crystalOptimizer = new CrystalOptimizer(); public static TabGui tabGui = new TabGui(); @@ -87,7 +85,6 @@ public class ModManager { register(potCounter = new PotCounter()); //Mechanic - register(crosshair); register(autoRespawn = new AutoRespawn()); register(fullbright = new Fullbright()); register(noSwingDelay = new NoSwingDelay()); diff --git a/src/main/java/dev/resent/module/impl/misc/Crosshair.java b/src/main/java/dev/resent/module/impl/misc/Crosshair.java deleted file mode 100644 index 0c705808..00000000 --- a/src/main/java/dev/resent/module/impl/misc/Crosshair.java +++ /dev/null @@ -1,14 +0,0 @@ -package dev.resent.module.impl.misc; - -import dev.resent.annotation.Module; -import dev.resent.module.base.Mod.Category; -import dev.resent.module.base.Mod; -import dev.resent.module.setting.ModeSetting; - -@Module(name = "Crosshair", category = Category.MISC, hasSetting = true) -public class Crosshair extends Mod { - - public Crosshair() { addSetting(color); } - - public static ModeSetting color = new ModeSetting("Hovered crosshair color", "", "White", "Red", "Yellow", "Green", "Blue", "Black"); -} diff --git a/src/main/java/net/minecraft/client/gui/GuiIngame.java b/src/main/java/net/minecraft/client/gui/GuiIngame.java index 8cdde2d7..a76809d6 100644 --- a/src/main/java/net/minecraft/client/gui/GuiIngame.java +++ b/src/main/java/net/minecraft/client/gui/GuiIngame.java @@ -14,15 +14,10 @@ import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import dev.resent.Resent; -import dev.resent.ui.animation.SimpleAnimation; -import dev.resent.module.base.Mod; -import dev.resent.module.base.ModManager; import dev.resent.module.base.RenderMod; -import dev.resent.module.impl.misc.Crosshair; -import dev.resent.ui.HUDConfigScreen; +import dev.resent.ui.animation.SimpleAnimation; import dev.resent.util.misc.W; import dev.resent.util.render.Color; -import dev.resent.util.render.RenderUtils; import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom; import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite; import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; @@ -316,7 +311,7 @@ public class GuiIngame extends Gui { this.overlayPlayerList.renderPlayerlist(i, scoreboard, scoreobjective1); } - Resent.INSTANCE.modManager.modules.stream().filter(m -> m.isEnabled()).filter(RenderMod.class::isInstance).forEach(m -> ((RenderMod)m).draw()); + Resent.INSTANCE.modManager.modules.stream().filter(m -> m.isEnabled() && m instanceof RenderMod).forEach(m -> ((RenderMod)m).draw()); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.disableLighting(); @@ -330,11 +325,6 @@ public class GuiIngame extends Gui { GlStateManager.enableBlend(); GlStateManager.tryBlendFuncSeparate(GL_ONE_MINUS_DST_COLOR, GL_ONE_MINUS_SRC_COLOR, 1, 0); GlStateManager.enableAlpha(); - - if (ModManager.crosshair.isEnabled() && Minecraft.getMinecraft().pointedEntity != null){ - GlStateManager.color(RenderUtils.getColorWithoutRGB(Crosshair.color).getRed(), RenderUtils.getColorWithoutRGB(Crosshair.color).getGreen(), RenderUtils.getColorWithoutRGB(Crosshair.color).getBlue(), 255); - GlStateManager.disableAlpha(); - } this.drawTexturedModalRect(scaledResWidth / 2 - 7, scaledResHeight / 2 - 7, 0, 0, 16, 16); }