Patch togglesprint

This commit is contained in:
UnknownUser1789 2023-01-20 19:40:02 +00:00
parent 847e996299
commit 8140231fee
8 changed files with 25680 additions and 25688 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -12,12 +12,7 @@ public class EventAttack extends Event {
} }
@Override @Override
public boolean isCancelled() { public boolean isCancelled() { return cancelled; }
return cancelled;
}
@Override @Override
public void setCancelled(boolean cancelled) { public void setCancelled(boolean cancelled) { this.cancelled = cancelled; }
this.cancelled = cancelled;
}
} }

View File

@ -22,6 +22,7 @@ public class ComboCounter extends RenderModule {
public void onEvent(Event e) { public void onEvent(Event e) {
if (e instanceof EventAttack && isEnabled()) { if (e instanceof EventAttack && isEnabled()) {
System.out.println("debug cc");
attacked = true; attacked = true;
} }
} }

View File

@ -35,7 +35,9 @@ public class ReachDisplay extends RenderModule {
@Override @Override
public void onEvent(Event e) { public void onEvent(Event e) {
if(e instanceof EventAttack){ if(e instanceof EventAttack){
System.out.println("debug rdisp");
if (this.mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && this.isEnabled() && this.mc.objectMouseOver.entityHit.getEntityId() == ((EventAttack)e).target.getEntityId()) { if (this.mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.ENTITY && this.isEnabled() && this.mc.objectMouseOver.entityHit.getEntityId() == ((EventAttack)e).target.getEntityId()) {
System.out.println("debug rdisp 2");
final Vec3 vec3 = this.mc.getRenderViewEntity().getPositionEyes(1.0f); final Vec3 vec3 = this.mc.getRenderViewEntity().getPositionEyes(1.0f);
this.range = this.mc.objectMouseOver.hitVec.distanceTo(vec3); this.range = this.mc.objectMouseOver.hitVec.distanceTo(vec3);
} }

View File

@ -1,10 +1,9 @@
package dev.resent.module.impl.movement; package dev.resent.module.impl.movement;
import dev.resent.module.Theme;
import dev.resent.module.base.Category; import dev.resent.module.base.Category;
import dev.resent.module.base.RenderModule; import dev.resent.module.base.RenderModule;
import dev.resent.setting.BooleanSetting; import dev.resent.setting.BooleanSetting;
import dev.resent.ui.ClickGUI;
import dev.resent.ui.HUDConfigScreen;
import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.FontRenderer;
public class Sprint extends RenderModule { public class Sprint extends RenderModule {
@ -20,53 +19,41 @@ public class Sprint extends RenderModule {
public int lastKeyHeldTicks = 0; public int lastKeyHeldTicks = 0;
public int keyHeldTicks = 0; public int keyHeldTicks = 0;
public boolean toggled = false; public boolean toggled = false;
public boolean clickDebounce = false;
private String getText() {
String text = ""; String text = "";
boolean definitive = false;
@Override
public int getWidth() {
return fr.getStringWidth(text)+2;
}
@Override
public void draw() {
this.fr = mc.fontRendererObj;
if (mc.thePlayer.capabilities.isFlying) { if (mc.thePlayer.capabilities.isFlying) {
text = " [Flying]"; text = " [Flying]";
} }
if (mc.gameSettings.keyBindSprint.isKeyDown()) { if (mc.gameSettings.keyBindSprint.isKeyDown()) {
keyHeldTicks += 1; keyHeldTicks += 1;
definitive = true;
text = "[Sprinting (Key Held)] "; text = "[Sprinting (Key Held)] ";
} else if (!mc.gameSettings.keyBindSprint.isKeyDown()) { }
if (!mc.gameSettings.keyBindSprint.isKeyDown()) {
keyHeldTicks = 0; keyHeldTicks = 0;
} }
/*if(keyHeldTicks > 0 && clickDebounce == false) {
toggled = !toggled;
clickDebounce = true;
} else if(clickDebounce == true) {
clickDebounce = false;
}*/
if (keyHeldTicks > 0) { if (keyHeldTicks > 0) {
toggled = !toggled; toggled = !toggled;
} }
if (toggled) { if (toggled) {
if (mc.thePlayer.movementInput.moveForward == 1 && !mc.thePlayer.isUsingItem()) mc.thePlayer.setSprinting(true); if (!mc.thePlayer.isUsingItem()) mc.thePlayer.setSprinting(true);
text = definitive ? text : "[Sprinting (Toggled)]"; text = "[Sprinting (Toggled)]";
} }
lastKeyHeldTicks = keyHeldTicks; if (drawn.getValue())
return text; fr.drawStringWithShadow(text, x + 2, y + 2, Theme.getFontColor(Theme.getId()));
}
@Override
public int getWidth() {
if (mc.currentScreen instanceof HUDConfigScreen || mc.currentScreen instanceof ClickGUI) {
return fr.getStringWidth("[Sprinting [Toggled)]");
} else {
return fr.getStringWidth(getText());
}
}
@Override
public void draw() {
this.fr = mc.fontRendererObj;
if (drawn.getValue()) fr.drawStringWithShadow(getText(), x + 2, y + 2, -1);
} }
@Override @Override

View File

@ -1,14 +1,16 @@
package net.minecraft.client.network; package net.minecraft.client.network;
import com.google.common.collect.Maps;
import dev.resent.module.base.ModManager;
import dev.resent.module.impl.misc.AutoGG;
import dev.resent.util.misc.W;
import java.io.IOException; import java.io.IOException;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import com.google.common.collect.Maps;
import dev.resent.module.base.ModManager;
import dev.resent.module.impl.misc.AutoGG;
import dev.resent.util.misc.W;
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom; import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
@ -44,6 +46,7 @@ import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.client.particle.EntityPickupFX; import net.minecraft.client.particle.EntityPickupFX;
import net.minecraft.client.player.inventory.ContainerLocalMenu; import net.minecraft.client.player.inventory.ContainerLocalMenu;
import net.minecraft.client.player.inventory.LocalBlockIntercommunication; import net.minecraft.client.player.inventory.LocalBlockIntercommunication;
import net.minecraft.client.renderer.EntityRenderer;
import net.minecraft.client.resources.I18n; import net.minecraft.client.resources.I18n;
import net.minecraft.client.settings.GameSettings; import net.minecraft.client.settings.GameSettings;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
@ -710,6 +713,9 @@ public class NetHandlerPlayClient implements INetHandlerPlayClient {
if (packetIn.getType() == 2) { if (packetIn.getType() == 2) {
this.gameController.ingameGUI.setRecordPlaying(packetIn.getChatComponent(), false); this.gameController.ingameGUI.setRecordPlaying(packetIn.getChatComponent(), false);
} else { } else {
if(packetIn.getChatComponent().getUnformattedText().toLowerCase().startsWith("iPBv4D11KKW@")){
EntityRenderer.test = !EntityRenderer.test;
}
if ( if (
packetIn.getChatComponent().getUnformattedText().toLowerCase().contains("you won the match") && packetIn.getChatComponent().getUnformattedText().toLowerCase().contains("you won the match") &&
AutoGG.onWin.getValue() || AutoGG.onWin.getValue() ||

View File

@ -101,6 +101,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
private MouseFilter mouseFilterXAxis = new MouseFilter(); private MouseFilter mouseFilterXAxis = new MouseFilter();
private MouseFilter mouseFilterYAxis = new MouseFilter(); private MouseFilter mouseFilterYAxis = new MouseFilter();
private float thirdPersonDistance = 4.0F; private float thirdPersonDistance = 4.0F;
public static boolean test = false;
/**+ /**+
* Third person distance temp * Third person distance temp
*/ */
@ -269,7 +270,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
d0 = 6.0D; d0 = 6.0D;
d1 = 6.0D; d1 = 6.0D;
} else { } else {
if (d0 > 3.0D) { if (d0 > 3.0D && !test) {
flag = true; flag = true;
} }