some bug fixes

This commit is contained in:
UnknownUser1789 2023-01-25 18:48:57 +00:00
parent 195550207f
commit 9fa5efbebd
8 changed files with 79591 additions and 79562 deletions

View File

@ -24,12 +24,12 @@ This file is from ${date}. Check the resent client discord for the newest versio
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="EaglercraftX 1.8 Offline" />
<meta name="description" content="Resent client 1.8" />
<meta name="keywords" content="eaglercraft, eaglercraftx, minecraft, 1.8, 1.8.8" />
<title>EaglercraftX 1.8</title>
<title>Resent client 1.8</title>
<meta property="og:locale" content="en-US" />
<meta property="og:type" content="website" />
<meta property="og:title" content="EaglercraftX 1.8 Offline" />
<meta property="og:title" content="Resent client 1.8" />
<meta property="og:description" content="this file is not a website, whoever uploaded it to this URL is a dumbass" />
<script type="text/javascript">
"use strict";

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -2,10 +2,10 @@
cd javascript
rm EaglercraftX_1.8_Offline_en_US.html
rm EaglercraftX_1.8_Offline_International.html
rm Resent_EaglercraftX_1.8_US.html
rm Resent_EaglercraftX_1.8_International.html
rm Resent_3.3_patch__1.8_US.html
rm Resent_3.3_patch_1.8_International.html
cd ../
./MakeOfflineDownload.sh
cd javascript
mv EaglercraftX_1.8_Offline_en_US.html Resent_EaglercraftX_1.8_US.html
mv EaglercraftX_1.8_Offline_International.html Resent_EaglercraftX_1.8_International.html
mv EaglercraftX_1.8_Offline_en_US.html Resent_3.3_patch__1.8_US.html
mv EaglercraftX_1.8_Offline_International.html Resent_3.3_patch_1.8_International.html

View File

@ -12,32 +12,26 @@ import net.lax1dude.eaglercraft.v1_8.Mouse;
public class CPS extends RenderModule {
public CPS() {
super("CPS", Category.HUD, 4, 84, true);
super("CPS", Category.HUD, 50, 4, true);
addSetting(tshadow);
}
private final List<Long> clicks = new ArrayList<>();
private List<Long> clicks = new ArrayList<>();
private boolean wasPressed;
private long lastPressed;
public BooleanSetting tshadow = new BooleanSetting("Text shadow", "", true);
public int getWidth() {
return mc.fontRendererObj.getStringWidth("[00 CPS]") + 4;
}
public int getHeight() {
return mc.fontRendererObj.FONT_HEIGHT + 4;
}
public int getWidth() { return mc.fontRendererObj.getStringWidth("[CPS: 00]") + 4; }
public int getHeight() { return mc.fontRendererObj.FONT_HEIGHT+4; }
@Override
public void draw() {
final boolean pressed = Mouse.isButtonDown(0) || Mouse.isButtonDown(1);
if (pressed != wasPressed) {
if(pressed != wasPressed){
lastPressed = System.currentTimeMillis();
wasPressed = pressed;
if (pressed) {
if(pressed){
this.clicks.add(lastPressed);
}
}
@ -45,6 +39,7 @@ public class CPS extends RenderModule {
final long time = System.currentTimeMillis();
FuncUtils.removeIf(clicks, aLong -> aLong + 1000 < time);
mc.fontRendererObj.drawString("[" + clicks.size() + " CPS]", this.x + 2, this.y + 2, -1, tshadow.getValue());
mc.fontRendererObj.drawString("CPS: " + clicks.size(), this.x+2, this.y+2, -1, tshadow.getValue());
}
}

View File

@ -1,98 +1,142 @@
package dev.resent.module.impl.hud;
import java.util.ArrayList;
import java.util.List;
import dev.resent.module.base.Category;
import dev.resent.module.base.RenderModule;
import dev.resent.module.setting.BooleanSetting;
import dev.resent.module.setting.ModeSetting;
import dev.resent.util.misc.FuncUtils;
import dev.resent.util.render.RainbowUtil;
import dev.resent.util.render.RenderUtils;
import net.lax1dude.eaglercraft.v1_8.Keyboard;
import net.lax1dude.eaglercraft.v1_8.Mouse;
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Gui;
public class KeyStrokes extends RenderModule {
public static KeyStrokes INSTANCE = new KeyStrokes();
private final Minecraft mc = Minecraft.getMinecraft();
public class KeyStrokes extends RenderModule{
public KeyStrokes() {
super("Keystrokes", Category.HUD, 25, 4, true);
addSetting(chroma, sneak, transparent, tshadow, jump, color, colorp, gcolor, gcolorp, size);
public static KeyStrokes INSTANCE = new KeyStrokes();
private Minecraft mc = Minecraft.getMinecraft();
public KeyStrokes(){
super("Keystrokes", Category.HUD, 25, 4, true);
addSetting(chroma, sneak, transparent, tshadow, jump, color, colorp, gcolor, gcolorp, size);
}
public BooleanSetting chroma = new BooleanSetting("Rainbow", "", false);
public BooleanSetting sneak = new BooleanSetting("Sneak", "", false);
public BooleanSetting jump = new BooleanSetting("Jump", "", true);
public BooleanSetting transparent = new BooleanSetting("Transparent", "", false);
public BooleanSetting tshadow = new BooleanSetting("Text Shadow", "", false);
public ModeSetting size = new ModeSetting("Size", "", "Small", "Normal", "Large");
public ModeSetting color = new ModeSetting("Unpressed text color", "", "White", "Red", "Yellow", "Green", "Blue", "Pink", "Orange", "Black");
public ModeSetting colorp = new ModeSetting("Pressed text color", "", "Black", "Red", "Yellow", "Green", "Blue", "Pink", "Orange", "White");
public ModeSetting gcolor = new ModeSetting("Pressed button color", "", "White", "Red", "Yellow", "Green", "Blue", "Pink", "Orange", "Black");
public ModeSetting gcolorp = new ModeSetting("Unpressed button color", "", "Black", "Red", "Yellow", "Green", "Blue", "Pink", "Orange", "White");
public BooleanSetting chroma = new BooleanSetting("Rainbow", "", false);
public BooleanSetting sneak = new BooleanSetting("Sneak", "", false);
public BooleanSetting transparent = new BooleanSetting("Transparent", "", false);
public BooleanSetting jump = new BooleanSetting("Jump", "", true);
public BooleanSetting tshadow = new BooleanSetting("Text Shadow", "", false);
public ModeSetting size = new ModeSetting("Size", "", "Small", "Normal", "Large");
public ModeSetting color = new ModeSetting("Unpressed text color", "", "White", "Red", "Yellow", "Green", "Blue", "Pink", "Orange", "Black");
public ModeSetting colorp = new ModeSetting("Pressed text color", "", "Black", "Red", "Yellow", "Green", "Blue", "Pink", "Orange", "White");
public ModeSetting gcolor = new ModeSetting("Pressed button color", "", "White", "Red", "Yellow", "Green", "Blue", "Pink", "Orange", "Black");
public ModeSetting gcolorp = new ModeSetting("Unpressed button color", "", "Black", "Red", "Yellow", "Green", "Blue", "Pink", "Orange", "White");
public List<Long> clicks = new ArrayList<>();
public boolean wasPressed;
public long lastPressed;
private List<Long> clicks2 = new ArrayList<>();
public boolean wasPressed2;
public long lastPressed2;
public float getSize(ModeSetting size) {
if (size.getValue() == "Small") return 0.75f;
if (size.getValue() == "Normal") return 1.0f;
if (size.getValue() == "Large") return 1.25f;
return 1.0f;
public float getSize(ModeSetting size) {
if (size.getValue() == "Small")
return 0.75f;
if (size.getValue() == "Normal")
return 1.0f;
if (size.getValue() == "Large")
return 1.25f;
return 1.0f;
}
public int getLeftCPS() { final long leftTime = System.currentTimeMillis() + 100L;
FuncUtils.removeIf(clicks, beenLeftTime -> beenLeftTime + 1200L < leftTime + 200L);
return this.clicks.size();
}
public int getRightCPS() {
final long rightTime = System.currentTimeMillis() + 100L;
FuncUtils.removeIf(clicks2, beenRightTime -> beenRightTime + 1200L < rightTime + 200L);
return this.clicks2.size();
}
@Override
public void draw() {
public void draw() {
boolean wKey = Keyboard.isKeyDown(mc.gameSettings.keyBindForward.getKeyCode());
boolean aKey = Keyboard.isKeyDown(mc.gameSettings.keyBindLeft.getKeyCode());
boolean sKey = Keyboard.isKeyDown(mc.gameSettings.keyBindBack.getKeyCode());
boolean dKey = Keyboard.isKeyDown(mc.gameSettings.keyBindRight.getKeyCode());
boolean spaceKey = Keyboard.isKeyDown(mc.gameSettings.keyBindJump.getKeyCode());
GlStateManager.pushMatrix();
GlStateManager.translate(this.x + 1, this.y + 1, 0);
GlStateManager.scale(getSize(this.size), getSize(this.size), getSize(this.size));
GlStateManager.translate(-(this.x + 1), -(this.y + 1), 0);
if (!transparent.getValue()) {
//W
Gui.drawRect(this.x + 30, this.y + 3, this.x + 55, this.y + 25 + 3, wKey ? RenderUtils.getColor(gcolor) : RenderUtils.getColor(gcolorp));
// S
Gui.drawRect(this.x + 30, this.y + 30, this.x + 55, this.y + 55, sKey ? RenderUtils.getColor(gcolor) : RenderUtils.getColor(gcolorp));
// A
Gui.drawRect(this.x + 3, this.y + 30, this.x + 25 + 3, this.y + 55, aKey ? RenderUtils.getColor(gcolor) : RenderUtils.getColor(gcolorp));
// D
Gui.drawRect(this.x + 60 - 3, this.y + 30, this.x + 85 - 3, this.y + 25 + 5 + 25, dKey ? RenderUtils.getColor(gcolor) : RenderUtils.getColor(gcolorp));
// LMB
Gui.drawRect(this.x + 3, this.y + 57, this.x + 41, this.y + 82, mc.gameSettings.keyBindAttack.isPressed() ? RenderUtils.getColor(gcolor) : RenderUtils.getColor(gcolorp));
// RMB
Gui.drawRect(this.x + 45 - 1, this.y + 60 - 3, this.x + 85 - 3, this.y + 85 - 3, mc.gameSettings.keyBindUseItem.isPressed() ? RenderUtils.getColor(gcolor) : RenderUtils.getColor(gcolorp));
// Jump
if (jump.getValue()) Gui.drawRect(this.x + 3, this.y + 84, this.x + 85 - 3, this.y + 105 - 6, spaceKey ? RenderUtils.getColor(gcolor) : RenderUtils.getColor(gcolorp));
// Sneak
if (sneak.getValue()) Gui.drawRect(this.x + 3, jump.getValue() ? this.y + 102 : this.y + 84, this.x + 85 - 3, jump.getValue() ? this.y + 120 - 3 : this.y + 105 - 6, mc.gameSettings.keyBindSneak.pressed ? RenderUtils.getColor(gcolor) : RenderUtils.getColor(gcolorp));
boolean pressed = mc.gameSettings.keyBindAttack.pressed;
boolean rpressed = mc.gameSettings.keyBindUseItem.pressed;
if (pressed != this.wasPressed) {
this.lastPressed = System.currentTimeMillis();
this.wasPressed = pressed;
if (pressed)
this.clicks.add(Long.valueOf(this.lastPressed));
}
if (rpressed != this.wasPressed2) {
this.lastPressed2 = System.currentTimeMillis() + 10L;
this.wasPressed2 = rpressed;
if (rpressed)
this.clicks2.add(Long.valueOf(this.lastPressed2));
}
mc.fontRendererObj.drawString("W", this.x + 25 + 5 + (25 / 2 - mc.fontRendererObj.getStringWidth("W") + 4), this.y + 8 + 3, chroma.getValue() ? RainbowUtil.getRainbow(4f, 0.8f, 0.85f) : wKey ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color), tshadow.getValue());
mc.fontRendererObj.drawString("S", this.x + 25 + 5 + (25 / 2 - mc.fontRendererObj.getStringWidth("S") + 4), this.y + 38, chroma.getValue() ? RainbowUtil.getRainbow(4f, 0.8f, 0.85f) : sKey ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color), tshadow.getValue());
mc.fontRendererObj.drawString("A", this.x + 3 + (25 / 2 - mc.fontRendererObj.getStringWidth("A") + 4), this.y + 38, chroma.getValue() ? RainbowUtil.getRainbow(4f, 0.8f, 0.85f) : aKey ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color), tshadow.getValue());
mc.fontRendererObj.drawString("D", this.x + -3 + 25 + 25 + 10 + (25 / 2 - mc.fontRendererObj.getStringWidth("D") + 4), this.y + 38, chroma.getValue() ? RainbowUtil.getRainbow(4f, 0.8f, 0.85f) : dKey ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color), tshadow.getValue());
if (jump.getValue()) mc.fontRendererObj.drawString("\u00A7m-------", this.x + 85 + (25 / 2 - mc.fontRendererObj.getStringWidth("u00A7m-------") + 4), this.y + 92 - 3, (chroma.getValue() ? RainbowUtil.getRainbow(4f, 0.8f, 0.85f) : spaceKey ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color)), tshadow.getValue());
if (sneak.getValue()) mc.fontRendererObj.drawString("Sneak", this.x + 38 + 3 + (25 / 2 - mc.fontRendererObj.getStringWidth("Sneak") + 4), jump.getValue() ? this.y + 92 + 15 + 1 - 3 : this.y + 92 - 4, (chroma.getValue() ? RainbowUtil.getRainbow(4f, 0.8f, 0.85f) : mc.gameSettings.keyBindSneak.pressed ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color)), tshadow.getValue());
mc.fontRendererObj.drawString("LMB", this.x + 3 + 40 / 2 - mc.fontRendererObj.getStringWidth("LMB") / 2, (this.y + 60 + 25 / 2) - mc.fontRendererObj.FONT_HEIGHT / 2 - 3, chroma.getValue() ? RainbowUtil.getRainbow(4f, 0.8f, 0.85f) : Mouse.isButtonDown(0) ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color), tshadow.getValue());
mc.fontRendererObj.drawString("RMB", this.x + 40 + 3 + 40 / 2 - mc.fontRendererObj.getStringWidth("RMB") / 2, (this.y + 60 + 25 / 2) - mc.fontRendererObj.FONT_HEIGHT / 2 - 3, chroma.getValue() ? RainbowUtil.getRainbow(4f, 0.8f, 0.85f) : Mouse.isButtonDown(1) ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color), tshadow.getValue());
GlStateManager.pushMatrix();
GlStateManager.popMatrix();
GlStateManager.pushMatrix();
GlStateManager.translate(this.x + 1, this.y + 1, 0);
GlStateManager.translate(-(this.x + 1), -(this.y + 1), 0);
this.setHeight((25 + 5 + 25 + 5 + 25 + 25));
this.setWidth((25 + 5 + 25 + 5 + 30));
GlStateManager.translate(this.x + 1, this.y + 1, 0);
GlStateManager.scale(getSize(this.size), getSize(this.size), getSize(this.size));
GlStateManager.translate(-(this.x + 1), -(this.y + 1), 0);
GlStateManager.popMatrix();
}
if (!transparent.getValue()) {
//W
Gui.drawRect(this.x + 30, this.y + 3, this.x + 55, this.y + 25 + 3,
mc.gameSettings.keyBindForward.pressed ? RenderUtils.getColor(gcolor) : RenderUtils.getColor(gcolorp));
// S
Gui.drawRect(this.x + 30, this.y + 30, this.x + 55, this.y + 55,
mc.gameSettings.keyBindBack.pressed ? RenderUtils.getColor(gcolor) : RenderUtils.getColor(gcolorp));
// A
Gui.drawRect(this.x + 3, this.y + 30, this.x + 25 + 3, this.y + 55,
mc.gameSettings.keyBindLeft.pressed ? RenderUtils.getColor(gcolor) : RenderUtils.getColor(gcolorp));
// D
Gui.drawRect(this.x + 60 - 3, this.y + 30, this.x + 85 - 3, this.y + 25 + 5 + 25,
mc.gameSettings.keyBindRight.pressed ? RenderUtils.getColor(gcolor) : RenderUtils.getColor(gcolorp));
// LMB
Gui.drawRect(this.x+3, this.y+57, this.x+41, this.y+82,
mc.gameSettings.keyBindAttack.pressed ? RenderUtils.getColor(gcolor) : RenderUtils.getColor(gcolorp));
// RMB
Gui.drawRect(this.x + 45 - 1, this.y + 60 - 3, this.x + 85 - 3, this.y + 85 - 3,
mc.gameSettings.keyBindUseItem.pressed ? RenderUtils.getColor(gcolor) : RenderUtils.getColor(gcolorp));
// Jump
if(jump.getValue())
Gui.drawRect(this.x + 3, this.y+84, this.x+85-3,
this.y + 105 - 6, mc.gameSettings.keyBindJump.pressed ? RenderUtils.getColor(gcolor) : RenderUtils.getColor(gcolorp));
}
// Sneak
if (sneak.getValue() && !transparent.getValue())
Gui.drawRect(this.x + 3, jump.getValue() ? this.y+102 : this.y+84, this.x+85-3,
jump.getValue() ? this.y+120-3 : this.y+105-6, mc.gameSettings.keyBindSneak.pressed ? RenderUtils.getColor(gcolor) : RenderUtils.getColor(gcolorp));
mc.fontRendererObj.drawString("W", this.x+25+5+(25/2-mc.fontRendererObj.getStringWidth("W") + 4), this.y+8+3, chroma.getValue() ? RainbowUtil.getRainbow(4f, 0.8f, 0.85f) : mc.gameSettings.keyBindForward.pressed ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color), tshadow.getValue());
mc.fontRendererObj.drawString("S", this.x+25+5+(25/2-mc.fontRendererObj.getStringWidth("S") + 4), this.y+38, chroma.getValue() ? RainbowUtil.getRainbow(4f, 0.8f, 0.85f) : mc.gameSettings.keyBindBack.pressed ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color), tshadow.getValue());
mc.fontRendererObj.drawString("A", this.x+3+(25/2-mc.fontRendererObj.getStringWidth("A") + 4), this.y+38, chroma.getValue() ? RainbowUtil.getRainbow(4f, 0.8f, 0.85f) : mc.gameSettings.keyBindLeft.pressed ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color), tshadow.getValue());
mc.fontRendererObj.drawString("D", this.x+-3+25+25+10+(25/2-mc.fontRendererObj.getStringWidth("D") + 4), this.y+38, chroma.getValue() ? RainbowUtil.getRainbow(4f, 0.8f, 0.85f) : mc.gameSettings.keyBindRight.pressed ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color), tshadow.getValue());
if(jump.getValue())
mc.fontRendererObj.drawString("\u00A7m-------", this.x+85+(25/2-mc.fontRendererObj.getStringWidth("u00A7m-------") + 4), this.y+92-3, (chroma.getValue() ? RainbowUtil.getRainbow(4f, 0.8f, 0.85f) : mc.gameSettings.keyBindJump.pressed ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color)), tshadow.getValue());
if(sneak.getValue())
mc.fontRendererObj.drawString("Sneak", this.x+38+3+(25/2-mc.fontRendererObj.getStringWidth("Sneak") + 4), jump.getValue() ? this.y+92+15+1-3 : this.y+92-4, (chroma.getValue() ? RainbowUtil.getRainbow(4f, 0.8f, 0.85f) : mc.gameSettings.keyBindSneak.pressed ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color)), tshadow.getValue());
mc.fontRendererObj.drawString("LMB", this.x+3+40/2-mc.fontRendererObj.getStringWidth("LMB")/2, (this.y+60+25/2)-mc.fontRendererObj.FONT_HEIGHT/2-3, chroma.getValue() ? RainbowUtil.getRainbow(4f, 0.8f, 0.85f) : Mouse.isButtonDown(0) ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color), tshadow.getValue());
mc.fontRendererObj.drawString("RMB", this.x+40+3+40/2-mc.fontRendererObj.getStringWidth("RMB")/2, (this.y+60+25/2)-mc.fontRendererObj.FONT_HEIGHT/2-3, chroma.getValue() ? RainbowUtil.getRainbow(4f, 0.8f, 0.85f) : Mouse.isButtonDown(1) ? RenderUtils.getColor(colorp) : RenderUtils.getColor(color), tshadow.getValue());
GlStateManager.popMatrix();
GlStateManager.pushMatrix();
GlStateManager.translate(this.x + 1, this.y + 1, 0);
GlStateManager.translate(-(this.x + 1), -(this.y + 1), 0);
this.setHeight((25 + 5 + 25 + 5 + 25 + 25));
this.setWidth((25 + 5 + 25 + 5 + 30));
GlStateManager.popMatrix();
}
}