Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander01998 authored Dec 2, 2023
2 parents d29f300 + d42d872 commit 08af5f0
Show file tree
Hide file tree
Showing 119 changed files with 2,000 additions and 1,039 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# These are supported funding model platforms

ko_fi: wurst
custom: https://www.wurstclient.net/donate/?utm_source=GitHub&utm_medium=Wurst7&utm_campaign=GitHub+Sponsors&utm_content=Sponsor+this+project
31 changes: 0 additions & 31 deletions .github/ISSUE_TEMPLATE/bug-report.md

This file was deleted.

66 changes: 66 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Bug Report
description: Report a bug
labels: ["type:bug", "status:unconfirmed"]
body:
- type: markdown
attributes:
value: |
## Welcome!
Please fill out the following template to help us understand and reproduce the issue you're experiencing.
- type: checkboxes
id: checklist
attributes:
label: Pre-reporting checklist
description: "Please select all that apply."
options:
- label: "I have searched existing issues and didn't find any previous reports of this bug."
- label: "This bug still happens in the latest version of Wurst. I've made sure my installation is up to date."
- label: "I have tried removing all other mods and the bug still happens."
- type: textarea
id: description
attributes:
label: Description
description: "Please describe the bug in as much detail as possible."
validations:
required: true
- type: textarea
id: repro
attributes:
label: Repro steps
description: "How do you trigger this bug? Please walk us through it step by step."
placeholder: |
1.
2.
3.
validations:
required: true
- type: input
id: wurst-version
attributes:
label: Wurst Client version
placeholder: e.g. 7.15
validations:
required: true
- type: input
id: minecraft-version
attributes:
label: Minecraft version
placeholder: e.g. 1.16.5
validations:
required: true
- type: textarea
id: crash
attributes:
label: Crash report (if applicable)
description: "If your game crashed, please paste the entire crash report here."
placeholder: |
---- Minecraft Crash Report ----
// Who set us up the TNT?
render: plaintext
validations:
required: false
- type: markdown
attributes:
value: |
## Thank you!
We appreciate your help in improving Wurst Client by reporting this bug. Please make sure you have filled out all the necessary information before submitting this issue.
14 changes: 0 additions & 14 deletions .github/ISSUE_TEMPLATE/suggestion.md

This file was deleted.

62 changes: 62 additions & 0 deletions .github/ISSUE_TEMPLATE/suggestion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Suggestion
description: "Suggest a change to improve the Wurst Client"
labels: ["type:enhancement", "status:unconfirmed"]
body:
- type: markdown
attributes:
value: |
## Welcome!
Please fill out the following template to help us understand the improvement you're suggesting.
- type: checkboxes
id: checklist
attributes:
label: Pre-suggestion checklist
description: "Please select all that apply."
options:
- label: "I have searched existing issues and didn't find any previous issues with the same suggestion."
- label: "This is only one suggestion. I understand that GitHub issues don't work well with lists."
- label: "This feature doesn't already exist in the latest version of Wurst. I've made sure my installation is up to date."
- label: "I have looked at the code and am reasonably confident that this suggestion is possible to implement."
- type: dropdown
id: type
attributes:
label: What type of improvement are you suggesting?
multiple: true
options:
- "Adding a new hack."
- "Adding a new chat command."
- "Adding a different kind of feature."
- "Changing the settings of existing features."
- "Porting existing features to a different Minecraft version."
- "Turning a Wurst feature into a standalone mod."
- "Removing an old feature that doesn't work anymore."
- "Other (please explain in description)"
validations:
required: true
- type: dropdown
id: target-audience
attributes:
label: What type of player would find this improvement useful?
multiple: true
options:
- "Builders"
- "Miners"
- "Griefers"
- "PVPers"
- "Redstoners"
- "Anarchy/faction players"
- "Other (please explain in description)"
validations:
required: true
- type: textarea
id: description
attributes:
label: Description
description: "Please describe the improvement in as much detail as possible. What does it do and how is it useful? Assume that we have never heard of it before, even if it exists in other hacked clients."
validations:
required: true
- type: markdown
attributes:
value: |
## Thank you!
We appreciate your help in improving Wurst Client by suggesting this improvement. Please make sure you have filled out all the necessary information before submitting this issue.
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--NOTE: If you are contributing multiple unrelated features, please create a separate pull request for each feature. Squeezing everything into one giant pull request makes it very difficult for me to add your features, as I have to test, validate and add them one by one. Thank you for your understanding - and thanks again for taking the time to contribute!!-->

## Description
What have you added and what does it do? (Alternatively, what have you fixed and how does it work?)
> What have you added and what does it do? (Alternatively, what have you fixed and how does it work?)
## (Optional) screenshots / videos
If applicable, add screenshots or videos to help explain your pull request.
> If applicable, add screenshots or videos to help explain your pull request.
1 change: 1 addition & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ jobs:
vt_api_key: ${{ secrets.VIRUSTOTAL_API_KEY }}
files: |
./build/libs/*.jar
continue-on-error: true
4 changes: 2 additions & 2 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "Close stale issues and pull requests"
on:
schedule:
- cron: "30 1 * * *"
- cron: "30 1 * * 1-5"

permissions:
issues: write
Expand Down Expand Up @@ -33,5 +33,5 @@ jobs:
days-before-close: 7
stale-issue-label: "status:stale"
stale-pr-label: "status:stale"
operations-per-run: 60
operations-per-run: 50
enable-statistics: true
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ org.gradle.parallel=true
# https://www.curseforge.com/minecraft/mc-mods/fabric-api
minecraft_version=1.20.2
yarn_mappings=1.20.2+build.4
loader_version=0.14.22
loader_version=0.14.24

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

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

Expand Down
22 changes: 22 additions & 0 deletions src/main/java/net/wurstclient/SearchTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,28 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Adds search tags to a Wurst feature so that it can be found through the
* search bar in the Navigator GUI.
*
* <p>
* Navigator can already find features by their name and description, so
* repeating that information in the search tags is pointless. However, names
* and descriptions of settings are not used by Navigator, so repeating those
* can make sense if people are likely to search for them.
*
* <p>
* Navigator is not case-sensitive, so for example "NukerLegit" and "nukerlegit"
* are treated the same. However, Navigator struggles with spaces and the order
* of words, for example "NukerLegit", "Nuker Legit" and "Legit Nuker" are all
* treated differently.
*
* <p>
* By convention, search tags with spaces should be written in lower case and
* search tags without spaces should be written in camel case. For example,
* "NukerLegit" and "nuker legit". This is not enforced, but it makes the
* code easier to read.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface SearchTags
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 @@ -57,7 +57,7 @@ public enum WurstClient
public static MinecraftClient MC;
public static IMinecraftClient IMC;

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

private WurstAnalytics analytics;
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/net/wurstclient/ai/FlyPathProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,10 @@ else if(posVec.y < nextBox.minY)
}
}
}

@Override
public boolean canBreakBlocks()
{
return true;
}
}
2 changes: 2 additions & 0 deletions src/main/java/net/wurstclient/ai/PathProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ public PathProcessor(ArrayList<PathPos> path)

public abstract void process();

public abstract boolean canBreakBlocks();

public final int getIndex()
{
return index;
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/net/wurstclient/ai/WalkPathProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,10 @@ public void process()
MC.options.forwardKey.setPressed(true);
}
}

@Override
public boolean canBreakBlocks()
{
return MC.player.isOnGround();
}
}
23 changes: 14 additions & 9 deletions src/main/java/net/wurstclient/commands/EnchantCmd.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import net.wurstclient.command.CmdSyntaxError;
import net.wurstclient.command.Command;
import net.wurstclient.util.ChatUtils;
import net.wurstclient.util.ItemUtils;

public final class EnchantCmd extends Command
{
Expand All @@ -34,39 +35,43 @@ public void call(String[] args) throws CmdException
if(args.length > 1)
throw new CmdSyntaxError();

ItemStack stack = getHeldItem();
enchant(stack);

enchant(getHeldItem(), 127);
ChatUtils.message("Item enchanted.");
}

private ItemStack getHeldItem() throws CmdError
{
ItemStack stack = MC.player.getInventory().getMainHandStack();
ItemStack stack = MC.player.getMainHandStack();

if(stack.isEmpty())
stack = MC.player.getOffHandStack();

if(stack.isEmpty())
throw new CmdError("There is no item in your hand.");

return stack;
}

private void enchant(ItemStack stack)
private void enchant(ItemStack stack, int level)
{
for(Enchantment enchantment : Registries.ENCHANTMENT)
{
if(enchantment == Enchantments.SILK_TOUCH)
// Skip curses
if(enchantment.isCursed())
continue;

if(enchantment.isCursed())
// Skip Silk Touch so it doesn't remove Fortune
if(enchantment == Enchantments.SILK_TOUCH)
continue;

// Limit Quick Charge to level 5 so it doesn't break
if(enchantment == Enchantments.QUICK_CHARGE)
{
stack.addEnchantment(enchantment, 5);
stack.addEnchantment(enchantment, Math.min(level, 5));
continue;
}

stack.addEnchantment(enchantment, 127);
ItemUtils.addEnchantment(stack, enchantment, level);
}
}

Expand Down
9 changes: 3 additions & 6 deletions src/main/java/net/wurstclient/commands/VClipCmd.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
import net.minecraft.client.network.ClientPlayerEntity;
import net.minecraft.util.math.Box;
import net.minecraft.util.math.Direction;
import net.minecraft.util.shape.VoxelShape;
import net.wurstclient.command.CmdError;
import net.wurstclient.command.CmdException;
import net.wurstclient.command.CmdSyntaxError;
import net.wurstclient.command.Command;
import net.wurstclient.util.BlockUtils;
import net.wurstclient.util.MathUtils;

public final class VClipCmd extends Command
Expand Down Expand Up @@ -92,15 +92,12 @@ private double calculateHeight(Direction direction) throws CmdError

private boolean hasCollisions(Box box)
{
Iterable<VoxelShape> collisions =
MC.world.getBlockCollisions(MC.player, box);

return collisions.iterator().hasNext();
return BlockUtils.getBlockCollisions(box).findAny().isPresent();
}

private double getSubBlockOffset(Box offsetBox)
{
return IMC.getWorld().getCollidingBoxes(MC.player, offsetBox)
return BlockUtils.getBlockCollisions(offsetBox)
.mapToDouble(box -> box.maxY).max().getAsDouble() - offsetBox.minY;
}

Expand Down
Loading

0 comments on commit 08af5f0

Please sign in to comment.