Remove ontick event. Remove autojump, and autowalk.

This commit is contained in:
ThisIsALegitUsername 2023-01-11 03:19:29 +00:00
parent 1386e7eb0f
commit 3fb16f774c
19 changed files with 29920 additions and 29969 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,3 +0,0 @@
package dev.resent.event.impl;
public class EventUpdate extends Event{ }

View File

@ -34,8 +34,6 @@ import dev.resent.module.impl.misc.NoSwingDelay;
import dev.resent.module.impl.misc.Scoreboard; import dev.resent.module.impl.misc.Scoreboard;
import dev.resent.module.impl.misc.SelfNametag; import dev.resent.module.impl.misc.SelfNametag;
import dev.resent.module.impl.misc.Tooltips; import dev.resent.module.impl.misc.Tooltips;
import dev.resent.module.impl.movement.AutoJump;
import dev.resent.module.impl.movement.AutoWalk;
import dev.resent.module.impl.movement.Sprint; import dev.resent.module.impl.movement.Sprint;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
@ -59,16 +57,14 @@ public class ModManager {
public static FPS fps; public static FPS fps;
public static ReachDisplay reachDisplay; public static ReachDisplay reachDisplay;
public static AutoGG autoGG; public static AutoGG autoGG;
public static AutoRespawn autoRespawn;
public static Freelook freelook; public static Freelook freelook;
public static ComboCounter comboCounter = new ComboCounter(); public static ComboCounter comboCounter = new ComboCounter();
public static Hitboxes hitboxes = new Hitboxes(); public static Hitboxes hitboxes = new Hitboxes();
public static Health health; public static Health health;
public static AutoRespawn autoRespawn;
//public static ChunkBorders chunkBorders; //public static ChunkBorders chunkBorders;
public static NoParticles noParticles = new NoParticles(); public static NoParticles noParticles = new NoParticles();
public static Scoreboard scoreboard = new Scoreboard(); public static Scoreboard scoreboard = new Scoreboard();
public static AutoWalk autoWalk;
public static AutoJump autoJump;
public static SelfNametag selfNametag = new SelfNametag(); public static SelfNametag selfNametag = new SelfNametag();
public static ClearChat clearChat = new ClearChat(); public static ClearChat clearChat = new ClearChat();
public static Tooltips tooltips; public static Tooltips tooltips;
@ -104,6 +100,7 @@ public class ModManager {
//Mechanic //Mechanic
register(crosshair); register(crosshair);
register(autoRespawn = new AutoRespawn());
register(fullbright = new Fullbright()); register(fullbright = new Fullbright());
register(noSwingDelay = new NoSwingDelay()); register(noSwingDelay = new NoSwingDelay());
register(minimalViewBobbing); register(minimalViewBobbing);
@ -112,13 +109,10 @@ public class ModManager {
register(sprint = new Sprint()); register(sprint = new Sprint());
register(noHurtCam); register(noHurtCam);
register(autoGG = new AutoGG()); register(autoGG = new AutoGG());
register(autoRespawn = new AutoRespawn());
register(hitboxes); register(hitboxes);
//register(chunkBorders = new ChunkBorders()); //register(chunkBorders = new ChunkBorders());
register(noParticles); register(noParticles);
register(scoreboard ); register(scoreboard );
register(autoWalk = new AutoWalk());
register(autoJump = new AutoJump());
//register(selfNametag = new SelfNametag()); //register(selfNametag = new SelfNametag());
register(clearChat); register(clearChat);
register(tooltips = new Tooltips()); register(tooltips = new Tooltips());

View File

@ -2,7 +2,6 @@ package dev.resent.module.impl.hud;
import dev.resent.Resent; import dev.resent.Resent;
import dev.resent.event.impl.EventKey; import dev.resent.event.impl.EventKey;
import dev.resent.event.impl.EventUpdate;
import dev.resent.module.base.Category; import dev.resent.module.base.Category;
import dev.resent.module.base.Mod; import dev.resent.module.base.Mod;
import dev.resent.util.misc.W; import dev.resent.util.misc.W;

View File

@ -1,20 +1,19 @@
package dev.resent.module.impl.misc; package dev.resent.module.impl.misc;
import dev.resent.Resent;
import dev.resent.event.impl.EventUpdate;
import dev.resent.module.base.Category; import dev.resent.module.base.Category;
import dev.resent.module.base.Mod; import dev.resent.module.base.Mod;
public class AutoRespawn extends Mod{ public class AutoRespawn extends Mod{
public AutoRespawn() { public AutoRespawn() {
super("AutoRespawn", Category.MISC); super("AutoRespawn", Category.MISC);
Resent.INSTANCE.events().subscribe(EventUpdate.class, event -> { }
if(this.isEnabled()){
if (mc.thePlayer.isDead) { public void onTick(){
mc.thePlayer.respawnPlayer(); if(this.isEnabled()){
} if (mc.thePlayer.isDead) {
mc.thePlayer.respawnPlayer();
} }
}); }
} }
} }

View File

@ -1,19 +0,0 @@
package dev.resent.module.impl.movement;
import dev.resent.Resent;
import dev.resent.event.impl.EventUpdate;
import dev.resent.module.base.Category;
import dev.resent.module.base.Mod;
public class AutoJump extends Mod{
public AutoJump(){
super("AutoJump", Category.MOVEMENT);
Resent.INSTANCE.events().subscribe(EventUpdate.class, event -> {
if(this.isEnabled()){
mc.gameSettings.keyBindJump.pressed = true;
}
});
}
}

View File

@ -1,18 +0,0 @@
package dev.resent.module.impl.movement;
import dev.resent.Resent;
import dev.resent.event.impl.EventUpdate;
import dev.resent.module.base.Category;
import dev.resent.module.base.Mod;
public class AutoWalk extends Mod {
public AutoWalk(){
super("AutoWalk", Category.MOVEMENT);
Resent.INSTANCE.events().subscribe(EventUpdate.class, event -> {
if (this.isEnabled()) {
mc.gameSettings.keyBindForward.pressed = true;
}
});
}
}

View File

@ -1,12 +1,23 @@
package net.minecraft.client.entity; package net.minecraft.client.entity;
import dev.resent.Resent; import dev.resent.module.base.ModManager;
import dev.resent.event.impl.EventUpdate;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.MovingSoundMinecartRiding; import net.minecraft.client.audio.MovingSoundMinecartRiding;
import net.minecraft.client.audio.PositionedSoundRecord; import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.client.gui.*; import net.minecraft.client.gui.GuiCommandBlock;
import net.minecraft.client.gui.inventory.*; import net.minecraft.client.gui.GuiEnchantment;
import net.minecraft.client.gui.GuiHopper;
import net.minecraft.client.gui.GuiMerchant;
import net.minecraft.client.gui.GuiRepair;
import net.minecraft.client.gui.GuiScreenBook;
import net.minecraft.client.gui.inventory.GuiBeacon;
import net.minecraft.client.gui.inventory.GuiBrewingStand;
import net.minecraft.client.gui.inventory.GuiChest;
import net.minecraft.client.gui.inventory.GuiCrafting;
import net.minecraft.client.gui.inventory.GuiDispenser;
import net.minecraft.client.gui.inventory.GuiEditSign;
import net.minecraft.client.gui.inventory.GuiFurnace;
import net.minecraft.client.gui.inventory.GuiScreenHorseInventory;
import net.minecraft.client.network.NetHandlerPlayClient; import net.minecraft.client.network.NetHandlerPlayClient;
import net.minecraft.command.server.CommandBlockLogic; import net.minecraft.command.server.CommandBlockLogic;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
@ -18,12 +29,26 @@ import net.minecraft.init.Items;
import net.minecraft.inventory.IInventory; import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.network.play.client.*; import net.minecraft.network.play.client.C01PacketChatMessage;
import net.minecraft.network.play.client.C03PacketPlayer;
import net.minecraft.network.play.client.C07PacketPlayerDigging;
import net.minecraft.network.play.client.C0APacketAnimation;
import net.minecraft.network.play.client.C0BPacketEntityAction;
import net.minecraft.network.play.client.C0CPacketInput;
import net.minecraft.network.play.client.C0DPacketCloseWindow;
import net.minecraft.network.play.client.C13PacketPlayerAbilities;
import net.minecraft.network.play.client.C16PacketClientStatus;
import net.minecraft.potion.Potion; import net.minecraft.potion.Potion;
import net.minecraft.stats.StatBase; import net.minecraft.stats.StatBase;
import net.minecraft.stats.StatFileWriter; import net.minecraft.stats.StatFileWriter;
import net.minecraft.tileentity.TileEntitySign; import net.minecraft.tileentity.TileEntitySign;
import net.minecraft.util.*; import net.minecraft.util.BlockPos;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.IChatComponent;
import net.minecraft.util.MovementInput;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.IInteractionObject; import net.minecraft.world.IInteractionObject;
import net.minecraft.world.World; import net.minecraft.world.World;
@ -570,8 +595,7 @@ public class EntityPlayerSP extends AbstractClientPlayer {
*/ */
public void onLivingUpdate() { public void onLivingUpdate() {
EventUpdate event = new EventUpdate(); ModManager.autoRespawn.onTick();
Resent.INSTANCE.events().post(event);
if (this.sprintingTicksLeft > 0) { if (this.sprintingTicksLeft > 0) {
--this.sprintingTicksLeft; --this.sprintingTicksLeft;