Skip to content

Commit 7273164

Browse files
committed
MobHealth & HealthTags Updated, Added SourceFill
(cherry picked from commit eb9ad49)
1 parent f3b2f1d commit 7273164

6 files changed

Lines changed: 394 additions & 12 deletions

File tree

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ public final class HackList implements UpdateListener
265265
public final SafeWalkHack safeWalkHack = new SafeWalkHack();
266266
public final ScaffoldWalkHack scaffoldWalkHack = new ScaffoldWalkHack();
267267
public final SearchHack searchHack = new SearchHack();
268+
public final SourceFillHack sourceFillHack = new SourceFillHack();
268269
public final SpawnRadiusHack spawnRadiusHack = new SpawnRadiusHack();
269270
public final SeedMapperHelperHack seedMapperHelperHack =
270271
new SeedMapperHelperHack();

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import net.wurstclient.hack.Hack;
2424
import net.wurstclient.settings.CheckboxSetting;
2525
import net.wurstclient.settings.EnumSetting;
26+
import net.wurstclient.settings.SliderSetting;
2627
import net.wurstclient.util.EntityHealthRenderer;
2728

2829
@SearchTags({"health tags"})
@@ -56,6 +57,10 @@ public final class HealthTagsHack extends Hack implements GUIRenderListener
5657
"Show potion effect status",
5758
"Shows potion-color bottle indicators above held item icons.", true);
5859

60+
private final SliderSetting scale = new SliderSetting("Scale",
61+
"Scales the hearts below the nametag. 100% is the original size.", 1,
62+
0.25, 3, 0.05, SliderSetting.ValueDisplay.PERCENTAGE);
63+
5964
private final java.util.Set<LivingEntity> entitiesToRender =
6065
java.util.Collections.newSetFromMap(new java.util.WeakHashMap<>());
6166
private static final Pattern VALID_MC_USERNAME =
@@ -73,6 +78,7 @@ public HealthTagsHack()
7378
addSetting(showHeldItems);
7479
addSetting(durabilityDisplayMode);
7580
addSetting(showPotionEffectStatus);
81+
addSetting(scale);
7682
}
7783

7884
@Override
@@ -193,7 +199,7 @@ public void onRenderGUI(GuiGraphics context, float partialTicks)
193199
EntityHealthRenderer.drawHeartsAtEntity(context, entity,
194200
partialTicks, -10F, showArmor.isChecked(),
195201
showHeldItems.isChecked(), durabilityDisplayMode.getSelected(),
196-
showPotionEffectStatus.isChecked());
202+
showPotionEffectStatus.isChecked(), scale.getValueF());
197203
}
198204

199205
entitiesToRender.clear();

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import net.wurstclient.hack.Hack;
2525
import net.wurstclient.settings.CheckboxSetting;
2626
import net.wurstclient.settings.EnumSetting;
27+
import net.wurstclient.settings.SliderSetting;
2728
import net.wurstclient.util.EntityHealthRenderer;
2829

2930
@SearchTags({"mob health", "health", "hearts"})
@@ -72,6 +73,10 @@ public final class MobHealthHack extends Hack implements GUIRenderListener
7273
"Show potion effect status",
7374
"Shows potion-color bottle indicators above held item icons.", true);
7475

76+
private final SliderSetting scale = new SliderSetting("Scale",
77+
"Scales the health overlay. 100% is the original size.", 1, 0.25, 3,
78+
0.05, SliderSetting.ValueDisplay.PERCENTAGE);
79+
7580
public MobHealthHack()
7681
{
7782
super("MobHealth");
@@ -85,6 +90,7 @@ public MobHealthHack()
8590
addSetting(showHeldItems);
8691
addSetting(durabilityDisplayMode);
8792
addSetting(showPotionEffectStatus);
93+
addSetting(scale);
8894
}
8995

9096
@Override
@@ -184,7 +190,7 @@ public void onRenderGUI(GuiGraphics context, float partialTicks)
184190
EntityHealthRenderer.drawHeartsAtEntity(context, mob, partialTicks,
185191
yOffset, showArmor.isChecked(), showHeldItems.isChecked(),
186192
durabilityDisplayMode.getSelected(),
187-
showPotionEffectStatus.isChecked());
193+
showPotionEffectStatus.isChecked(), scale.getValueF());
188194
}
189195

190196
private Mob getLookedAtMob()

0 commit comments

Comments
 (0)