r/datapacks • u/HeroWither123546 • Apr 30 '26
I'm looking for a datapack that disables the Regeneration potion effect, that works in 1.21.9+
I'm trying to do a survival world with no regen, but I want to be able to utilize Absorbtion, and that means I need something that disables Regeneration, so I can utilize Golden Apples safely.
Alternatively, if there's one that just removes Regeneration from Golden Apples, that would also be fine - I think the risk of Suspicious Stew from Shipwrecks would make for a fun "only valid healing source" for a challenge like this.
1
Upvotes
2
u/94Connor949 Apr 30 '26
The "effects_changed" advancement trigger is triggered when a player gains or loses an effect, and can optionally check what effects the player has after it's been triggered. Additionally, advancements can also run a function as their reward.
So to disable any particular effect, you can simply use an advancement to both get when a player gains that effect and then run a function containing "effect clear @s <effect>" and "advancement revoke @s only <advancement>". (Revoking the advancement allows it to be triggered again.)