Skip to content

Commit ad87193

Browse files
committed
SpearAssist Hack
1 parent 7b06786 commit ad87193

File tree

12 files changed

+692
-1
lines changed

12 files changed

+692
-1
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,11 @@ I did not, nor could I copy their code directly as most are Meteor based mods. S
267267
- Novel design where it implements a toggleable modified AimAssist setting whilst falling
268268
- Adds toggleable MaceDMG hack on impact
269269

270+
### SpearAssist
271+
- Adds configurable hold and dash boosts (capped at vanilla Flight speeds) whenever you charge a spear and hold attack.
272+
- Highlights distant spear targets with MobESP's current render style or a glow fallback when MobESP is disabled, using a customizable color and distance.
273+
- Keeps AimAssist running during spear charges and automatically re-represses right-click whenever the spear drops.
274+
270275
### WindChargeKey
271276
- Bind switching then throwing a wind charge to a key
272277
- Delay, silent and auto jump settings
@@ -366,6 +371,16 @@ I did not, nor could I copy their code directly as most are Meteor based mods. S
366371

367372
![Loot](https://i.imgur.com/7pkTPxW.png)
368373

374+
### SpearAssist
375+
- Boost Modes:
376+
- Dash - Charge with your right click and whilst doing that you can boost yourself forward a specific distance your left click creating a velocity based attack
377+
- Hold - While charging you are constantly boosting forward whenever you press the left click
378+
- Your player can optionally stay grounded when boosting as to avoid flying off into the distance on each attack
379+
- Highlighting: You can highlight near and far entities within your attack range. Near meaning the distance you can jab at them and far the distance you can charge at them. Set to 7 for near and 8.5 blocks for far.
380+
- Your charge is automatically and constantly resumed so you can forever hold right click. It will be noisy but even if the spear is pointed down you will still be able to attack.
381+
- You can optionally allow aim assist to work whilst holding right click.
382+
- Your jab attack will auto hit once the timeout has expired so long as you're hitting an entity.
383+
369384
## What’s changed or improved in this fork?
370385

371386
### ItemESP (Expanded)

src/main/java/net/wurstclient/hack/HackList.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ public final class HackList implements UpdateListener
142142
public final LiquidsHack liquidsHack = new LiquidsHack();
143143
public final LsdHack lsdHack = new LsdHack();
144144
public final MaceDmgHack maceDmgHack = new MaceDmgHack();
145+
public final SpearAssistHack spearAssistHack = new SpearAssistHack();
145146
public final MassTpaHack massTpaHack = new MassTpaHack();
146147
public final MileyCyrusHack mileyCyrusHack = new MileyCyrusHack();
147148
public final MobEspHack mobEspHack = new MobEspHack();

src/main/java/net/wurstclient/hacks/AimAssistHack.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ public final class AimAssistHack extends Hack
9393
private float nextPitch;
9494
private Function<Entity, Vec3> overrideAimPoint;
9595
private Entity externalTarget;
96+
private boolean temporaryAllowBlocking;
9697

9798
public AimAssistHack()
9899
{
@@ -136,6 +137,7 @@ protected void onDisable()
136137
target = null;
137138
overrideAimPoint = null;
138139
externalTarget = null;
140+
temporaryAllowBlocking = false;
139141
}
140142

141143
@Override
@@ -147,7 +149,9 @@ public void onUpdate()
147149
if(MC.screen instanceof AbstractContainerScreen)
148150
return;
149151

150-
if(!aimWhileBlocking.isChecked() && MC.player.isUsingItem())
152+
boolean blockingAllowed =
153+
aimWhileBlocking.isChecked() || temporaryAllowBlocking;
154+
if(!blockingAllowed && MC.player.isUsingItem())
151155
return;
152156

153157
Entity forced = externalTarget;
@@ -181,6 +185,11 @@ public void onUpdate()
181185
nextPitch = next.pitch();
182186
}
183187

188+
public void setTemporarilyAllowBlocking(boolean allow)
189+
{
190+
temporaryAllowBlocking = allow;
191+
}
192+
184193
private void chooseTarget()
185194
{
186195
Stream<Entity> stream = EntityUtils.getAttackableEntities();

src/main/java/net/wurstclient/hacks/MobEspHack.java

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,13 +322,71 @@ private void renderShulkerProjectileFallback(PoseStack matrixStack,
322322
RenderUtils.drawSolidBoxes(matrixStack, filledShapes, false);
323323
}
324324

325+
public RenderStyleInfo getRenderStyleInfo()
326+
{
327+
MobEspStyleSetting.Shape shape = style.getShape();
328+
RenderShape renderShape = switch(shape)
329+
{
330+
case BOX -> RenderShape.BOX;
331+
case OCTAHEDRON -> RenderShape.OCTAHEDRON;
332+
case GLOW -> RenderShape.GLOW;
333+
default -> RenderShape.NONE;
334+
};
335+
336+
boolean drawShape = renderShape == RenderShape.BOX
337+
|| renderShape == RenderShape.OCTAHEDRON;
338+
339+
double extra = drawShape ? boxSize.getExtraSize() / 2D : 0;
340+
boolean fill = drawShape && fillShapes.isChecked();
341+
342+
return new RenderStyleInfo(renderShape, style.hasLines(), fill, extra);
343+
}
344+
325345
private float[] getColorRgb()
326346
{
327347
if(useRainbow.isChecked())
328348
return RenderUtils.getRainbowColor();
329349
return color.getColorF();
330350
}
331351

352+
public boolean shouldRenderEntity(LivingEntity entity)
353+
{
354+
if(entity == null || entity instanceof Player)
355+
return false;
356+
if(entity.isRemoved() || entity.getHealth() <= 0)
357+
return false;
358+
if(onlyAboveGround.isChecked()
359+
&& entity.getY() < aboveGroundY.getValue())
360+
return false;
361+
362+
return entityFilters.testOne(entity);
363+
}
364+
365+
public static enum RenderShape
366+
{
367+
NONE,
368+
BOX,
369+
OCTAHEDRON,
370+
GLOW;
371+
}
372+
373+
public static final class RenderStyleInfo
374+
{
375+
public final RenderShape shape;
376+
public final boolean drawLines;
377+
public final boolean fillShapes;
378+
public final double extraSize;
379+
380+
public RenderStyleInfo(RenderShape shape, boolean drawLines,
381+
boolean fillShapes, double extraSize)
382+
{
383+
this.shape = shape;
384+
this.drawLines = drawLines;
385+
this.fillShapes = fillShapes;
386+
this.extraSize = extraSize;
387+
}
388+
}
389+
332390
public Integer getGlowColor(LivingEntity entity)
333391
{
334392
if(!isEnabled())

src/main/java/net/wurstclient/hacks/PlayerEspHack.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,27 @@ public boolean isThreat()
796796
}
797797
}
798798

799+
public boolean shouldRenderPlayer(Player player)
800+
{
801+
if(player == null || MC.player == null)
802+
return false;
803+
804+
if(player == MC.player || player.isRemoved() || player.getHealth() <= 0)
805+
return false;
806+
807+
if(player instanceof FakePlayerEntity)
808+
return false;
809+
810+
if(Math.abs(player.getY() - MC.player.getY()) > 1e6)
811+
return false;
812+
813+
if(ignoreNpcs.isChecked() && MC.getConnection() != null
814+
&& MC.getConnection().getPlayerInfo(player.getUUID()) == null)
815+
return false;
816+
817+
return entityFilters.testOne(player);
818+
}
819+
799820
private static final class LosState
800821
{
801822
private final int checkIntervalMs;

0 commit comments

Comments
 (0)