CrystalOptimizer toggleable

This commit is contained in:
UnknownUser1789 2023-01-21 02:14:25 +00:00
parent de513f4329
commit 8485628c31
10 changed files with 26593 additions and 90848 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -24,6 +24,7 @@ import dev.resent.module.impl.misc.AutoRespawn;
import dev.resent.module.impl.misc.ClearChat; import dev.resent.module.impl.misc.ClearChat;
import dev.resent.module.impl.misc.Cosmetics; import dev.resent.module.impl.misc.Cosmetics;
import dev.resent.module.impl.misc.Crosshair; import dev.resent.module.impl.misc.Crosshair;
import dev.resent.module.impl.misc.CrystalOptimizer;
import dev.resent.module.impl.misc.DynamicFOV; import dev.resent.module.impl.misc.DynamicFOV;
import dev.resent.module.impl.misc.FPSB; import dev.resent.module.impl.misc.FPSB;
import dev.resent.module.impl.misc.Fullbright; import dev.resent.module.impl.misc.Fullbright;
@ -80,11 +81,13 @@ public class ModManager {
public static ServerInfo serverInfo; public static ServerInfo serverInfo;
public static Crosshair crosshair = new Crosshair(); public static Crosshair crosshair = new Crosshair();
public static HUD hud = new HUD(); public static HUD hud = new HUD();
public static CrystalOptimizer crystalOptimizer = new CrystalOptimizer();
public ModManager() { public ModManager() {
//Hud //Hud
register(cosmetics); register(cosmetics);
register(hotbar); register(hotbar);
register(crystalOptimizer);
register(hud = new HUD()); register(hud = new HUD());
register(ping = new Ping()); register(ping = new Ping());
register(serverInfo = new ServerInfo()); register(serverInfo = new ServerInfo());

View File

@ -0,0 +1,11 @@
package dev.resent.module.impl.misc;
import dev.resent.module.base.Category;
import dev.resent.module.base.Mod;
public class CrystalOptimizer extends Mod{
public CrystalOptimizer(){
super("Crystal Fast", Category.MISC);
}
}

View File

@ -1,6 +1,9 @@
package net.lax1dude.eaglercraft.v1_8.socket; package net.lax1dude.eaglercraft.v1_8.socket;
import java.io.IOException; import java.io.IOException;
import dev.resent.module.base.ModManager;
import dev.resent.module.impl.misc.CrystalOptimizer;
import net.lax1dude.eaglercraft.v1_8.internal.EnumEaglerConnectionState; import net.lax1dude.eaglercraft.v1_8.internal.EnumEaglerConnectionState;
import net.lax1dude.eaglercraft.v1_8.internal.PlatformNetworking; import net.lax1dude.eaglercraft.v1_8.internal.PlatformNetworking;
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
@ -12,6 +15,7 @@ import net.minecraft.network.EnumPacketDirection;
import net.minecraft.network.INetHandler; import net.minecraft.network.INetHandler;
import net.minecraft.network.Packet; import net.minecraft.network.Packet;
import net.minecraft.network.PacketBuffer; import net.minecraft.network.PacketBuffer;
import net.minecraft.network.play.client.C02PacketUseEntity;
import net.minecraft.util.ChatComponentTranslation; import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.util.IChatComponent; import net.minecraft.util.IChatComponent;

View File

@ -276,7 +276,7 @@ public class PlayerControllerMP {
* player reach distance = 4F * player reach distance = 4F
*/ */
public float getBlockReachDistance() { public float getBlockReachDistance() {
return this.currentGameType.isCreative() ? 5.0F : 3.4F; return this.currentGameType.isCreative() ? 5.0F : 4.5F;
} }
public void updateController() { public void updateController() {

View File

@ -270,6 +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 && !test) { if (d0 > 3.0D && !test) {
flag = true; flag = true;
} }

View File

@ -8,6 +8,7 @@ import com.google.common.collect.Lists;
import dev.resent.Resent; import dev.resent.Resent;
import dev.resent.event.impl.Event.EventType; import dev.resent.event.impl.Event.EventType;
import dev.resent.module.base.ModManager;
import dev.resent.event.impl.EventAttack; import dev.resent.event.impl.EventAttack;
import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile; import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile;
@ -995,17 +996,18 @@ public abstract class EntityPlayer extends EntityLivingBase implements ICommandS
event.setType(EventType.pre); event.setType(EventType.pre);
Resent.onEvent(event); Resent.onEvent(event);
MovingObjectPosition entityHitResult;
MovingObjectPosition hitResult = Minecraft.getMinecraft().objectMouseOver; MovingObjectPosition hitResult = Minecraft.getMinecraft().objectMouseOver;
if (hitResult == null)
if (hitResult == null) {
return; return;
if (hitResult.typeOfHit == MovingObjectType.ENTITY && ModManager.crystalOptimizer.isEnabled()) {
MovingObjectPosition entityHitResult = hitResult;
Entity asdf = entityHitResult.entityHit;
if (asdf instanceof EntityEnderCrystal) {
assert Minecraft.getMinecraft().thePlayer != null;
asdf.kill();
asdf.setDead();
asdf.onKillEntity((EntityLivingBase)asdf);
} }
if (hitResult.typeOfHit == MovingObjectType.ENTITY && (entity = (entityHitResult = (MovingObjectPosition) hitResult).entityHit) instanceof EntityEnderCrystal) {
entity.kill();
entity.setDead();
entity.onKillEntity((EntityLivingBase)entity);
} }
if (entity.canAttackWithItem()) { if (entity.canAttackWithItem()) {