This commit is contained in:
ThisIsALegitUsername 2023-02-28 23:32:49 -05:00
commit 9bce413420
11 changed files with 30557 additions and 30520 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -4,6 +4,7 @@ public class ClientInfo {
public static final String name = "Resent";
public static final String version = "3.6";
public static final String author = "Nitwit";
public static final String release = Release.BETA.name;
public enum Release {

View File

@ -7,6 +7,7 @@ import java.util.List;
import dev.resent.annotation.Module;
import dev.resent.module.base.setting.Setting;
import dev.resent.util.render.RenderUtils;
import dev.resent.visual.ui.Theme;
import dev.resent.visual.ui.animation.SimpleAnimation;
import net.minecraft.client.Minecraft;
@ -60,10 +61,10 @@ public abstract class Mod {
}
protected int drawString(final String text, final int x, final int y, final int color, final boolean idk) {
if (color == 6942069) {
if (Theme.getFontColor(Theme.getFontId()) == 6942069) {
RenderUtils.drawChromaString(text, x, y, idk);
} else {
Minecraft.getMinecraft().fontRendererObj.drawString(text, x, y, color, idk);
Minecraft.getMinecraft().fontRendererObj.drawString(text, x, y, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
}
return x;

View File

@ -19,34 +19,38 @@ public class Info extends RenderMod {
public BooleanSetting direction = new BooleanSetting("Direction", "", true);
public static final String[] directionsF = new String[] { "\u00A79S\u00A7r", "\u00A72W\u00A7r", "\u00A74N\u00A7r", "\u00A76E\u00A7r" };
public int[] getPositions(){
int[] poses = new int[]{
(int)mc.thePlayer.posX,
(int)mc.thePlayer.posY,
(int)mc.thePlayer.posZ,
};
return poses;
}
public int getWidth() {
int px = (int) mc.thePlayer.posX;
int py = (int) mc.thePlayer.posY;
int pz = (int) mc.thePlayer.posZ;
return 5 + mc.fontRendererObj.getStringWidth(" X: Biome:" + mc.theWorld.getBiomeGenForCoords(new BlockPos(px, py, pz)).biomeName + Math.max(py, pz));
return 5 + mc.fontRendererObj.getStringWidth(" X: Biome:" + mc.theWorld.getBiomeGenForCoords(new BlockPos(getPositions()[0], getPositions()[1], getPositions()[2])).biomeName + Math.max(getPositions()[0], Math.max(getPositions()[1], getPositions()[2])));
}
public int getHeight() {
return mc.fontRendererObj.FONT_HEIGHT * 7;
return 63;
}
@Override
public void draw() {
int px = (int) mc.thePlayer.posX;
int py = (int) mc.thePlayer.posY;
int pz = (int) mc.thePlayer.posZ;
int rot = MathHelper.floor_double(this.mc.thePlayer.rotationYaw * 4 / 360 + 0.5) & 3;
if (mc.thePlayer != null) {
drawRect(this.x, this.y, this.x + this.getWidth(), this.y + this.getHeight(), new Color(0, 0, 0, 200).getRGB());
drawString(" X: " + px, this.x + 5, this.y + 14, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
drawString(" Y: " + py, this.x + 5, this.y + 24, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
drawString(" Z: " + pz, this.x + 5, this.y + 34, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
drawString(" X: " + getPositions()[0], this.x + 5, this.y + 14, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
drawString(" Y: " + getPositions()[1], this.x + 5, this.y + 24, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
drawString(" Z: " + getPositions()[2], this.x + 5, this.y + 34, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
if (direction.getValue()){
drawString(" Dir: ", this.x + 5 + mc.fontRendererObj.getStringWidth(" X: " + px), this.y + 14, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
mc.fontRendererObj.drawString(directionsF[rot], this.x+5+mc.fontRendererObj.getStringWidth(" X: Dir: " + px), this.y + 14, -1, Theme.getTextShadow());
drawString(" Dir: ", this.x + 5 + mc.fontRendererObj.getStringWidth(" X: " + getPositions()[0]), this.y + 14, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
mc.fontRendererObj.drawString(directionsF[rot], this.x+5+mc.fontRendererObj.getStringWidth(" X: Dir: " + getPositions()[0]), this.y + 14, -1, Theme.getTextShadow());
}
drawString(" Biome: " + mc.theWorld.getBiomeGenForCoords(new BlockPos(px, py, pz)).biomeName, this.x + 5, this.y + 44, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
drawString(" Biome: " + mc.theWorld.getBiomeGenForCoords(new BlockPos(getPositions()[0], getPositions()[1], getPositions()[2])).biomeName, this.x + 5, this.y + 44, Theme.getFontColor(Theme.getFontId()), Theme.getTextShadow());
}
}
}

View File

@ -76,9 +76,11 @@ public class ClickGUI extends GuiScreen {
this.openedMod = null;
}else if(isMouseInside(mouseX, mouseY, this.x+48+xo, height-2-fh*-(off)+70-1-offset, this.x+80+xo, height+30-fh*-off+30+2-offset+17) && ModManager.clickGui.guiTheme.getValue() == "New" && openedMod == null){
//toggle new
if(m.getName() != "ClickGUI")
m.toggle();
} else if (isMouseInside(mouseX, mouseY, this.x + 10 + xo - 2 + 10, height - 2 - fh * -(off) + 50 - 2 - offset, this.x + 90 + xo + 22, height + 30 - fh * (-off) + 30 + 2 - offset) && mouseButton == 0 && openedMod == null && ModManager.clickGui.guiTheme.getValue() == "Classic revised") {
//toggle classic
if(m.getName() != "ClickGUI")
m.toggle();
}
if (xo > width / 2) {
@ -182,7 +184,7 @@ public class ClickGUI extends GuiScreen {
if (height - 2 - fh * -(off) + 50 - 2 - offset > height + 29 && height + 40 - fh * (-off) + 30 +15 - offset < y + 20 && (introAnimation != null ? introAnimation.isDone() : true)) {
// Enabled outline
m.toggleAnimation.setAnimation(m.isEnabled() ? 20 : 0, 5);
m.toggleAnimation.setAnimation(m.isEnabled() ? 20 : 0, 7);
if(ModManager.clickGui.guiTheme.getValue() == "New"){
RenderUtils.drawRoundedRect(this.x+48+xo, height-2-fh*-(off)+70-1-offset, this.x+80+xo, height+30-fh*-off+30+2-offset+17, 6, new Color(97, 97, 97).getRGB(), true);
RenderUtils.drawRoundedRect(this.x+48+xo, height-2-fh*-(off)+70-1-offset, this.x+60+xo+m.toggleAnimation.getValue(), height+30-fh*-off+30+2-offset+17, 6, Color.green.getRGB(), true);
@ -263,6 +265,7 @@ public class ClickGUI extends GuiScreen {
public void onGuiClosed() {
Keyboard.enableRepeatEvents(true);
ModManager.clickGui.setEnabled(false);
mc.gameSettings.saveOptions();
}

View File

@ -8,7 +8,7 @@ import net.minecraft.client.gui.GuiScreen;
public class HUDConfigScreen extends GuiScreen {
public void initGui() {
this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 148, "Back"));
this.buttonList.add(new GuiButton(200, width / 2 - 100, height / 6 + 148, "Back"));
}
public void onGuiClosed() {

View File

@ -1,6 +1,6 @@
package dev.resent.visual.ui;
import dev.resent.util.misc.GlUtils;
import dev.resent.module.base.ModManager;
import dev.resent.util.render.Color;
import dev.resent.visual.ui.animation.SimpleAnimation;
import net.minecraft.client.Minecraft;
@ -33,6 +33,8 @@ public class PreGUI extends GuiScreen {
@Override
protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
if (isMouseInside(parInt1, parInt2, GuiScreen.width / 2 - 30, GuiScreen.height / 2 + 20, GuiScreen.width / 2 + 50, GuiScreen.height / 2 + 50) && parInt3 == 0) {
ModManager.clickGui.setEnabled(true);
mc.gameSettings.saveOptions();
mc.displayGuiScreen(new ClickGUI());
}
super.mouseClicked(parInt1, parInt2, parInt3);

View File

@ -1,14 +1,16 @@
package net.lax1dude.eaglercraft.v1_8;
import dev.resent.client.ClientInfo;
public class EaglercraftVersion {
//////////////////////////////////////////////////////////////////////
/// Customize these to fit your fork:
public static final String projectForkName = "Resent";
public static final String projectForkVersion = "3.3.2";
public static final String projectForkVendor = "Nitwit";
public static final String projectForkName = ClientInfo.name;
public static final String projectForkVersion = ClientInfo.version;
public static final String projectForkVendor = ClientInfo.author;
public static final String projectForkURL = "https://github.com/ThisIsALegitUsername/Resent-web";
@ -26,7 +28,7 @@ public class EaglercraftVersion {
// Miscellaneous variables:
public static final String mainMenuStringA = "Minecraft 1.8.8";
public static final String mainMenuStringA = "Minecraft 1.8.8 - " + projectForkName;
public static final String mainMenuStringB = projectOriginName + " " + projectOriginRevision + "-" + projectOriginVersion;
public static final String mainMenuStringC = "Rewritten by " + projectOriginAuthor;
public static final String mainMenuStringD = "Resources Copyright Mojang AB";

View File

@ -38,7 +38,6 @@ import net.lax1dude.eaglercraft.v1_8.futures.FutureTask;
import net.lax1dude.eaglercraft.v1_8.futures.ListenableFuture;
import net.lax1dude.eaglercraft.v1_8.futures.ListenableFutureTask;
import net.lax1dude.eaglercraft.v1_8.internal.EnumPlatformType;
import net.lax1dude.eaglercraft.v1_8.internal.KeyboardConstants;
import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput;
import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime;
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;

View File

@ -33,6 +33,7 @@ import com.jcraft.jzlib.GZIPInputStream;
import com.jcraft.jzlib.GZIPOutputStream;
import com.jcraft.jzlib.InflaterInputStream;
import dev.resent.client.ClientInfo;
import dev.resent.client.Resent;
import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion;
import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer;
@ -303,7 +304,7 @@ public class PlatformRuntime {
int epkSize = Integer.parseInt(request.getResponseHeader("content-length"));
Event event = evt;
setClientVersion(Resent.VERSION);
setClientVersion(ClientInfo.version);
setBarProgress(event, epkSize);
}catch (Exception e){
e.printStackTrace();