Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BarrierEsp #743

Merged
merged 9 commits into from
Nov 16, 2023
9 changes: 9 additions & 0 deletions src/main/java/net/wurstclient/hack/BarrierEspHack.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package net.wurstclient.hack;

public class BarrierEspHack extends Hack {

public BarrierEspHack() {
super("BarrierESP");
}

}
1 change: 1 addition & 0 deletions src/main/java/net/wurstclient/hack/HackList.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,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();
Expand Down
23 changes: 23 additions & 0 deletions src/main/java/net/wurstclient/mixin/ClientWorldMixin.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package net.wurstclient.mixin;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraft.client.world.ClientWorld;
import net.wurstclient.WurstClient;

@Mixin(ClientWorld.class)
public class ClientWorldMixin{

@Inject(method="getBlockParticle()Lnet/minecraft/block/Block;", at=@At("HEAD"), cancellable=true)
private void getBlockParticle(CallbackInfoReturnable<Block> info)
{
if (WurstClient.INSTANCE.getHax().barrierEspHack.isEnabled()) {
info.setReturnValue(Blocks.BARRIER);
}
}
}
1 change: 1 addition & 0 deletions src/main/resources/wurst.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"ClientPlayerEntityMixin",
"ClientPlayerInteractionManagerMixin",
"ClientPlayNetworkHandlerMixin",
"ClientWorldMixin",
"CreativeInventoryScreenMixin",
"DeathScreenMixin",
"DirectConnectScreenMixin",
Expand Down