From 3e1e2affdb55fc8e1c9791281463659f3f841444 Mon Sep 17 00:00:00 2001 From: TheWienerMaster Date: Sun, 5 Mar 2023 00:35:34 +0200 Subject: [PATCH 1/2] Added BarrierESP --- .../java/net/wurstclient/hack/HackList.java | 1 + .../net/wurstclient/hacks/BarrierEspHack.java | 24 +++++++++++++ .../wurstclient/mixin/ClientWorldMixin.java | 35 +++++++++++++++++++ .../resources/assets/wurst/lang/en_us.json | 1 + src/main/resources/wurst.mixins.json | 1 + 5 files changed, 62 insertions(+) create mode 100644 src/main/java/net/wurstclient/hacks/BarrierEspHack.java create mode 100644 src/main/java/net/wurstclient/mixin/ClientWorldMixin.java diff --git a/src/main/java/net/wurstclient/hack/HackList.java b/src/main/java/net/wurstclient/hack/HackList.java index d723d9da1c..2db3d27e67 100644 --- a/src/main/java/net/wurstclient/hack/HackList.java +++ b/src/main/java/net/wurstclient/hack/HackList.java @@ -62,6 +62,7 @@ public final class HackList implements UpdateListener public final AutoToolHack autoToolHack = new AutoToolHack(); public final AutoTotemHack autoTotemHack = new AutoTotemHack(); public final AutoWalkHack autoWalkHack = new AutoWalkHack(); + public final BarrierEspHack barrierEspHack = new BarrierEspHack(); public final BaseFinderHack baseFinderHack = new BaseFinderHack(); public final BlinkHack blinkHack = new BlinkHack(); public final BoatFlyHack boatFlyHack = new BoatFlyHack(); diff --git a/src/main/java/net/wurstclient/hacks/BarrierEspHack.java b/src/main/java/net/wurstclient/hacks/BarrierEspHack.java new file mode 100644 index 0000000000..0e15df1b95 --- /dev/null +++ b/src/main/java/net/wurstclient/hacks/BarrierEspHack.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2014-2023 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.wurstclient.Category; +import net.wurstclient.SearchTags; +import net.wurstclient.hack.Hack; + +@SearchTags({"Barrier", "BarrierESP", "ESP", "Invisible"}) +public final class BarrierEspHack extends Hack +{ + public BarrierEspHack() + { + super("BarrierESP"); + setCategory(Category.RENDER); + } + + // See ClientWorldMixin +} diff --git a/src/main/java/net/wurstclient/mixin/ClientWorldMixin.java b/src/main/java/net/wurstclient/mixin/ClientWorldMixin.java new file mode 100644 index 0000000000..a76d4728e5 --- /dev/null +++ b/src/main/java/net/wurstclient/mixin/ClientWorldMixin.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2014-2023 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.mixin; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.ModifyArgs; +import org.spongepowered.asm.mixin.injection.invoke.arg.Args; + +import net.minecraft.block.Blocks; +import net.minecraft.client.world.ClientWorld; + +import net.wurstclient.WurstClient; + + +@Mixin(ClientWorld.class) +public abstract class ClientWorldMixin +{ + @ModifyArgs( + at = @At(value = "INVOKE", + target = "Lnet/minecraft/client/world/ClientWorld;randomBlockDisplayTick(IIIILnet/minecraft/util/math/random/Random;Lnet/minecraft/block/Block;Lnet/minecraft/util/math/BlockPos$Mutable;)V"), + method = "doRandomBlockDisplayTicks") + private void doRandomBlockDisplayTicks(Args args) + { + if(!WurstClient.INSTANCE.getHax().barrierEspHack.isEnabled()) + return; + + args.set(5, Blocks.BARRIER); + } +} diff --git a/src/main/resources/assets/wurst/lang/en_us.json b/src/main/resources/assets/wurst/lang/en_us.json index e47d8ee791..162f1ea486 100644 --- a/src/main/resources/assets/wurst/lang/en_us.json +++ b/src/main/resources/assets/wurst/lang/en_us.json @@ -44,6 +44,7 @@ "description.wurst.hack.autotool": "Automatically equips the fastest applicable tool in your hotbar when you try to break a block.", "description.wurst.hack.autototem": "Automatically moves totems of undying to your off-hand.", "description.wurst.hack.autowalk": "Makes you walk automatically.", + "description.wurst.hack.barrieresp": "Allows you to see invisible barriers.", "description.wurst.hack.basefinder": "Finds player bases by searching for man-made blocks.\nThe blocks that it finds will be highlighted in the selected color.\nGood for finding faction bases.", "description.wurst.hack.blink": "Suspends all motion updates while enabled.", "description.wurst.hack.boatfly": "Allows you to fly with boats and other vehicles.\nPress the sprint key to go down faster.", diff --git a/src/main/resources/wurst.mixins.json b/src/main/resources/wurst.mixins.json index 1ba3768b8b..5573b22db7 100644 --- a/src/main/resources/wurst.mixins.json +++ b/src/main/resources/wurst.mixins.json @@ -23,6 +23,7 @@ "ClientPlayerEntityMixin", "ClientPlayerInteractionManagerMixin", "ClientPlayNetworkHandlerMixin", + "ClientWorldMixin", "ContainerScreen54Mixin", "CreativeInventoryScreenMixin", "CustomPayloadC2SPacketAccessor", From e3bf2169b1aaf6316ae3047ad146feb27ea5d801 Mon Sep 17 00:00:00 2001 From: TheWienerMaster <61437644+TheWienerMaster@users.noreply.github.com> Date: Thu, 26 Oct 2023 18:09:30 +0300 Subject: [PATCH 2/2] Update wurst.mixins.json --- src/main/resources/wurst.mixins.json | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/main/resources/wurst.mixins.json b/src/main/resources/wurst.mixins.json index 5573b22db7..9e7cb98208 100644 --- a/src/main/resources/wurst.mixins.json +++ b/src/main/resources/wurst.mixins.json @@ -8,44 +8,41 @@ "client": [ "AbstractBlockStateMixin", "AbstractSignEditScreenMixin", - "ArmorItemMixin", + "AllowedAddressResolverMixin", "BackgroundRendererMixin", "BlockEntityRenderDispatcherMixin", "BlockMixin", "BlockModelRendererMixin", - "ButtonWidgetMixin", "CactusBlockMixin", "CameraMixin", "ChatHudMixin", + "ChatInputSuggestorMixin", "ChatScreenMixin", "ChunkOcclusionGraphBuilderMixin", + "ClientCommonNetworkHandlerMixin", "ClientConnectionMixin", "ClientPlayerEntityMixin", "ClientPlayerInteractionManagerMixin", "ClientPlayNetworkHandlerMixin", "ClientWorldMixin", - "ContainerScreen54Mixin", "CreativeInventoryScreenMixin", - "CustomPayloadC2SPacketAccessor", "DeathScreenMixin", "DirectConnectScreenMixin", "DisconnectedRealmsScreenMixin", "DisconnectedScreenMixin", "EntityMixin", "EntityRendererMixin", - "FishingBobberEntityMixin", "FluidRendererMixin", "GameMenuScreenMixin", "GameRendererMixin", + "GenericContainerScreenMixin", "IngameHudMixin", "InGameOverlayRendererMixin", "KeyBindingMixin", "KeyboardMixin", "LanguageManagerMixin", - "LightTextureManagerMixin", "LivingEntityRendererMixin", "MinecraftClientMixin", - "MiningToolItemMixin", "MouseMixin", "MultiplayerScreenMixin", "PackScreenMixin", @@ -54,13 +51,11 @@ "PowderSnowBlockMixin", "RenderTickCounterMixin", "ScreenMixin", - "ServerListMixin", "ShulkerBoxScreenMixin", "SimpleOptionMixin", "SodiumBlockOcclusionCacheMixin", "StatsScreenMixin", "StatusEffectInstanceMixin", - "SwordItemMixin", "TelemetryManagerMixin", "TerrainRenderContextMixin", "TextVisitFactoryMixin",