Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix OpenBlocks Last Stand trigger condition #477

Merged
merged 2 commits into from
May 29, 2024

Conversation

jchung01
Copy link
Contributor

@jchung01 jchung01 commented May 29, 2024

Fixes the Last Stand enchant triggering on pre-mitigation damage (before enchants, potions, etc). It now triggers on post-mitigation damage, as originally intended.

The specific way this tweak is implemented is to offer maximum compatibility with other mixins (e.g. Dimension Hopper Tweaks) into this method. As a side effect, this does cause an extra object allocation for each player damage event, but that should be okay.

Also bumps required min version of MixinBooter to 8.9 for @WrapOperation on NEW object instantatiations.

jchung01 added 2 commits May 28, 2024 16:50
- Last Stand should trigger on post-mitigation damage, not pre-mitigation
- Bumps MixinBooter version to 8.9
Copy link

what-the-diff bot commented May 29, 2024

PR Summary

  • New fix described for Last Stand enchantment in README.md
    The documentation has been updated to mention a fix for an issue where the Last Stand enchantment was being triggered prematurely.
  • Added dependency in build.gradle
    The project now includes an additional compile-only dependency specified - openblocks-228816.
  • New registration in UniversalTweaks.java
    We have included a new registration for event handling relating to OpenBlocks mod events. This will allow our app to better respond to certain OpenBlocks events.
  • Toggle for Last Stand trigger fix in UTConfigMods.java
    Introduced a toggle field to enable or disable the new fix for triggering Last Stand enchantment.
  • New mapping in UTMixinLoader.java
    The Mixin mapping has been extended to incorporate the latest modifications to openblocks and its characteristics.
  • New event handler for Last Stand in UTOpenBlocksEvents.java
    Introduced a specific class to manage the Last Stand enchantment. This class includes a method to specifically handle this particular enchantment issue.
  • Additional file for handling post-mitigation damage WrappedLivingHurtEvent.java
    Added a new file that further refines how we handle post-mitigation damage events.
  • Mixin Binding in UTConfigMixin.java
    The LastStandEnchantmentsHandler is now allocated to the UTOpenBlocksEvents class thanks to a new binding via a mixin class.
  • Alteration of hurt event handling in UTLastStandEnchantmentsHandlerMixin.java
    The onHurt() method has been modified to only handle LivingDamageEvent exclusive from LivingHurtEvent.
  • New localization entry in en_us.lang
    Added a new translation for configuration options related to the universaltweaks and openblocks modes.
  • Specification of mixins for openblocks in new JSON file
    Identified the mixins to be applied to the openblocks mod via a new JSON file.

@ACGaming ACGaming merged commit 77d1825 into ACGaming:main May 29, 2024
1 check passed
@jchung01 jchung01 deleted the openblocks-last-stand branch May 29, 2024 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants