Skip to content

Commit

Permalink
Merge tag 'v7.45' into 1.21.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander01998 committed Aug 9, 2024
2 parents b5c0e66 + 8304275 commit 1a4ef09
Show file tree
Hide file tree
Showing 56 changed files with 1,678 additions and 459 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ Pull requests are welcome, but please make sure to read the [contributing guidel

## Translations

We have a [Crowdin project](https://crowdin.com/project/wurst7) for translations. You can also submit translations here on GitHub, but Crowdin is preferred since it makes it much easier to resolve issues.
The preferred way to submit translations is through a Pull Request here on GitHub.

To enable translations in-game, go to Wurst Options > Translations > ON.

Names of features (hacks/commands/etc.) should always be kept in English. This ensures that everyone can use the same commands, keybinds, etc. regardless of their language setting. It also makes it easier to communicate with someone who uses Wurst in a different language.

The translation files are located in [this folder](https://github.com/Wurst-Imperium/Wurst7/tree/master/src/main/resources/assets/wurst/lang), in case you need them.
The translation files are located in [this folder](https://github.com/Wurst-Imperium/Wurst7/tree/master/src/main/resources/assets/wurst/translations), in case you need them.

## License

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ loader_version=0.16.0
fabric_version=0.102.0+1.21.1

# Mod Properties
mod_version = v7.44-MC1.21.1
mod_version = v7.45-MC1.21.1
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";
public static final String VERSION = "7.45";
public static final String MC_VERSION = "1.21.1";

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 @@ -172,6 +172,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
Loading

0 comments on commit 1a4ef09

Please sign in to comment.