info mod quick improvement

This commit is contained in:
ThisIsALegitUsername 2023-03-01 02:57:47 +00:00
parent d6f70abc68
commit 34cdc9e799
7 changed files with 30449 additions and 30418 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:" + 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

@ -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

@ -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();