diff --git a/gradle.properties b/gradle.properties index 040b598ff9..9a35c18934 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,15 +5,15 @@ org.gradle.parallel=true # Fabric Properties # check these at https://fabricmc.net/develop/ and # https://modrinth.com/mod/fabric-api/versions -minecraft_version=1.21.1 -yarn_mappings=1.21.1+build.3 +minecraft_version=1.21 +yarn_mappings=1.21+build.9 loader_version=0.16.5 # Fabric API -fabric_version=0.105.0+1.21.1 +fabric_version=0.102.0+1.21 # Mod Properties -mod_version = v7.46.1-MC1.21.1 +mod_version = v7.46.1-MC1.21 maven_group = net.wurstclient archives_base_name = Wurst-Client diff --git a/src/main/java/net/wurstclient/WurstClient.java b/src/main/java/net/wurstclient/WurstClient.java index 18e523b3d3..f04ed52627 100644 --- a/src/main/java/net/wurstclient/WurstClient.java +++ b/src/main/java/net/wurstclient/WurstClient.java @@ -51,7 +51,7 @@ public enum WurstClient public static IMinecraftClient IMC; public static final String VERSION = "7.46.1"; - public static final String MC_VERSION = "1.21.1"; + public static final String MC_VERSION = "1.21"; private WurstAnalytics analytics; private EventManager eventManager; diff --git a/src/main/java/net/wurstclient/hack/HackList.java b/src/main/java/net/wurstclient/hack/HackList.java index 34c21a6b3c..77900f198a 100644 --- a/src/main/java/net/wurstclient/hack/HackList.java +++ b/src/main/java/net/wurstclient/hack/HackList.java @@ -49,6 +49,7 @@ public final class HackList implements UpdateListener public final AutoLeaveHack autoLeaveHack = new AutoLeaveHack(); public final AutoLibrarianHack autoLibrarianHack = new AutoLibrarianHack(); public final AutoEatHack autoEatHack = new AutoEatHack(); + public final AutoPlaceHack autoPlaceHack = new AutoPlaceHack(); public final AutoFarmHack autoFarmHack = new AutoFarmHack(); public final AutoFishHack autoFishHack = new AutoFishHack(); public final AutoMineHack autoMineHack = new AutoMineHack(); @@ -172,6 +173,7 @@ public final class HackList implements UpdateListener public final SpeedNukerHack speedNukerHack = new SpeedNukerHack(); public final SpiderHack spiderHack = new SpiderHack(); public final StepHack stepHack = new StepHack(); + public final TeamEspHack teamEspHack = new TeamEspHack(); public final TemplateToolHack templateToolHack = new TemplateToolHack(); public final ThrowHack throwHack = new ThrowHack(); public final TillauraHack tillauraHack = new TillauraHack(); diff --git a/src/main/java/net/wurstclient/hacks/AimAssistHack.java b/src/main/java/net/wurstclient/hacks/AimAssistHack.java index 35b21e01a1..3e8fa44445 100644 --- a/src/main/java/net/wurstclient/hacks/AimAssistHack.java +++ b/src/main/java/net/wurstclient/hacks/AimAssistHack.java @@ -12,6 +12,10 @@ import net.minecraft.client.gui.screen.ingame.HandledScreen; import net.minecraft.entity.Entity; +import net.minecraft.item.AxeItem; +import net.minecraft.item.Item; +import net.minecraft.item.Items; +import net.minecraft.item.SwordItem; import net.minecraft.util.math.Vec3d; import net.wurstclient.Category; import net.wurstclient.events.MouseUpdateListener; @@ -50,6 +54,10 @@ public final class AimAssistHack extends Hack "description.wurst.setting.aimassist.ignore_mouse_input", 0, 0, 1, 0.01, ValueDisplay.PERCENTAGE); + private final CheckboxSetting onlyHoldingWeapon = new CheckboxSetting( + "Only if holding weapon", + "Won't aim if not holding a weapon (Swords, axes & sticks.)", false); + private final CheckboxSetting checkLOS = new CheckboxSetting("Check line of sight", "description.wurst.setting.aimassist.check_line_of_sight", true); @@ -60,6 +68,8 @@ public final class AimAssistHack extends Hack private final EntityFilterList entityFilters = new EntityFilterList(FilterPlayersSetting.genericCombat(false), + FilterTeammatesSetting.genericCombat(false), + FilterNpcLikeSetting.genericCombat(false), FilterSleepingSetting.genericCombat(false), FilterFlyingSetting.genericCombat(0), FilterHostileSetting.genericCombat(false), @@ -103,6 +113,7 @@ public AimAssistHack() addSetting(ignoreMouseInput); addSetting(checkLOS); addSetting(aimWhileBlocking); + addSetting(onlyHoldingWeapon); entityFilters.forEach(this::addSetting); } @@ -142,6 +153,14 @@ public void onUpdate() if(MC.currentScreen instanceof HandledScreen) return; + Item itemInHand = MC.player.getInventory().getMainHandStack().getItem(); + if(onlyHoldingWeapon.isChecked() && !(itemInHand instanceof SwordItem + || itemInHand instanceof AxeItem || itemInHand == Items.STICK)) + { + target = null; + return; + } + if(!aimWhileBlocking.isChecked() && MC.player.isUsingItem()) return; diff --git a/src/main/java/net/wurstclient/hacks/AutoPlaceHack.java b/src/main/java/net/wurstclient/hacks/AutoPlaceHack.java new file mode 100644 index 0000000000..93f8e5eb71 --- /dev/null +++ b/src/main/java/net/wurstclient/hacks/AutoPlaceHack.java @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2014-2024 Wurst-Imperium and contributors. + * + * This source code is subject to the terms of the GNU General Public + * License, version 3. If a copy of the GPL was not distributed with this + * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt + */ +package net.wurstclient.hacks; + +import net.minecraft.client.gui.screen.ingame.HandledScreen; +import net.minecraft.client.network.ClientPlayerEntity; +import net.minecraft.item.BlockItem; +import net.minecraft.util.ActionResult; +import net.minecraft.util.Hand; +import net.minecraft.util.hit.BlockHitResult; +import net.minecraft.util.hit.HitResult; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.wurstclient.Category; +import net.wurstclient.SearchTags; +import net.wurstclient.events.UpdateListener; +import net.wurstclient.hack.Hack; +import net.wurstclient.settings.CheckboxSetting; +import net.wurstclient.util.BlockUtils; + +@SearchTags({"bridge", "auto place"}) +public final class AutoPlaceHack extends Hack implements UpdateListener +{ + private final CheckboxSetting onlyBelowFeet = + new CheckboxSetting("Only Below Feet", + "Only place blocks when target block is 1 block below your feet.", + false); + private final CheckboxSetting fastPlace = + new CheckboxSetting("Always FastPlace", + "Builds as if FastPlace was enabled, even if it's not.", true); + + public AutoPlaceHack() + { + super("AutoPlace"); + setCategory(Category.BLOCKS); + addSetting(onlyBelowFeet); + addSetting(fastPlace); + } + + @Override + public void onEnable() + { + EVENTS.add(UpdateListener.class, this); + } + + @Override + public void onDisable() + { + EVENTS.remove(UpdateListener.class, this); + } + + @Override + public void onUpdate() + { + if(MC.currentScreen instanceof HandledScreen) + return; + + if(MC.itemUseCooldown != 0 && !fastPlace.isChecked()) + return; + + ClientPlayerEntity player = MC.player; + assert player != null; + + // Item in hand is not a block + if(!(player.getInventory().getStack(player.getInventory().selectedSlot) + .getItem() instanceof BlockItem)) + return; + + HitResult hitResult = MC.crosshairTarget; + if(hitResult == null || hitResult.getType() != HitResult.Type.BLOCK) + return; + + BlockHitResult blockHitResult = (BlockHitResult)hitResult; + if(blockHitResult.getSide() == Direction.UP + || blockHitResult.getSide() == Direction.DOWN) + return; + + if(!BlockUtils.canBeClicked(blockHitResult.getBlockPos())) + return; + + BlockPos blockToPlacePos = + blockHitResult.getBlockPos().offset(blockHitResult.getSide()); + if(!BlockUtils.getState(blockToPlacePos).isReplaceable()) + return; + + // Option: only below feet + if(blockToPlacePos.getY() != BlockPos.ofFloored(MC.player.getPos()) + .down().getY() && onlyBelowFeet.isChecked()) + return; + + assert MC.interactionManager != null; + MC.interactionManager.interactItem(player, Hand.MAIN_HAND); + ActionResult actionResult = MC.interactionManager.interactBlock(player, + Hand.MAIN_HAND, blockHitResult); + if(actionResult.isAccepted()) + MC.player.swingHand(Hand.MAIN_HAND); + + MC.itemUseCooldown = 4; + } +} diff --git a/src/main/java/net/wurstclient/hacks/AutoReconnectHack.java b/src/main/java/net/wurstclient/hacks/AutoReconnectHack.java index 0eae7dcf44..b8ede2d3d9 100644 --- a/src/main/java/net/wurstclient/hacks/AutoReconnectHack.java +++ b/src/main/java/net/wurstclient/hacks/AutoReconnectHack.java @@ -11,6 +11,7 @@ import net.wurstclient.DontBlock; import net.wurstclient.SearchTags; import net.wurstclient.hack.Hack; +import net.wurstclient.settings.CheckboxSetting; import net.wurstclient.settings.SliderSetting; import net.wurstclient.settings.SliderSetting.ValueDisplay; @@ -18,6 +19,10 @@ @DontBlock public final class AutoReconnectHack extends Hack { + private final CheckboxSetting buttons = new CheckboxSetting( + "Reconnect screen button", "Shows a button on the reconnect" + + " screen that lets you quickly enable AutoReconnect.", + true); private final SliderSetting waitTime = new SliderSetting("Wait time", "Time before reconnecting in seconds.", 5, 0, 60, 0.5, ValueDisplay.DECIMAL.withSuffix("s")); @@ -26,9 +31,15 @@ public AutoReconnectHack() { super("AutoReconnect"); setCategory(Category.OTHER); + addSetting(buttons); addSetting(waitTime); } + public boolean shouldShowButtons() + { + return buttons.isChecked(); + } + public int getWaitTicks() { return (int)(waitTime.getValue() * 20); diff --git a/src/main/java/net/wurstclient/hacks/PlayerEspHack.java b/src/main/java/net/wurstclient/hacks/PlayerEspHack.java index dcd883fda8..4536885d7b 100644 --- a/src/main/java/net/wurstclient/hacks/PlayerEspHack.java +++ b/src/main/java/net/wurstclient/hacks/PlayerEspHack.java @@ -77,6 +77,7 @@ public PlayerEspHack() @Override protected void onEnable() { + WURST.getHax().teamEspHack.setEnabled(false); EVENTS.add(UpdateListener.class, this); EVENTS.add(CameraTransformViewBobbingListener.class, this); EVENTS.add(RenderListener.class, this); diff --git a/src/main/java/net/wurstclient/hacks/SafeWalkHack.java b/src/main/java/net/wurstclient/hacks/SafeWalkHack.java index 03d959434a..4db6d66e6d 100644 --- a/src/main/java/net/wurstclient/hacks/SafeWalkHack.java +++ b/src/main/java/net/wurstclient/hacks/SafeWalkHack.java @@ -21,6 +21,18 @@ "speed bridge helper"}) public final class SafeWalkHack extends Hack { + private final SliderSetting minDepth = new SliderSetting("Min depth", + "Won't sneak if it isn't at least this deep.\n" + + "Increase to stop SafeWalk from stucking on stairs.\n" + + "Decrease to make SafeWalk sneak even at the edge of carpets.", + 2.0, 0.1, 10, 0.1, ValueDisplay.DECIMAL.withSuffix("m")); + + private final SliderSetting motionPrediction = new SliderSetting( + "Motion prediction", + "Predict your motion to sneak earlier.\n" + + "If not stopping at edges, increase; If not stopping near a wall, decrease.", + 2.0, 1, 5, 0.5, ValueDisplay.DECIMAL.withSuffix("x")); + private final CheckboxSetting sneak = new CheckboxSetting("Sneak at edges", "Visibly sneak at edges.", false); @@ -36,6 +48,8 @@ public SafeWalkHack() { super("SafeWalk"); setCategory(Category.MOVEMENT); + addSetting(minDepth); + addSetting(motionPrediction); addSetting(sneak); addSetting(edgeDistance); } @@ -54,10 +68,25 @@ protected void onDisable() setSneaking(false); } - public void onClipAtLedge(boolean clipping) + public boolean shouldClip() { ClientPlayerEntity player = MC.player; + Box box = player.getBoundingBox(); + Box adjustedBox = box + .offset(player.getVelocity().multiply(motionPrediction.getValue())) + .stretch(0, -minDepth.getValue(), 0) + .expand(-edgeDistance.getValue(), 0, -edgeDistance.getValue()); + + return this.isEnabled() && MC.world.isSpaceEmpty(player, adjustedBox); + } + + public void onClipAtLedge() + { + boolean clipping = false; + + ClientPlayerEntity player = MC.player; + if(!isEnabled() || !sneak.isChecked() || !player.isOnGround()) { if(sneaking) @@ -67,7 +96,9 @@ public void onClipAtLedge(boolean clipping) } Box box = player.getBoundingBox(); - Box adjustedBox = box.stretch(0, -player.getStepHeight(), 0) + Box adjustedBox = box + .offset(player.getVelocity().multiply(motionPrediction.getValue())) + .stretch(0, -minDepth.getValue(), 0) .expand(-edgeDistance.getValue(), 0, -edgeDistance.getValue()); if(MC.world.isSpaceEmpty(player, adjustedBox)) diff --git a/src/main/java/net/wurstclient/hacks/TeamEspHack.java b/src/main/java/net/wurstclient/hacks/TeamEspHack.java new file mode 100644 index 0000000000..b5a7b60a7f --- /dev/null +++ b/src/main/java/net/wurstclient/hacks/TeamEspHack.java @@ -0,0 +1,240 @@ +/* + * Copyright (c) 2014-2024 Wurst-Imperium and contributors. + * + * This source code is subject to the terms of the GNU General Public + * License, version 3. If a copy of the GPL was not distributed with this + * file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt + */ +package net.wurstclient.hacks; + +import java.util.ArrayList; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import net.minecraft.client.render.*; +import net.minecraft.text.TextColor; +import net.wurstclient.settings.filters.FilterNpcLikeSetting; +import org.joml.Matrix4f; +import org.lwjgl.opengl.GL11; + +import com.mojang.blaze3d.systems.RenderSystem; + +import net.minecraft.client.network.AbstractClientPlayerEntity; +import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.client.world.ClientWorld; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.util.math.Box; +import net.minecraft.util.math.Vec3d; +import net.wurstclient.Category; +import net.wurstclient.SearchTags; +import net.wurstclient.events.CameraTransformViewBobbingListener; +import net.wurstclient.events.RenderListener; +import net.wurstclient.events.UpdateListener; +import net.wurstclient.hack.Hack; +import net.wurstclient.settings.EspBoxSizeSetting; +import net.wurstclient.settings.EspStyleSetting; +import net.wurstclient.settings.EspStyleSetting.EspStyle; +import net.wurstclient.settings.filterlists.EntityFilterList; +import net.wurstclient.settings.filters.FilterInvisibleSetting; +import net.wurstclient.settings.filters.FilterSleepingSetting; +import net.wurstclient.util.EntityUtils; +import net.wurstclient.util.FakePlayerEntity; +import net.wurstclient.util.RegionPos; +import net.wurstclient.util.RenderUtils; +import net.wurstclient.util.RotationUtils; + +// Pretty much just cloned from PlayerEspHack.java +@SearchTags({"team esp", "TeamTracers", "team tracers"}) +public final class TeamEspHack extends Hack implements UpdateListener, + CameraTransformViewBobbingListener, RenderListener +{ + private final EspStyleSetting style = + new EspStyleSetting(EspStyle.LINES_AND_BOXES); + + private final EspBoxSizeSetting boxSize = new EspBoxSizeSetting( + "\u00a7lAccurate\u00a7r mode shows the exact hitbox of each player.\n" + + "\u00a7lFancy\u00a7r mode shows slightly larger boxes that look better."); + + private final EntityFilterList entityFilters = + new EntityFilterList(FilterNpcLikeSetting.genericVision(false), + FilterSleepingSetting.genericVision(false), + FilterInvisibleSetting.genericVision(false)); + + private final ArrayList players = new ArrayList<>(); + + public TeamEspHack() + { + super("TeamESP"); + setCategory(Category.RENDER); + + addSetting(style); + addSetting(boxSize); + entityFilters.forEach(this::addSetting); + } + + @Override + protected void onEnable() + { + WURST.getHax().playerEspHack.setEnabled(false); + EVENTS.add(UpdateListener.class, this); + EVENTS.add(CameraTransformViewBobbingListener.class, this); + EVENTS.add(RenderListener.class, this); + } + + @Override + protected void onDisable() + { + EVENTS.remove(UpdateListener.class, this); + EVENTS.remove(CameraTransformViewBobbingListener.class, this); + EVENTS.remove(RenderListener.class, this); + } + + @Override + public void onUpdate() + { + PlayerEntity player = MC.player; + ClientWorld world = MC.world; + + players.clear(); + Stream stream = world.getPlayers() + .parallelStream().filter(e -> !e.isRemoved() && e.getHealth() > 0) + .filter(e -> e != player) + .filter(e -> !(e instanceof FakePlayerEntity)) + .filter(e -> Math.abs(e.getY() - MC.player.getY()) <= 1e6); + + stream = entityFilters.applyTo(stream); + + players.addAll(stream.collect(Collectors.toList())); + } + + @Override + public void onCameraTransformViewBobbing( + CameraTransformViewBobbingEvent event) + { + if(style.hasLines()) + event.cancel(); + } + + @Override + public void onRender(MatrixStack matrixStack, float partialTicks) + { + // GL settings + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + GL11.glDisable(GL11.GL_DEPTH_TEST); + + matrixStack.push(); + + RegionPos region = RenderUtils.getCameraRegion(); + RenderUtils.applyRegionalRenderOffset(matrixStack, region); + + // draw boxes + if(style.hasBoxes()) + renderBoxes(matrixStack, partialTicks, region); + + if(style.hasLines()) + renderTracers(matrixStack, partialTicks, region); + + matrixStack.pop(); + + // GL resets + RenderSystem.setShaderColor(1, 1, 1, 1); + GL11.glEnable(GL11.GL_DEPTH_TEST); + GL11.glDisable(GL11.GL_BLEND); + } + + private void renderBoxes(MatrixStack matrixStack, float partialTicks, + RegionPos region) + { + float extraSize = boxSize.getExtraSize(); + + for(PlayerEntity e : players) + { + matrixStack.push(); + + Vec3d lerpedPos = EntityUtils.getLerpedPos(e, partialTicks) + .subtract(region.toVec3d()); + matrixStack.translate(lerpedPos.x, lerpedPos.y, lerpedPos.z); + + matrixStack.scale(e.getWidth() + extraSize, + e.getHeight() + extraSize, e.getWidth() + extraSize); + + TextColor colorComponent = e.getDisplayName().getStyle().getColor(); + + float r = 0.8f, g = 0.8f, b = 0.8f; + + if(colorComponent != null) + { + int teamColor = colorComponent.getRgb(); + + b = (float)(teamColor % 256); + g = (float)(teamColor % 65536 / 256); + r = (float)(teamColor / 65536); + + b /= 256; + g /= 256; + r /= 256; + } + + RenderSystem.setShaderColor(r, g, b, 0.5F); + + Box bb = new Box(-0.5, 0, -0.5, 0.5, 1, 0.5); + RenderUtils.drawOutlinedBox(bb, matrixStack); + + matrixStack.pop(); + } + } + + private void renderTracers(MatrixStack matrixStack, float partialTicks, + RegionPos region) + { + if(players.isEmpty()) + return; + + RenderSystem.setShader(GameRenderer::getPositionColorProgram); + RenderSystem.setShaderColor(1, 1, 1, 1); + + Matrix4f matrix = matrixStack.peek().getPositionMatrix(); + + Tessellator tessellator = RenderSystem.renderThreadTesselator(); + BufferBuilder bufferBuilder = tessellator.begin( + VertexFormat.DrawMode.DEBUG_LINES, VertexFormats.POSITION_COLOR); + + Vec3d regionVec = region.toVec3d(); + Vec3d start = RotationUtils.getClientLookVec(partialTicks) + .add(RenderUtils.getCameraPos()).subtract(regionVec); + + for(PlayerEntity e : players) + { + Vec3d end = EntityUtils.getLerpedBox(e, partialTicks).getCenter() + .subtract(regionVec); + + TextColor colorComponent = e.getDisplayName().getStyle().getColor(); + + float r = 0.8f, g = 0.8f, b = 0.8f; + + if(colorComponent != null) + { + int teamColor = colorComponent.getRgb(); + + b = (float)(teamColor % 256); + g = (float)(teamColor % 65536 / 256); + r = (float)(teamColor / 65536); + + b /= 256; + g /= 256; + r /= 256; + } + + bufferBuilder + .vertex(matrix, (float)start.x, (float)start.y, (float)start.z) + .color(r, g, b, 0.5F); + + bufferBuilder + .vertex(matrix, (float)end.x, (float)end.y, (float)end.z) + .color(r, g, b, 0.5F); + } + + BufferRenderer.drawWithGlobalProgram(bufferBuilder.end()); + } +} diff --git a/src/main/java/net/wurstclient/hacks/TriggerBotHack.java b/src/main/java/net/wurstclient/hacks/TriggerBotHack.java index 814507736c..97729f93ff 100644 --- a/src/main/java/net/wurstclient/hacks/TriggerBotHack.java +++ b/src/main/java/net/wurstclient/hacks/TriggerBotHack.java @@ -10,6 +10,9 @@ import net.minecraft.client.gui.screen.ingame.HandledScreen; import net.minecraft.client.network.ClientPlayerEntity; import net.minecraft.entity.Entity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.registry.Registries; import net.minecraft.util.Hand; import net.minecraft.util.hit.EntityHitResult; import net.wurstclient.Category; @@ -18,11 +21,8 @@ import net.wurstclient.events.PreMotionListener; import net.wurstclient.hack.Hack; import net.wurstclient.mixinterface.IKeyBinding; -import net.wurstclient.settings.AttackSpeedSliderSetting; -import net.wurstclient.settings.CheckboxSetting; -import net.wurstclient.settings.SliderSetting; +import net.wurstclient.settings.*; import net.wurstclient.settings.SliderSetting.ValueDisplay; -import net.wurstclient.settings.SwingHandSetting; import net.wurstclient.settings.SwingHandSetting.SwingHand; import net.wurstclient.settings.filterlists.EntityFilterList; import net.wurstclient.util.EntityUtils; @@ -69,6 +69,11 @@ public final class TriggerBotHack extends Hack + " will not work while this option is enabled.", false); + private final ItemListSetting blacklistedItems = new ItemListSetting( + "Black-listed Items", + "Will not trigger when these item are in your hand, so you will never mis-click when you are in lobby.", + "minecraft:compass", "minecraft:clock"); + private final EntityFilterList entityFilters = EntityFilterList.genericCombat(); @@ -85,6 +90,7 @@ public TriggerBotHack() addSetting(swingHand); addSetting(attackWhileBlocking); addSetting(simulateMouseClick); + addSetting(blacklistedItems); entityFilters.forEach(this::addSetting); } @@ -145,6 +151,21 @@ public void onHandleInput() if(!attackWhileBlocking.isChecked() && player.isUsingItem()) return; + ItemStack stack = MC.player.getInventory().getMainHandStack(); + + if(stack.isEmpty()) + { + if(blacklistedItems.getItemNames().contains("minecraft:air")) + return; + }else + { + Item item = stack.getItem(); + String itemName = Registries.ITEM.getId(item).toString(); + + if(blacklistedItems.getItemNames().contains(itemName)) + return; + } + if(MC.crosshairTarget == null || !(MC.crosshairTarget instanceof EntityHitResult eResult)) return; diff --git a/src/main/java/net/wurstclient/mixin/ClientPlayerEntityMixin.java b/src/main/java/net/wurstclient/mixin/ClientPlayerEntityMixin.java index 2c3ab2e4c6..3813bf521a 100644 --- a/src/main/java/net/wurstclient/mixin/ClientPlayerEntityMixin.java +++ b/src/main/java/net/wurstclient/mixin/ClientPlayerEntityMixin.java @@ -270,7 +270,7 @@ protected float getJumpVelocity() protected boolean clipAtLedge() { return super.clipAtLedge() - || WurstClient.INSTANCE.getHax().safeWalkHack.isEnabled(); + || WurstClient.INSTANCE.getHax().safeWalkHack.shouldClip(); } /** @@ -283,8 +283,7 @@ protected Vec3d adjustMovementForSneaking(Vec3d movement, MovementType type) Vec3d result = super.adjustMovementForSneaking(movement, type); if(movement != null) - WurstClient.INSTANCE.getHax().safeWalkHack - .onClipAtLedge(!movement.equals(result)); + WurstClient.INSTANCE.getHax().safeWalkHack.onClipAtLedge(); return result; } diff --git a/src/main/java/net/wurstclient/mixin/DisconnectedScreenMixin.java b/src/main/java/net/wurstclient/mixin/DisconnectedScreenMixin.java index dad7da24b7..170a09e78e 100644 --- a/src/main/java/net/wurstclient/mixin/DisconnectedScreenMixin.java +++ b/src/main/java/net/wurstclient/mixin/DisconnectedScreenMixin.java @@ -70,7 +70,8 @@ private void onInit(CallbackInfo ci) return; } - addReconnectButtons(); + if(WurstClient.INSTANCE.getHax().autoReconnectHack.shouldShowButtons()) + addReconnectButtons(); } private void addReconnectButtons() diff --git a/src/main/java/net/wurstclient/settings/filterlists/EntityFilterList.java b/src/main/java/net/wurstclient/settings/filterlists/EntityFilterList.java index 68aad62b78..51db92511f 100644 --- a/src/main/java/net/wurstclient/settings/filterlists/EntityFilterList.java +++ b/src/main/java/net/wurstclient/settings/filterlists/EntityFilterList.java @@ -62,6 +62,8 @@ public final boolean testOne(Entity entity) public static EntityFilterList genericCombat() { return new EntityFilterList(FilterPlayersSetting.genericCombat(false), + FilterTeammatesSetting.genericCombat(false), + FilterNpcLikeSetting.genericCombat(false), FilterSleepingSetting.genericCombat(false), FilterFlyingSetting.genericCombat(0), FilterHostileSetting.genericCombat(false), diff --git a/src/main/java/net/wurstclient/settings/filters/FilterNpcLikeSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterNpcLikeSetting.java new file mode 100644 index 0000000000..82f3a8d2c7 --- /dev/null +++ b/src/main/java/net/wurstclient/settings/filters/FilterNpcLikeSetting.java @@ -0,0 +1,68 @@ +package net.wurstclient.settings.filters; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.player.PlayerEntity; + +public final class FilterNpcLikeSetting extends EntityFilterCheckbox +{ + public FilterNpcLikeSetting(String description, boolean checked) + { + super("Filter NPC-like", description, checked); + } + + @Override + public boolean test(Entity e) + { + if(!(e instanceof PlayerEntity)) + return true; + + String name = e.getName().getString(); + if(name.length() != 10) + return true; + + int letters = 0, digits = 0, maxLetters = 0, maxDigits = 0; + for(int c : name.chars().toArray()) + { + if(Character.isDigit(c)) + { + letters = 0; + digits += 1; + }else if(Character.isLetter(c) && Character.isLowerCase(c)) + { + digits = 0; + letters += 1; + }else + { + return true; + } + + if(letters > maxLetters) + maxLetters = letters; + if(digits > maxDigits) + maxDigits = digits; + } + + if(maxDigits == 0) + return true; + if(maxLetters >= 4 && maxDigits >= 4) + return true; + if(maxLetters >= 5) + return true; + + return false; + } + + public static FilterNpcLikeSetting genericCombat(boolean checked) + { + return new FilterNpcLikeSetting( + "Won't attack NPC-like players (Sort by Hypixel NPC names.)", + checked); + } + + public static FilterNpcLikeSetting genericVision(boolean checked) + { + return new FilterNpcLikeSetting( + "Won't show NPC-like players (Sort by Hypixel NPC names.)", + checked); + } +} diff --git a/src/main/java/net/wurstclient/settings/filters/FilterTeammatesSetting.java b/src/main/java/net/wurstclient/settings/filters/FilterTeammatesSetting.java new file mode 100644 index 0000000000..a90ff5dc5d --- /dev/null +++ b/src/main/java/net/wurstclient/settings/filters/FilterTeammatesSetting.java @@ -0,0 +1,47 @@ +package net.wurstclient.settings.filters; + +import net.minecraft.entity.Entity; +import net.minecraft.text.Text; +import net.minecraft.text.TextColor; +import net.wurstclient.WurstClient; + +public final class FilterTeammatesSetting extends EntityFilterCheckbox +{ + public FilterTeammatesSetting(String description, boolean checked) + { + super("Filter teammates", description, checked); + } + + @Override + public boolean test(Entity e) + { + Text theirName = e.getDisplayName(); + if(theirName == null) + return false; + TextColor theirColor = theirName.getStyle().getColor(); + if(theirColor == null) + return false; + + assert WurstClient.MC.player != null; + Text myName = WurstClient.MC.player.getDisplayName(); + if(myName == null) + return false; + TextColor myColor = myName.getStyle().getColor(); + if(myColor == null) + return false; + + return !theirColor.equals(myColor); + } + + public static FilterTeammatesSetting genericCombat(boolean checked) + { + return new FilterTeammatesSetting( + "Won't attack players with the same name tag color.", checked); + } + + public static FilterTeammatesSetting genericVision(boolean checked) + { + return new FilterTeammatesSetting( + "Won't show players with the same name tag color.", checked); + } +} diff --git a/src/main/resources/assets/wurst/translations/en_us.json b/src/main/resources/assets/wurst/translations/en_us.json index 3b81bbd6a6..6eb18d283c 100644 --- a/src/main/resources/assets/wurst/translations/en_us.json +++ b/src/main/resources/assets/wurst/translations/en_us.json @@ -40,6 +40,7 @@ "description.wurst.hack.autolibrarian": "Automatically trains a villager to become a librarian that sells a specific enchanted book. You can set up an entire trading hall in no time by using this hack.", "description.wurst.setting.autolibrarian.swing_hand": "How AutoLibrarian should swing your hand when interacting with the villager and job site.", "description.wurst.hack.autoeat": "Automatically eats food when necessary.", + "description.wurst.hack.autoplace": "Right click when your crosshair is pointing to a side face of a block.", "description.wurst.setting.autoeat.target_hunger": "Tries to keep the hunger bar at or above this level, but only if it doesn't waste any hunger points.", "description.wurst.setting.autoeat.min_hunger": "Always keeps the hunger bar at or above this level, even if it wastes some hunger points.\n6.5 - Cannot cause any waste with vanilla food items.\n10.0 - Completely ignores waste and just keeps the hunger bar full.", "description.wurst.setting.autoeat.injured_hunger": "Fills the hunger bar to at least this level when you are injured, even if it wastes some hunger points.\n10.0 - fastest healing\n9.0 - slowest healing\n<9.0 - no healing\n<3.5 - no sprinting", @@ -217,6 +218,7 @@ "description.wurst.hack.spider": "Allows you to climb up walls like a spider.", "description.wurst.hack.step": "Allows you to step up full blocks.", "description.wurst.hack.templatetool": "Allows you to create custom templates for AutoBuild by scanning existing buildings.", + "description.wurst.hack.teamesp": "Highlights nearby teammates/enemies.\nESP boxes will appear in the same color of their name tag.", "description.wurst.hack.throw": "Uses an item multiple times. Can be used to throw snowballs and eggs, spawn mobs, place minecarts, etc. in very large quantities.\n\nThis can cause a lot of lag and even crash a server.", "description.wurst.hack.tillaura": "Automatically turns dirt, grass, etc. into farmland.\nNot to be confused with Killaura.", "description.wurst.hack.timer": "Changes the speed of almost everything.", diff --git a/src/main/resources/assets/wurst/translations/zh_tw.json b/src/main/resources/assets/wurst/translations/zh_tw.json index fdd5596fa0..acb19123f1 100644 --- a/src/main/resources/assets/wurst/translations/zh_tw.json +++ b/src/main/resources/assets/wurst/translations/zh_tw.json @@ -16,6 +16,7 @@ "description.wurst.hack.autodrop": "自動丟棄你不想要的物品(有預設)。", "description.wurst.hack.autoleave": "如果你的血量低於設定值,將會自動退出伺服器。", "description.wurst.hack.autoeat": "當必要的時候將會自動進食。", + "description.wurst.hack.bridgeclick": "當你的準心對準方塊側面時自動按右鍵。", "description.wurst.setting.autoeat.target_hunger": "嘗試將飢餓值保持在或高於此水平,但前提是它不會浪費任何飢餓值。", "description.wurst.setting.autoeat.min_hunger": "始終將飢餓條保持在此水平或以上,即使它會浪費一些飢餓點。\n6.5 - 不會對香草食品造成任何浪費。\n10.0 - 完全忽略浪費並保持飢餓條充滿。", "description.wurst.setting.autoeat.injured_hunger": "當你受傷時,將飢餓條填充到至少這個水平,即使它會浪費一些飢餓點。\n10.0 - 最快的治療\n9.0 - 最慢的治療\n<9.0 - 沒有治療\n<3.5 - 沒有衝刺", @@ -143,6 +144,7 @@ "description.wurst.hack.step": "允許你走上更高高度(取決於你的設定)的格子方塊。", "description.wurst.hack.throw": "迅速丟你手中種類的物品,可以用於丟雪球、雞蛋、刷怪蛋、礦車,諸如此類。\n\n會生成大量的數量,這會產生大量的lag且可能會導致服務器崩潰。", "description.wurst.hack.tillaura": "自動將泥土、草塊、諸如此類。轉化為耕地。\n不要和Killaura搞混。", + "description.wurst.hack.teamesp": "高亮透視附近的隊友或敵人。\n會顯示跟他們的名字標籤同樣顏色的框框。", "description.wurst.hack.timer": "改變大部分東西的速度。", "description.wurst.hack.tired": "讓你看起來很像2015年的Alexander。\n僅限其他玩家可視。", "description.wurst.hack.toomanyhax": "關閉那些你並不想要使用的功能。\n讓你確保你不會不小心開啟錯誤的作弊功能導致被服務器封禁。\n這個是給那些“只想作弊一點點的用戶”。\n\n使用指令§6. toomanyhax§r來選擇哪些功能需要被遮罩。\n輸入§6. help toomanyhax§r尋求更多。",