You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on my add-on for Cyberware/Robotic Parts for 1.12.2 and one of the items I'd like to add is an augment that at the cost of energy helps protect against DR Radiation. The problem I run into is that DR pretty much only looks for armor for the purposes of determining radiation protection.
If DR also posted an event with the Entity affected as well as their current protection rating, it'd make it rather easy for add-on's like mine to listen for that event and if needed either modify the protection amount that should be used, cancel the event, or trigger additional effects to the entity being affected.
I'm working on my add-on for Cyberware/Robotic Parts for 1.12.2 and one of the items I'd like to add is an augment that at the cost of energy helps protect against DR Radiation. The problem I run into is that DR pretty much only looks for armor for the purposes of determining radiation protection.
If DR also posted an event with the Entity affected as well as their current protection rating, it'd make it rather easy for add-on's like mine to listen for that event and if needed either modify the protection amount that should be used, cancel the event, or trigger additional effects to the entity being affected.
As a proof of concept, I made a local branch with these changes to see how it would work out. The LivingRadiationEvent (RadiationEffectsEvent?) extends LivingEvent and tracks the EntityLivingBase affected and their protection value.
https://github.com/mallrat208/DeepResonance/blob/7bcd7153a6fecd5901c49435cfa10fd326fcbb1a/src/main/java/mcjty/deepresonance/radiation/LivingRadiationEvent.java#L7-L34
The LivingRadiationEvent is posted and the protection value is reset based on the results of the event. If the event is canceled the potion effects never get applied.
https://github.com/mallrat208/DeepResonance/blob/7bcd7153a6fecd5901c49435cfa10fd326fcbb1a/src/main/java/mcjty/deepresonance/radiation/RadiationTickEvent.java#L265-L277
The text was updated successfully, but these errors were encountered: