Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
LilyKensa authored Aug 8, 2024
2 parents 1ebb8d9 + 032b8cf commit 76a5b03
Show file tree
Hide file tree
Showing 54 changed files with 1,567 additions and 260 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ yarn_mappings=1.21+build.9
loader_version=0.15.11

# Fabric API
fabric_version=0.100.6+1.21
fabric_version=0.100.8+1.21

# Mod Properties
mod_version = v7.44.1-MC1.21
mod_version = v7.45-MC1.21
maven_group = net.wurstclient
archives_base_name = Wurst-Client

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/wurstclient/WurstClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public enum WurstClient
public static MinecraftClient MC;
public static IMinecraftClient IMC;

public static final String VERSION = "7.44.1";
public static final String VERSION = "7.45";
public static final String MC_VERSION = "1.21";

private WurstAnalytics analytics;
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/net/wurstclient/WurstTranslator.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,10 @@ public TranslationStorage getMcEnglish()

private ArrayList<String> getCurrentLangCodes()
{
String mainLangCode =
MinecraftClient.getInstance().getLanguageManager().getLanguage();
// Weird bug: Some users have their language set to "en_US" instead of
// "en_us" for some reason. Last seen in 1.21.
String mainLangCode = MinecraftClient.getInstance().getLanguageManager()
.getLanguage().toLowerCase();

ArrayList<String> langCodes = new ArrayList<>();
langCodes.add("en_us");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* Copyright (c) 2014-2024 Wurst-Imperium and contributors.
*
* This source code is subject to the terms of the GNU General Public
* License, version 3. If a copy of the GPL was not distributed with this
* file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt
*/
package net.wurstclient.events;

import java.util.ArrayList;

import net.minecraft.client.network.ClientPlayerInteractionManager;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity;
import net.wurstclient.event.Event;
import net.wurstclient.event.Listener;

/**
* Fired at the beginning of
* {@link ClientPlayerInteractionManager#attackEntity(PlayerEntity, Entity)}.
*/
public interface PlayerAttacksEntityListener extends Listener
{
/**
* Fired at the beginning of
* {@link ClientPlayerInteractionManager#attackEntity(PlayerEntity, Entity)}.
*/
public void onPlayerAttacksEntity(Entity target);

/**
* Fired at the beginning of
* {@link ClientPlayerInteractionManager#attackEntity(PlayerEntity, Entity)}.
*/
public static class PlayerAttacksEntityEvent
extends Event<PlayerAttacksEntityListener>
{
private final Entity target;

public PlayerAttacksEntityEvent(Entity target)
{
this.target = target;
}

@Override
public void fire(ArrayList<PlayerAttacksEntityListener> listeners)
{
for(PlayerAttacksEntityListener listener : listeners)
listener.onPlayerAttacksEntity(target);
}

@Override
public Class<PlayerAttacksEntityListener> getListenerType()
{
return PlayerAttacksEntityListener.class;
}
}
}
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 @@ -173,6 +173,7 @@ public final class HackList implements UpdateListener
public final SpeedNukerHack speedNukerHack = new SpeedNukerHack();
public final SpiderHack spiderHack = new SpiderHack();
public final StepHack stepHack = new StepHack();
public final TemplateToolHack templateToolHack = new TemplateToolHack();
public final ThrowHack throwHack = new ThrowHack();
public final TillauraHack tillauraHack = new TillauraHack();
public final TimerHack timerHack = new TimerHack();
Expand Down
14 changes: 12 additions & 2 deletions src/main/java/net/wurstclient/hacks/AimAssistHack.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ public final class AimAssistHack extends Hack
private final AimAtSetting aimAt = new AimAtSetting(
"What point in the target's hitbox AimAssist should aim at.");

private final SliderSetting ignoreMouseInput =
new SliderSetting("Ignore mouse input",
"description.wurst.setting.aimassist.ignore_mouse_input", 0, 0, 1,
0.01, ValueDisplay.PERCENTAGE);

private final CheckboxSetting checkLOS =
new CheckboxSetting("Check line of sight",
"description.wurst.setting.aimassist.check_line_of_sight", true);
Expand Down Expand Up @@ -95,6 +100,7 @@ public AimAssistHack()
addSetting(rotationSpeed);
addSetting(fov);
addSetting(aimAt);
addSetting(ignoreMouseInput);
addSetting(checkLOS);
addSetting(aimWhileBlocking);

Expand Down Expand Up @@ -201,7 +207,11 @@ public void onMouseUpdate(MouseUpdateEvent event)
diffPitch = nextPitch < curPitch ? -1 : 1;
}

event.setDeltaX(event.getDefaultDeltaX() + diffYaw);
event.setDeltaY(event.getDefaultDeltaY() + diffPitch);
double inputFactor = 1 - ignoreMouseInput.getValue();
int mouseInputX = (int)(event.getDefaultDeltaX() * inputFactor);
int mouseInputY = (int)(event.getDefaultDeltaY() * inputFactor);

event.setDeltaX(mouseInputX + diffYaw);
event.setDeltaY(mouseInputY + diffPitch);
}
}
4 changes: 2 additions & 2 deletions src/main/java/net/wurstclient/hacks/AntiBlindHack.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ public AntiBlindHack()
setCategory(Category.RENDER);
}

// See BackgroundRendererMixin, WorldRendererMixin,
// ClientPlayerEntityMixin.hasStatusEffect()
// See BackgroundRendererMixin, LightmapTextureManagerMixin,
// WorldRendererMixin, ClientPlayerEntityMixin.hasStatusEffect()
}
3 changes: 3 additions & 0 deletions src/main/java/net/wurstclient/hacks/AntiHungerHack.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
import net.wurstclient.Category;
import net.wurstclient.SearchTags;
import net.wurstclient.events.PacketOutputListener;
import net.wurstclient.hack.DontSaveState;
import net.wurstclient.hack.Hack;

@DontSaveState
@SearchTags({"anti hunger"})
public final class AntiHungerHack extends Hack implements PacketOutputListener
{
Expand All @@ -26,6 +28,7 @@ public AntiHungerHack()
@Override
protected void onEnable()
{
WURST.getHax().noFallHack.setEnabled(false);
EVENTS.add(PacketOutputListener.class, this);
}

Expand Down
9 changes: 5 additions & 4 deletions src/main/java/net/wurstclient/hacks/AutoArmorHack.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.enchantment.Enchantments;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.item.AnimalArmorItem;
import net.minecraft.item.ArmorItem;
import net.minecraft.item.ArmorItem.Type;
import net.minecraft.item.ItemStack;
Expand Down Expand Up @@ -114,10 +115,10 @@ public void onUpdate()
bestArmorSlots[type] = -1;

ItemStack stack = inventory.getArmorStack(type);
if(stack.isEmpty() || !(stack.getItem() instanceof ArmorItem))
if(!(stack.getItem() instanceof ArmorItem item)
|| item instanceof AnimalArmorItem)
continue;

ArmorItem item = (ArmorItem)stack.getItem();
bestArmorValues[type] = getArmorValue(item, stack);
}

Expand All @@ -126,10 +127,10 @@ public void onUpdate()
{
ItemStack stack = inventory.getStack(slot);

if(stack.isEmpty() || !(stack.getItem() instanceof ArmorItem))
if(!(stack.getItem() instanceof ArmorItem item)
|| item instanceof AnimalArmorItem)
continue;

ArmorItem item = (ArmorItem)stack.getItem();
int armorType = item.getSlotType().getEntitySlotId();
int armorValue = getArmorValue(item, stack);

Expand Down
7 changes: 7 additions & 0 deletions src/main/java/net/wurstclient/hacks/AutoBuildHack.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ public String getRenderName()
@Override
protected void onEnable()
{
WURST.getHax().templateToolHack.setEnabled(false);

EVENTS.add(UpdateListener.class, this);
EVENTS.add(RightClickListener.class, this);
EVENTS.add(RenderListener.class, this);
Expand Down Expand Up @@ -308,6 +310,11 @@ private void loadSelectedTemplate()
}
}

public Path getFolder()
{
return templateSetting.getFolder();
}

private enum Status
{
NO_TEMPLATE,
Expand Down
1 change: 1 addition & 0 deletions src/main/java/net/wurstclient/hacks/BowAimbotHack.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ protected void onEnable()
{
// disable conflicting hacks
WURST.getHax().excavatorHack.setEnabled(false);
WURST.getHax().templateToolHack.setEnabled(false);

// register event listeners
EVENTS.add(GUIRenderListener.class, this);
Expand Down
Loading

0 comments on commit 76a5b03

Please sign in to comment.