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

Batter no overlay #986

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 40 additions & 33 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,43 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v2

- name: Set up Java 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'microsoft'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Setup Gradle
uses: gradle/gradle-build-action@v3

- name: Check code style with Spotless
id: spotless_check
run: ./gradlew spotlessCheck

- name: Execute Gradle build
run: ./gradlew build

- name: VirusTotal scan
if: ${{ github.event_name == 'push' }}
uses: crazy-max/ghaction-virustotal@v4
with:
vt_api_key: ${{ secrets.VIRUSTOTAL_API_KEY }}
files: |
./build/libs/*.jar
continue-on-error: true
- name: Checkout repository
uses: actions/checkout@v4

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v2

- name: Set up Java 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'microsoft'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Setup Gradle
uses: gradle/gradle-build-action@v3

- name: Check code style with Spotless
id: spotless_check
run: ./gradlew spotlessCheck

- name: Execute Gradle build
run: ./gradlew build

- name: Submit dependency graph
if: ${{ github.event_name == 'push' }}
uses: actions/upload-artifact@v2
with:
name: dependency-graph
path: /home/runner/work/Wurst7/Wurst7/dependency-graph-reports/java_ci_with_gradle-build.json
Alexander01998 marked this conversation as resolved.
Show resolved Hide resolved

- name: VirusTotal scan
if: ${{ github.event_name == 'push' }}
uses: crazy-max/ghaction-virustotal@v4
with:
vt_api_key: ${{ secrets.VIRUSTOTAL_API_KEY }}
files: |
./build/libs/*.jar
continue-on-error: true
6 changes: 1 addition & 5 deletions src/main/java/net/wurstclient/hack/HackList.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ public final class HackList implements UpdateListener
public final AntiAfkHack antiAfkHack = new AntiAfkHack();
public final AntiBlindHack antiBlindHack = new AntiBlindHack();
public final AntiCactusHack antiCactusHack = new AntiCactusHack();
public final AntiEntityPushHack antiEntityPushHack =
new AntiEntityPushHack();
public final AntiEntityPushHack antiEntityPushHack = new AntiEntityPushHack();
public final AntiHungerHack antiHungerHack = new AntiHungerHack();
public final AntiKnockbackHack antiKnockbackHack = new AntiKnockbackHack();
public final AntiSpamHack antiSpamHack = new AntiSpamHack();
Expand Down Expand Up @@ -133,14 +132,11 @@ public final class HackList implements UpdateListener
public final NoBackgroundHack noBackgroundHack = new NoBackgroundHack();
public final NoClipHack noClipHack = new NoClipHack();
public final NoFallHack noFallHack = new NoFallHack();
public final NoFireOverlayHack noFireOverlayHack = new NoFireOverlayHack();
public final NoFogHack noFogHack = new NoFogHack();
public final NoHurtcamHack noHurtcamHack = new NoHurtcamHack();
public final NoLevitationHack noLevitationHack = new NoLevitationHack();
public final NoOverlayHack noOverlayHack = new NoOverlayHack();
public final NoPumpkinHack noPumpkinHack = new NoPumpkinHack();
public final NoShieldOverlayHack noShieldOverlayHack =
new NoShieldOverlayHack();
public final NoSlowdownHack noSlowdownHack = new NoSlowdownHack();
public final NoWeatherHack noWeatherHack = new NoWeatherHack();
public final NoWebHack noWebHack = new NoWebHack();
Expand Down
36 changes: 0 additions & 36 deletions src/main/java/net/wurstclient/hacks/NoFireOverlayHack.java

This file was deleted.

39 changes: 38 additions & 1 deletion src/main/java/net/wurstclient/hacks/NoOverlayHack.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,56 @@
*/
package net.wurstclient.hacks;

import net.minecraft.client.util.math.MatrixStack;
import net.wurstclient.Category;
import net.wurstclient.SearchTags;
import net.wurstclient.hack.Hack;
import net.wurstclient.settings.SliderSetting;

@SearchTags({"no overlay", "NoWaterOverlay", "no water overlay"})
@SearchTags({
"no overlay", "NoWaterOverlay",
"no water overlay", "no fire overlay","no shield overlay"})
public final class NoOverlayHack extends Hack
{
private final SliderSetting fireOffSet =
new SliderSetting("Offset", "The amount to lower the fire overlay.",
0.6, 0.01, 0.6, 0.01, SliderSetting.ValueDisplay.DECIMAL);

public final SliderSetting blockingOffset =
new SliderSetting("Blocking offset",
"The amount to lower the shield overlay by when blocking.", 0.5, 0,
0.8, 0.01, SliderSetting.ValueDisplay.DECIMAL);

public final SliderSetting nonBlockingOffset =
new SliderSetting("Non-blocking offset",
"The amount to lower the shield overlay when not blocking.", 0.2, 0,
0.5, 0.01, SliderSetting.ValueDisplay.DECIMAL);

public NoOverlayHack()
{
super("NoOverlay");
setCategory(Category.RENDER);
addSetting(this.fireOffSet);
addSetting(this.blockingOffset);
addSetting(this.nonBlockingOffset);
}

// See CameraMixin.onGetSubmersionType() and
// InGameOverlayRendererMixin.onRenderUnderwaterOverlay()

public float getOverlayOffset()
{
return isEnabled() ? this.fireOffSet.getValueF() : 0;
}

public void adjustShieldPosition(MatrixStack matrixStack, boolean blocking)
{
if(!isEnabled())
return;

if(blocking)
matrixStack.translate(0, -this.blockingOffset.getValue(), 0);
else
matrixStack.translate(0, -this.nonBlockingOffset.getValue(), 0);
}
}
48 changes: 0 additions & 48 deletions src/main/java/net/wurstclient/hacks/NoShieldOverlayHack.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private void onApplyEquipOffsetBlocking(AbstractClientPlayerEntity player,
{
// lower shield when blocking
if(item.getItem() == Items.SHIELD)
WurstClient.INSTANCE.getHax().noShieldOverlayHack
WurstClient.INSTANCE.getHax().noOverlayHack
.adjustShieldPosition(matrices, true);
}

Expand All @@ -49,7 +49,7 @@ private void onApplySwingOffsetNotBlocking(
{
// lower shield when not blocking
if(item.getItem() == Items.SHIELD)
WurstClient.INSTANCE.getHax().noShieldOverlayHack
WurstClient.INSTANCE.getHax().noOverlayHack
.adjustShieldPosition(matrices, false);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class InGameOverlayRendererMixin
constant = @Constant(floatValue = -0.3F))
private static float getFireOffset(float original)
{
return original - WurstClient.INSTANCE.getHax().noFireOverlayHack
return original - WurstClient.INSTANCE.getHax().noOverlayHack
.getOverlayOffset();
}

Expand Down