diff --git a/src/main/java/fi/dy/masa/tweakeroo/config/FeatureToggle.java b/src/main/java/fi/dy/masa/tweakeroo/config/FeatureToggle.java index 0c7bd30ad..898415427 100644 --- a/src/main/java/fi/dy/masa/tweakeroo/config/FeatureToggle.java +++ b/src/main/java/fi/dy/masa/tweakeroo/config/FeatureToggle.java @@ -22,7 +22,7 @@ public enum FeatureToggle implements IHotkeyTogglable, IConfigNotifiable blockReachDistance"), TWEAK_BLOCK_TYPE_BREAK_RESTRICTION("tweakBlockTypeBreakRestriction", false, "", "Restricts which blocks you are able to break (manually).\nSee the corresponding 'blockBreakRestriction*' configs in the Lists category."), TWEAK_BREAKING_GRID ("tweakBreakingGrid", false, "", KeybindSettings.INGAME_BOTH, "When enabled, you can only break blocks in\na grid pattern, with a configurable interval.\nTo quickly adjust the interval, scroll while\nholding down the tweak toggle keybind."), 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 542267f96..a50bbe935 100644 --- a/src/main/java/fi/dy/masa/tweakeroo/mixin/MixinClientPlayerEntity.java +++ b/src/main/java/fi/dy/masa/tweakeroo/mixin/MixinClientPlayerEntity.java @@ -132,12 +132,15 @@ private void onFallFlyingCheckChestSlot(CallbackInfo ci) { if (FeatureToggle.TWEAK_AUTO_SWITCH_ELYTRA.getBooleanValue()) { - // auto switch if it is not elytra after falling more than 20 blocks, or is totally broken. - // This also shouldn't activate on the Ground if the Chest Equipment is EMPTY, or not an Elytra - // To be swapped back. + // Sakura's version calculating fall distance... + /* if ((!this.getEquippedStack(EquipmentSlot.CHEST).isOf(Items.ELYTRA) && this.fallDistance > 20.0f) || (this.getEquippedStack(EquipmentSlot.CHEST).getDamage() > this.getEquippedStack(EquipmentSlot.CHEST).getMaxDamage() - 10) && (!this.getEquippedStack(EquipmentSlot.CHEST).isEmpty() || this.autoSwitchElytraChestplate.isOf(Items.ELYTRA))) + */ + // auto switch if it is not elytra or is totally broken. + if (getEquippedStack(EquipmentSlot.CHEST).isOf(Items.ELYTRA) == false || + getEquippedStack(EquipmentSlot.CHEST).getDamage() > getEquippedStack(EquipmentSlot.CHEST).getMaxDamage() - 10) { this.autoSwitchElytraChestplate = this.getEquippedStack(EquipmentSlot.CHEST).copy(); InventoryUtils.swapElytraWithChestPlate(this);