From 3322caf6b91fc66d074aa814f8f65d7fe241f4d5 Mon Sep 17 00:00:00 2001 From: Liyan Zhao Date: Sat, 21 Dec 2024 01:00:07 +0800 Subject: [PATCH] fix: sakura-ryoko#84 (#87) * fix: sakura-ryoko#84 * Revert changes to loom / gradle, etc; and bump MaLiLib. --------- Co-authored-by: Sakura Ryoko --- gradle.properties | 2 +- .../dy/masa/tweakeroo/mixin/MixinClientPlayerEntity.java | 9 ++++----- src/main/resources/fabric.mod.json | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/gradle.properties b/gradle.properties index 010cd3f72..b080b64c1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,7 +12,7 @@ mod_file_name = tweakeroo-fabric mod_version = 0.22.2-sakura.7 # Required malilib version -malilib_version = 19395e4326 +malilib_version = 651ec77cbf # Minecraft, Fabric Loader and API and mappings versions minecraft_version_out = 1.21.3 diff --git a/src/main/java/fi/dy/masa/tweakeroo/mixin/MixinClientPlayerEntity.java b/src/main/java/fi/dy/masa/tweakeroo/mixin/MixinClientPlayerEntity.java index 60d6c1637..bce786c14 100644 --- a/src/main/java/fi/dy/masa/tweakeroo/mixin/MixinClientPlayerEntity.java +++ b/src/main/java/fi/dy/masa/tweakeroo/mixin/MixinClientPlayerEntity.java @@ -124,14 +124,13 @@ private void disableDoubleTapSprint(CallbackInfo ci) @Inject(method = "tickMovement", at = @At(value = "INVOKE", shift = At.Shift.BEFORE, - target = "Lnet/minecraft/client/network/ClientPlayerEntity;isGliding()Z")) + target = "Lnet/minecraft/client/network/ClientPlayerEntity;checkGliding()Z")) private void onFallFlyingCheckChestSlot(CallbackInfo ci) { - if (FeatureToggle.TWEAK_AUTO_SWITCH_ELYTRA.getBooleanValue() && - this.input.playerInput.jump() && this.input.playerInput.forward()) + if (FeatureToggle.TWEAK_AUTO_SWITCH_ELYTRA.getBooleanValue()) { - // PlayerEntity#checkFallFlying - if (!this.isOnGround() && !this.isGliding() && !this.isInFluid() && !this.isClimbing() && !this.hasStatusEffect(StatusEffects.LEVITATION)) + // this.checkGliding() + if (!this.isOnGround() && !this.hasVehicle() && this.glidingTicks == 0 && !this.isInFluid() && !this.isClimbing() && !this.hasStatusEffect(StatusEffects.LEVITATION)) { if (!this.getEquippedStack(EquipmentSlot.CHEST).isOf(Items.ELYTRA) || this.getEquippedStack(EquipmentSlot.CHEST).getDamage() > this.getEquippedStack(EquipmentSlot.CHEST).getMaxDamage() - 10) diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 389d00221..9a7e7ff26 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -34,6 +34,6 @@ "depends": { "minecraft": ">=1.21.2 <=1.21.3", - "malilib": ">=0.22.3-sakura.5" + "malilib": ">=0.22.3-sakura.6" } }