Skip to content

Commit

Permalink
fix: #84 (#87)
Browse files Browse the repository at this point in the history
* fix: #84

* Revert changes to loom / gradle, etc; and bump MaLiLib.

---------

Co-authored-by: Sakura Ryoko <[email protected]>
  • Loading branch information
zly2006 and sakura-ryoko authored Dec 20, 2024
1 parent 2ad1387 commit 3322caf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@

"depends": {
"minecraft": ">=1.21.2 <=1.21.3",
"malilib": ">=0.22.3-sakura.5"
"malilib": ">=0.22.3-sakura.6"
}
}

0 comments on commit 3322caf

Please sign in to comment.