Closed heckerpowered closed 1 month ago
- You can modify params in Inject using https://github.com/LlamaLad7/MixinExtras/wiki/Local
- You can get all the params in a ModifyVariable by simply appending them to your handler's params as explained in the docs https://jenkins.liteloader.com/view/Other/job/Mixin/javadoc/org/spongepowered/asm/mixin/injection/ModifyVariable.html
Thanks
In the above code, I injected the beginning of the damage method, and I want to make it so that when a creature takes damage, it increases or decreases the amount of damage it takes based on certain conditions (which need to be determined using DamageSource). However, if I use @Inject, I cannot modify the parameters. If I use @ModifyVariable, I cannot get the other parameters.