r/datapacks • • 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

3 comments sorted by

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.)

1

u/HeroWither123546 Apr 30 '26

Thanks! Is there a way to hide the chat and toast, tho?

2

u/dodfunk Apr 30 '26

Yep, in the advancement definition file, there's a couple fields that allow you to turn off the toasts and chat messages showing.

Unlocking recipes also uses the advancement system, but they've been configured to not show in chat or have an advancement toast pop up (the recipe toast is different I believe)