Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
MRaphaelpy authored Oct 20, 2023
2 parents 944390e + 65118e8 commit d29f300
Show file tree
Hide file tree
Showing 85 changed files with 385 additions and 599 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,25 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- name: Set up JDK 17
- name: Checkout repository
uses: actions/checkout@v4
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set up Java 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
distribution: 'microsoft'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- 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
3 changes: 2 additions & 1 deletion .github/workflows/jsonsyntax.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v4
- name: Check JSON syntax
uses: limitusus/json-syntax-check@v2
with:
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "Close stale issues and pull requests"
on:
schedule:
- cron: "30 1 * * *"

permissions:
issues: write
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@main
with:
stale-issue-message: |
This issue has been open for a while with no recent activity. If this issue is still important to you, please add a comment within the next 7 days to keep it open. Otherwise, the issue will be automatically closed to free up time for other tasks.
Issues should be closed if:
- They are duplicates of other issues
- There is not enough demand
- They are no longer relevant
- There are not enough details
stale-pr-message: |
This pull request has been open for a while with no recent activity. If you're still working on this or waiting for a review, please add a comment or commit within the next 7 days to keep it open. Otherwise, the pull request will be automatically closed to free up time for other tasks.
Pull requests should be closed if:
- They have been superseded by another pull request
- They are out of scope or don't align with the project
- They have become obsolete due to other changes
- They have bugs or conflicts that won't be resolved
days-before-stale: 60
days-before-close: 7
stale-issue-label: "status:stale"
stale-pr-label: "status:stale"
operations-per-run: 60
enable-statistics: true
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}

plugins {
id 'fabric-loom' version '1.3-SNAPSHOT'
id 'fabric-loom' version '1.4-SNAPSHOT'
id 'maven-publish'
}

Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ org.gradle.parallel=true
# check these at https://fabricmc.net/develop/ and
# https://www.curseforge.com/minecraft/mc-mods/fabric-api
minecraft_version=1.20.2
yarn_mappings=1.20.2+build.1
yarn_mappings=1.20.2+build.4
loader_version=0.14.22

#Fabric api
fabric_version=0.89.0+1.20.2
fabric_version=0.89.3+1.20.2

# Mod Properties
mod_version = v7.37-MC1.20.2
mod_version = v7.37.1-MC1.20.2
maven_group = net.wurstclient
archives_base_name = Wurst-Client

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
25 changes: 17 additions & 8 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,13 +80,11 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -133,22 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -193,6 +198,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
1 change: 1 addition & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand Down
5 changes: 3 additions & 2 deletions src/main/java/net/wurstclient/WurstClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import net.wurstclient.hud.IngameHUD;
import net.wurstclient.keybinds.KeybindList;
import net.wurstclient.keybinds.KeybindProcessor;
import net.wurstclient.mixinterface.ILanguageManager;
import net.wurstclient.mixinterface.IMinecraftClient;
import net.wurstclient.navigator.Navigator;
import net.wurstclient.other_feature.OtfList;
Expand All @@ -56,7 +57,7 @@ public enum WurstClient
public static MinecraftClient MC;
public static IMinecraftClient IMC;

public static final String VERSION = "7.37";
public static final String VERSION = "7.37.1";
public static final String MC_VERSION = "1.20.2";

private WurstAnalytics analytics;
Expand Down Expand Up @@ -177,7 +178,7 @@ private Path createWurstFolder()
public String translate(String key)
{
if(otfs.translationsOtf.getForceEnglish().isChecked())
return IMC.getLanguageManager().getEnglish().get(key);
return ILanguageManager.getEnglish().get(key);

// This extra check is necessary because I18n.translate() doesn't
// always return the key when the translation is missing. If the key
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/net/wurstclient/altmanager/AltRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ public static void drawAltBody(DrawContext context, String name, int x,
{
bindSkinTexture(name);

boolean slim =
DefaultSkinHelper.getTexture(Uuids.getOfflinePlayerUuid(name))
.model() == SkinTextures.Model.SLIM;
boolean slim = DefaultSkinHelper
.getSkinTextures(Uuids.getOfflinePlayerUuid(name))
.model() == SkinTextures.Model.SLIM;

GL11.glEnable(GL11.GL_BLEND);
RenderSystem.setShaderColor(1, 1, 1, 1);
Expand Down Expand Up @@ -255,9 +255,9 @@ public static void drawAltBack(DrawContext context, String name, int x,
{
bindSkinTexture(name);

boolean slim =
DefaultSkinHelper.getTexture(Uuids.getOfflinePlayerUuid(name))
.model() == SkinTextures.Model.SLIM;
boolean slim = DefaultSkinHelper
.getSkinTextures(Uuids.getOfflinePlayerUuid(name))
.model() == SkinTextures.Model.SLIM;

GL11.glEnable(GL11.GL_BLEND);
RenderSystem.setShaderColor(1, 1, 1, 1);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/wurstclient/commands/FollowCmd.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void call(String[] args) throws CmdException

Entity entity = StreamSupport
.stream(MC.world.getEntities().spliterator(), true)
.filter(e -> e instanceof LivingEntity)
.filter(LivingEntity.class::isInstance)
.filter(e -> !e.isRemoved() && ((LivingEntity)e).getHealth() > 0)
.filter(e -> e != MC.player)
.filter(e -> !(e instanceof FakePlayerEntity))
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/wurstclient/commands/GoToCmd.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ private BlockPos argsToEntityPos(String name) throws CmdError
{
LivingEntity entity = StreamSupport
.stream(MC.world.getEntities().spliterator(), true)
.filter(e -> e instanceof LivingEntity).map(e -> (LivingEntity)e)
.filter(LivingEntity.class::isInstance).map(e -> (LivingEntity)e)
.filter(e -> !e.isRemoved() && e.getHealth() > 0)
.filter(e -> e != MC.player)
.filter(e -> !(e instanceof FakePlayerEntity))
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/wurstclient/commands/PathCmd.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private BlockPos argsToEntityPos(String name) throws CmdError
{
LivingEntity entity = StreamSupport
.stream(MC.world.getEntities().spliterator(), true)
.filter(e -> e instanceof LivingEntity).map(e -> (LivingEntity)e)
.filter(LivingEntity.class::isInstance).map(e -> (LivingEntity)e)
.filter(e -> !e.isRemoved() && e.getHealth() > 0)
.filter(e -> e != MC.player)
.filter(e -> !(e instanceof FakePlayerEntity))
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/wurstclient/commands/ProtectCmd.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void call(String[] args) throws CmdException

Entity entity = StreamSupport
.stream(MC.world.getEntities().spliterator(), true)
.filter(e -> e instanceof LivingEntity)
.filter(LivingEntity.class::isInstance)
.filter(e -> !e.isRemoved() && ((LivingEntity)e).getHealth() > 0)
.filter(e -> e != MC.player)
.filter(e -> !(e instanceof FakePlayerEntity))
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/wurstclient/commands/TpCmd.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private BlockPos argsToEntityPos(String name) throws CmdError
{
LivingEntity entity = StreamSupport
.stream(MC.world.getEntities().spliterator(), true)
.filter(e -> e instanceof LivingEntity).map(e -> (LivingEntity)e)
.filter(LivingEntity.class::isInstance).map(e -> (LivingEntity)e)
.filter(e -> !e.isRemoved() && e.getHealth() > 0)
.filter(e -> e != MC.player)
.filter(e -> !(e instanceof FakePlayerEntity))
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/wurstclient/hacks/AirPlaceHack.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void onRightClick(RightClickEvent event)
if(!(hitResult instanceof BlockHitResult blockHitResult))
return;

IMC.setItemUseCooldown(4);
MC.itemUseCooldown = 4;
if(MC.player.isRiding())
return;

Expand Down
16 changes: 4 additions & 12 deletions src/main/java/net/wurstclient/hacks/AnchorAuraHack.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@
import net.minecraft.entity.LivingEntity;
import net.minecraft.item.Items;
import net.minecraft.util.Hand;
import net.minecraft.util.hit.HitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Box;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.RaycastContext;
import net.wurstclient.Category;
import net.wurstclient.SearchTags;
import net.wurstclient.events.UpdateListener;
Expand Down Expand Up @@ -240,11 +238,8 @@ private boolean rightClickBlock(BlockPos pos)
if(distanceSqHitVec >= distanceSqPosVec)
continue;

if(checkLOS.isChecked() && MC.world
.raycast(new RaycastContext(eyesPos, hitVec,
RaycastContext.ShapeType.COLLIDER,
RaycastContext.FluidHandling.NONE, MC.player))
.getType() != HitResult.Type.MISS)
if(checkLOS.isChecked()
&& !BlockUtils.hasLineOfSight(eyesPos, hitVec))
continue;

faceBlocks.getSelected().face(hitVec);
Expand Down Expand Up @@ -284,11 +279,8 @@ private boolean placeAnchor(BlockPos pos)
if(distanceSqPosVec > eyesPos.squaredDistanceTo(posVec.add(dirVec)))
continue;

if(checkLOS.isChecked() && MC.world
.raycast(new RaycastContext(eyesPos, hitVec,
RaycastContext.ShapeType.COLLIDER,
RaycastContext.FluidHandling.NONE, MC.player))
.getType() != HitResult.Type.MISS)
if(checkLOS.isChecked()
&& !BlockUtils.hasLineOfSight(eyesPos, hitVec))
continue;

InventoryUtils.selectItem(Items.RESPAWN_ANCHOR,
Expand Down
12 changes: 4 additions & 8 deletions src/main/java/net/wurstclient/hacks/AutoBuildHack.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.RaycastContext;
import net.wurstclient.Category;
import net.wurstclient.events.RenderListener;
import net.wurstclient.events.RightClickListener;
Expand Down Expand Up @@ -199,7 +198,7 @@ private void buildNormally()
return;
}

if(!fastPlace.isChecked() && IMC.getItemUseCooldown() > 0)
if(!fastPlace.isChecked() && MC.itemUseCooldown > 0)
return;

placeNextBlock();
Expand Down Expand Up @@ -253,11 +252,8 @@ private boolean tryToPlace(BlockPos pos, Vec3d eyesPos, double rangeSq)
continue;

// check line of sight
if(checkLOS.isChecked() && MC.world
.raycast(new RaycastContext(eyesPos, hitVec,
RaycastContext.ShapeType.COLLIDER,
RaycastContext.FluidHandling.NONE, MC.player))
.getType() != HitResult.Type.MISS)
if(checkLOS.isChecked()
&& !BlockUtils.hasLineOfSight(eyesPos, hitVec))
continue;

// face block
Expand All @@ -271,7 +267,7 @@ private boolean tryToPlace(BlockPos pos, Vec3d eyesPos, double rangeSq)
IMC.getInteractionManager().rightClickBlock(neighbor,
side.getOpposite(), hitVec);
MC.player.swingHand(Hand.MAIN_HAND);
IMC.setItemUseCooldown(4);
MC.itemUseCooldown = 4;
return true;
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/net/wurstclient/hacks/AutoFarmHack.java
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ private boolean canBeReplanted(BlockPos pos)
private boolean replant(List<BlockPos> blocksToReplant)
{
// check cooldown
if(IMC.getItemUseCooldown() > 0)
if(MC.itemUseCooldown > 0)
return false;

// check if already holding one of the seeds needed for blocksToReplant
Expand Down Expand Up @@ -307,7 +307,7 @@ private boolean replant(List<BlockPos> blocksToReplant)
.sendPacket(new HandSwingC2SPacket(hand));

// reset cooldown
IMC.setItemUseCooldown(4);
MC.itemUseCooldown = 4;
return true;
}
}
Expand Down
Loading

0 comments on commit d29f300

Please sign in to comment.