mirror of
https://github.com/Wurst-Imperium/Wurst7.git
synced 2024-09-20 01:12:13 +02:00
Merge v7.35.2 into 1.19.4
This commit is contained in:
parent
81f0121e7c
commit
dd1c35cd09
4
.github/ISSUE_TEMPLATE/config.yml
vendored
4
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -1,7 +1,7 @@
|
||||
blank_issues_enabled: true
|
||||
contact_links:
|
||||
- name: Reddit Community
|
||||
url: https://www.reddit.com/r/WurstClient/
|
||||
- name: WurstForum
|
||||
url: https://wurstforum.net/?utm_source=GitHub&utm_medium=Wurst7+repo
|
||||
about: For general discussion, support, memes, etc.
|
||||
- name: Contact Alexander
|
||||
url: https://www.wurstclient.net/contact/?utm_source=GitHub&utm_medium=Wurst7&utm_campaign=Issues&utm_content=Contact+Alexander
|
||||
|
13
.github/workflows/gradle.yml
vendored
13
.github/workflows/gradle.yml
vendored
@ -1,36 +1,25 @@
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
|
||||
|
||||
name: Java CI with Gradle
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
paths:
|
||||
- '**.java'
|
||||
- 'gradle**'
|
||||
- 'build.gradle'
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
paths:
|
||||
- '**.java'
|
||||
- 'gradle**'
|
||||
- 'build.gradle'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: gradle/wrapper-validation-action@v1
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
|
3
.github/workflows/jsonsyntax.yml
vendored
3
.github/workflows/jsonsyntax.yml
vendored
@ -2,7 +2,6 @@ name: JSON syntax
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
paths:
|
||||
- '**.json'
|
||||
pull_request:
|
||||
@ -14,7 +13,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: json-syntax-check
|
||||
- name: Check JSON syntax
|
||||
uses: limitusus/json-syntax-check@v2
|
||||
with:
|
||||
pattern: "\\.json$"
|
||||
|
@ -5,7 +5,7 @@ buildscript {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'fabric-loom' version '1.2-SNAPSHOT'
|
||||
id 'fabric-loom' version '1.3-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
# Done to increase the memory available to gradle.
|
||||
org.gradle.jvmargs=-Xmx1G
|
||||
org.gradle.parallel=true
|
||||
|
||||
# Fabric Properties
|
||||
# check these at https://fabricmc.net/develop/ and
|
||||
@ -9,10 +10,10 @@ yarn_mappings=1.19.4+build.2
|
||||
loader_version=0.14.21
|
||||
|
||||
#Fabric api
|
||||
fabric_version=0.82.0+1.19.4
|
||||
fabric_version=0.85.0+1.19.4
|
||||
|
||||
# Mod Properties
|
||||
mod_version = v7.35.1-MC1.19.4
|
||||
mod_version = v7.35.2-MC1.19.4
|
||||
maven_group = net.wurstclient
|
||||
archives_base_name = Wurst-Client
|
||||
|
||||
|
@ -56,7 +56,7 @@ public enum WurstClient
|
||||
public static MinecraftClient MC;
|
||||
public static IMinecraftClient IMC;
|
||||
|
||||
public static final String VERSION = "7.35.1";
|
||||
public static final String VERSION = "7.35.2";
|
||||
public static final String MC_VERSION = "1.19.4";
|
||||
|
||||
private WurstAnalytics analytics;
|
||||
|
@ -195,6 +195,7 @@ public final class Encryption
|
||||
}
|
||||
|
||||
private KeyPair getRsaKeyPair(Path publicFile, Path privateFile)
|
||||
throws IOException
|
||||
{
|
||||
if(Files.notExists(publicFile) || Files.notExists(privateFile))
|
||||
return createRsaKeys(publicFile, privateFile);
|
||||
@ -213,7 +214,7 @@ public final class Encryption
|
||||
}
|
||||
}
|
||||
|
||||
private SecretKey getAesKey(Path path, KeyPair pair)
|
||||
private SecretKey getAesKey(Path path, KeyPair pair) throws IOException
|
||||
{
|
||||
if(Files.notExists(path))
|
||||
return createAesKey(path, pair);
|
||||
@ -232,6 +233,7 @@ public final class Encryption
|
||||
}
|
||||
|
||||
private KeyPair createRsaKeys(Path publicFile, Path privateFile)
|
||||
throws IOException
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -268,14 +270,14 @@ public final class Encryption
|
||||
|
||||
return pair;
|
||||
|
||||
}catch(GeneralSecurityException | IOException e)
|
||||
}catch(GeneralSecurityException e)
|
||||
{
|
||||
throw new CrashException(
|
||||
CrashReport.create(e, "Creating RSA keypair"));
|
||||
}
|
||||
}
|
||||
|
||||
private SecretKey createAesKey(Path path, KeyPair pair)
|
||||
private SecretKey createAesKey(Path path, KeyPair pair) throws IOException
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -293,7 +295,7 @@ public final class Encryption
|
||||
|
||||
return key;
|
||||
|
||||
}catch(GeneralSecurityException | IOException e)
|
||||
}catch(GeneralSecurityException e)
|
||||
{
|
||||
throw new CrashException(CrashReport.create(e, "Creating AES key"));
|
||||
}
|
||||
|
@ -13,14 +13,33 @@ import net.wurstclient.Category;
|
||||
import net.wurstclient.SearchTags;
|
||||
import net.wurstclient.events.UpdateListener;
|
||||
import net.wurstclient.hack.Hack;
|
||||
import net.wurstclient.settings.CheckboxSetting;
|
||||
|
||||
@SearchTags({"no fall"})
|
||||
public final class NoFallHack extends Hack implements UpdateListener
|
||||
{
|
||||
private final CheckboxSetting allowElytra = new CheckboxSetting(
|
||||
"Allow elytra",
|
||||
"Also tries to prevent fall damage while you are flying with an elytra.\n\n"
|
||||
+ "\u00a7c\u00a7lWARNING:\u00a7r This can sometimes cause you to"
|
||||
+ " stop flying unexpectedly.",
|
||||
false);
|
||||
|
||||
public NoFallHack()
|
||||
{
|
||||
super("NoFall");
|
||||
setCategory(Category.MOVEMENT);
|
||||
addSetting(allowElytra);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRenderName()
|
||||
{
|
||||
if(MC.player != null && MC.player.isFallFlying()
|
||||
&& !allowElytra.isChecked())
|
||||
return getName() + " (paused)";
|
||||
|
||||
return getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -39,13 +58,22 @@ public final class NoFallHack extends Hack implements UpdateListener
|
||||
public void onUpdate()
|
||||
{
|
||||
ClientPlayerEntity player = MC.player;
|
||||
if(player.fallDistance <= (player.isFallFlying() ? 1 : 2))
|
||||
boolean fallFlying = player.isFallFlying();
|
||||
|
||||
// pause when flying with elytra, unless allowed
|
||||
if(fallFlying && !allowElytra.isChecked())
|
||||
return;
|
||||
|
||||
if(player.isFallFlying() && player.isSneaking()
|
||||
// ignore small falls that can't cause damage
|
||||
if(player.fallDistance <= (fallFlying ? 1 : 2))
|
||||
return;
|
||||
|
||||
// attempt to fix elytra weirdness, if allowed
|
||||
if(fallFlying && player.isSneaking()
|
||||
&& !isFallingFastEnoughToCauseDamage(player))
|
||||
return;
|
||||
|
||||
// send packet to stop fall damage
|
||||
player.networkHandler.sendPacket(new OnGroundOnly(true));
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,6 @@ import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
@ -57,6 +56,7 @@ public class ClientPlayerEntityMixin extends AbstractClientPlayerEntity
|
||||
protected MinecraftClient client;
|
||||
|
||||
private Screen tempCurrentScreen;
|
||||
private boolean hideNextItemUse;
|
||||
|
||||
public ClientPlayerEntityMixin(WurstClient wurst, ClientWorld world,
|
||||
GameProfile profile)
|
||||
@ -72,15 +72,46 @@ public class ClientPlayerEntityMixin extends AbstractClientPlayerEntity
|
||||
EventManager.fire(UpdateEvent.INSTANCE);
|
||||
}
|
||||
|
||||
@Redirect(at = @At(value = "INVOKE",
|
||||
/**
|
||||
* This mixin runs just before the tickMovement() method calls
|
||||
* isUsingItem(), so that the onIsUsingItem() mixin knows which
|
||||
* call to intercept.
|
||||
*/
|
||||
@Inject(at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraft/client/network/ClientPlayerEntity;isUsingItem()Z",
|
||||
ordinal = 0), method = "tickMovement()V")
|
||||
private boolean wurstIsUsingItem(ClientPlayerEntity player)
|
||||
private void onTickMovementItemUse(CallbackInfo ci)
|
||||
{
|
||||
if(WurstClient.INSTANCE.getHax().noSlowdownHack.isEnabled())
|
||||
return false;
|
||||
hideNextItemUse = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Pretends that the player is not using an item when instructed to do so by
|
||||
* the onTickMovement() mixin.
|
||||
*/
|
||||
@Inject(at = @At("HEAD"), method = "isUsingItem()Z", cancellable = true)
|
||||
private void onIsUsingItem(CallbackInfoReturnable<Boolean> cir)
|
||||
{
|
||||
if(!hideNextItemUse)
|
||||
return;
|
||||
|
||||
return player.isUsingItem();
|
||||
cir.setReturnValue(false);
|
||||
hideNextItemUse = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* This mixin is injected into a random field access later in the
|
||||
* tickMovement() method to ensure that hideNextItemUse is always reset
|
||||
* after the item use slowdown calculation.
|
||||
*/
|
||||
@Inject(at = @At(value = "FIELD",
|
||||
target = "Lnet/minecraft/client/network/ClientPlayerEntity;ticksToNextAutojump:I",
|
||||
opcode = Opcodes.GETFIELD,
|
||||
ordinal = 0), method = "tickMovement()V")
|
||||
private void afterIsUsingItem(CallbackInfo ci)
|
||||
{
|
||||
hideNextItemUse = false;
|
||||
}
|
||||
|
||||
@Inject(at = {@At("HEAD")}, method = {"sendMovementPackets()V"})
|
||||
|
@ -37,6 +37,10 @@ public abstract class GameRendererMixin
|
||||
{
|
||||
private boolean cancelNextBobView;
|
||||
|
||||
/**
|
||||
* Fires the CameraTransformViewBobbingEvent event and records whether the
|
||||
* next view-bobbing call should be cancelled.
|
||||
*/
|
||||
@Inject(at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraft/client/render/GameRenderer;bobView(Lnet/minecraft/client/util/math/MatrixStack;F)V",
|
||||
ordinal = 0),
|
||||
@ -52,6 +56,10 @@ public abstract class GameRendererMixin
|
||||
cancelNextBobView = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancels the view-bobbing call if requested by the last
|
||||
* CameraTransformViewBobbingEvent.
|
||||
*/
|
||||
@Inject(at = @At("HEAD"),
|
||||
method = "bobView(Lnet/minecraft/client/util/math/MatrixStack;F)V",
|
||||
cancellable = true)
|
||||
@ -65,9 +73,14 @@ public abstract class GameRendererMixin
|
||||
cancelNextBobView = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* This mixin is injected into a random method call later in the
|
||||
* renderWorld() method to ensure that cancelNextBobView is always reset
|
||||
* after the view-bobbing call.
|
||||
*/
|
||||
@Inject(at = @At("HEAD"),
|
||||
method = "renderHand(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/Camera;F)V")
|
||||
private void renderHand(MatrixStack matrices, Camera camera,
|
||||
private void onRenderHand(MatrixStack matrices, Camera camera,
|
||||
float tickDelta, CallbackInfo ci)
|
||||
{
|
||||
cancelNextBobView = false;
|
||||
|
@ -128,11 +128,12 @@ public class WurstOptionsScreen extends Screen
|
||||
b -> os.open(
|
||||
"https://wurst.wiki/?utm_source=Wurst+Client&utm_medium=Wurst+Options&utm_content=Wurst+Wiki"));
|
||||
|
||||
new WurstOptionsButton(54, 72, () -> "Twitter", "@Wurst_Imperium",
|
||||
b -> os.open("https://www.wurstclient.net/twitter/"));
|
||||
new WurstOptionsButton(54, 72, () -> "WurstForum", "WurstForum.net",
|
||||
b -> os.open(
|
||||
"https://wurstforum.net/?utm_source=Wurst+Client&utm_medium=Wurst+Options&utm_content=WurstForum"));
|
||||
|
||||
new WurstOptionsButton(54, 96, () -> "Reddit", "r/WurstClient",
|
||||
b -> os.open("https://www.wurstclient.net/reddit/"));
|
||||
new WurstOptionsButton(54, 96, () -> "Twitter", "@Wurst_Imperium",
|
||||
b -> os.open("https://www.wurstclient.net/twitter/"));
|
||||
|
||||
new WurstOptionsButton(54, 120, () -> "Donate",
|
||||
"WurstClient.net/donate", b -> os.open(
|
||||
|
@ -17,6 +17,7 @@ import net.minecraft.network.encryption.ClientPlayerSession;
|
||||
import net.minecraft.network.message.MessageChain;
|
||||
import net.minecraft.network.message.MessageSignatureData;
|
||||
import net.minecraft.text.Text;
|
||||
import net.wurstclient.Category;
|
||||
import net.wurstclient.DontBlock;
|
||||
import net.wurstclient.SearchTags;
|
||||
import net.wurstclient.WurstClient;
|
||||
@ -118,6 +119,12 @@ public final class NoChatReportsOtf extends OtherFeature
|
||||
disableSignatures.setChecked(!disableSignatures.isChecked());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Category getCategory()
|
||||
{
|
||||
return Category.CHAT;
|
||||
}
|
||||
|
||||
// See ChatHudMixin, ClientPlayNetworkHandlerMixin.onOnServerMetadata(),
|
||||
// MinecraftClientMixin.onGetProfileKeys()
|
||||
}
|
||||
|
@ -45,6 +45,7 @@
|
||||
"modmenu": {
|
||||
"links": {
|
||||
"Wiki": "https://wurst.wiki/?utm_source=Wurst+Client&utm_medium=ModMenu&utm_content=Wiki",
|
||||
"Forum": "https://wurstforum.net/?utm_source=Wurst+Client&utm_medium=ModMenu&utm_content=Forum",
|
||||
"Donate": "https://www.wurstclient.net/donate/?utm_source=Wurst+Client&utm_medium=ModMenu&utm_content=Donate"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user