Remove health & main menu improvements.

This commit is contained in:
ThisIsALegitUsername 2023-01-31 02:57:04 +00:00
parent de6d623268
commit fb84b5a486
11 changed files with 28859 additions and 28899 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,6 @@ import dev.resent.module.impl.hud.CPS;
import dev.resent.module.impl.hud.ComboCounter;
import dev.resent.module.impl.hud.FPS;
import dev.resent.module.impl.hud.Freelook;
import dev.resent.module.impl.hud.Health;
import dev.resent.module.impl.hud.Hitboxes;
import dev.resent.module.impl.hud.Info;
import dev.resent.module.impl.hud.KeyStrokes;
@ -62,7 +61,6 @@ public class ModManager {
public static Freelook freelook;
public static ComboCounter comboCounter = new ComboCounter();
public static Hitboxes hitboxes = new Hitboxes();
public static Health health;
public static AutoRespawn autoRespawn;
//public static ChunkBorders chunkBorders;
public static NoParticles noParticles = new NoParticles();
@ -99,7 +97,6 @@ public class ModManager {
register(comboCounter);
register(coordinate = new Info());
register(fps = new FPS());
register(health = new Health());
register(potCounter = new PotCounter());
//Mechanic

View File

@ -1,25 +0,0 @@
package dev.resent.module.impl.hud;
import dev.resent.module.Theme;
import dev.resent.module.base.Category;
import dev.resent.module.base.RenderModule;
public class Health extends RenderModule {
public Health() {
super("Health Display", Category.HUD, 4, 64, true);
}
public int getHeight() {
return mc.fontRendererObj.FONT_HEIGHT + 4;
}
public int getWidth() {
return mc.fontRendererObj.getStringWidth("[" + mc.thePlayer.getHealth() + " Health]") + 4;
}
@Override
public void draw() {
drawString("[" + mc.thePlayer.getHealth() + " Health]", this.x + 2, this.y + 2, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
}
}

View File

@ -4,14 +4,10 @@ import dev.resent.module.Theme;
import dev.resent.module.base.Category;
import dev.resent.module.base.RenderModule;
import dev.resent.module.setting.BooleanSetting;
import dev.resent.ui.ClickGUI;
import dev.resent.ui.HUDConfigScreen;
import net.minecraft.client.gui.FontRenderer;
public class Sprint extends RenderModule {
public BooleanSetting drawn = new BooleanSetting("Text Drawn", "", true);
public FontRenderer fr;
public Sprint() {
super("ToggleSprint", Category.MOVEMENT, 4, 94, true);
@ -37,17 +33,12 @@ public class Sprint extends RenderModule {
} else if (!mc.gameSettings.keyBindSprint.isKeyDown()) {
keyHeldTicks = 0;
}
/*if(keyHeldTicks > 0 && clickDebounce == false) {
toggled = !toggled;
clickDebounce = true;
} else if(clickDebounce == true) {
clickDebounce = false;
}*/
if (keyHeldTicks > 0) {
toggled = !toggled;
}
if (toggled) {
if (mc.thePlayer.movementInput.moveForward == 1 && !mc.thePlayer.isUsingItem()) mc.thePlayer.setSprinting(true);
if (mc.gameSettings.keyBindForward.pressed && !mc.thePlayer.isUsingItem())
mc.thePlayer.setSprinting(true);
text = definitive ? text : "[Sprinting (Toggled)]";
}
@ -57,21 +48,17 @@ public class Sprint extends RenderModule {
@Override
public int getWidth() {
if (mc.currentScreen instanceof HUDConfigScreen || mc.currentScreen instanceof ClickGUI) {
return fr.getStringWidth("[Sprinting [Toggled)]");
} else {
return fr.getStringWidth(getText());
}
return mc.fontRendererObj.getStringWidth(getText());
}
@Override
public void draw() {
this.fr = mc.fontRendererObj;
if (drawn.getValue()) fr.drawStringWithShadow(getText(), x + 2, y + 2, Theme.getFontColor(Theme.getFontId()));
if (drawn.getValue())
drawString(getText(), x + 2, y + 2, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
}
@Override
public int getHeight() {
return fr.FONT_HEIGHT + 2;
return mc.fontRendererObj.FONT_HEIGHT + 2;
}
}

View File

@ -256,8 +256,7 @@ public class ClickGUI extends GuiScreen {
@Override
public void initGui() {
mc.gameSettings.loadOptions();
introAnimation = Theme.getAnimation(Theme.getAnimationId(), 750, 1, 2, 3.8f, 1.35f, false);
//introAnimation = new ElasticAnimation(750, 1, 3.8f, 1.35f, false);
introAnimation = Theme.getAnimation(Theme.getAnimationId(), 500, 1, 3, 3.8f, 1.35f, false);
}
protected void keyTyped(char par1, int par2) {

View File

@ -17,6 +17,6 @@ public class ClientButton extends GuiButton
this.hovered = (mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height);
Gui.drawRect(this.xPosition, this.yPosition, this.xPosition + this.width, this.yPosition + this.height, hovered ? 0x30ffffff :0x20ffffff);
drawCenteredString(fr, this.displayString, this.xPosition + this.width / 2, this.yPosition + (this.height - 8) / 2, -1);
drawCenteredString(fr, this.displayString, this.xPosition + this.width / 2, this.yPosition + (this.height - 8) / 2, -1, false);
}
}

View File

@ -141,7 +141,7 @@ public class RenderUtils {
public static void drawCenteredScaledString(String text, int param1,int param2, int color, float scale){
GlStateManager.pushMatrix();
GlStateManager.scale(scale,scale,scale);
Gui.drawCenteredString(Minecraft.getMinecraft().fontRendererObj, text, (int) (param1 / scale), (int) (param2 / scale), color);
Gui.drawCenteredString(Minecraft.getMinecraft().fontRendererObj, text, (int) (param1 / scale), (int) (param2 / scale), color, false);
GlStateManager.popMatrix();
}

View File

@ -139,7 +139,11 @@ public class Gui {
* Args : renderer, string, x, y, color
*/
public static void drawCenteredString(FontRenderer fontRendererIn, String text, int x, int y, int color) {
fontRendererIn.drawString(text, (float) (x - fontRendererIn.getStringWidth(text) / 2), (float) y, color, false);
fontRendererIn.drawString(text, (float) (x - fontRendererIn.getStringWidth(text) / 2), (float) y, color, true);
}
public static void drawCenteredString(FontRenderer fontRendererIn, String text, int x, int y, int color, boolean dropshadow) {
fontRendererIn.drawString(text, (float) (x - fontRendererIn.getStringWidth(text) / 2), (float) y, color, dropshadow);
}
/**+

View File

@ -1,18 +1,20 @@
package net.minecraft.entity;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.Maps;
import dev.resent.module.base.ModManager;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.Maps;
import dev.resent.module.base.ModManager;
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.ai.attributes.BaseAttributeMap;
@ -1450,6 +1452,11 @@ public abstract class EntityLivingBase extends Entity {
* interpolated look vector
*/
public Vec3 getLook(float f) {
if (this instanceof EntityPlayerSP) {
return super.getLook(f);
}
if (f == 1.0F) {
return this.getVectorForRotation(this.rotationPitch, this.rotationYawHead);
} else {

View File

@ -2811,7 +2811,7 @@ public abstract class World implements IBlockAccess {
* Returns horizon height for use in rendering the sky.
*/
public double getHorizon() {
return this.worldInfo.getTerrainType() == WorldType.FLAT ? 0.0D : 63.0D;
return 0;
}
/**+