Skip to content

Commit

Permalink
fix: #84
Browse files Browse the repository at this point in the history
  • Loading branch information
zly2006 committed Dec 20, 2024
1 parent 2ad1387 commit 2bbb41c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'fabric-loom' version '1.8-SNAPSHOT'
id 'fabric-loom' version '1.9.2'
}

//sourceCompatibility = JavaVersion.VERSION_21
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ minecraft_version_out = 1.21.3
minecraft_version = 1.21.3
mappings_version = 1.21.3+build.2

fabric_loader_version = 0.16.7
fabric_loader_version = 0.16.9
mod_menu_version = 12.0.0-beta.1
# fabric_api_version = 0.106.1+1.21.3
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2bbb41c

Please sign in to comment.