Is it possible to have a potion effect that temporarily allows me to break bedrock?

Started by Game_Log on

Topic category: Help with modding (Java Edition)

Last seen on 18:36, 15. Aug 2021
Joined Feb 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is it possible to have a potion effect that temporarily allows me to break bedrock?

Essentially I have an idea where I eat an item in my mod, and upon doing so it gives me a potion effect called Vigor. This Vigor effect should then allow me to break bedrock when using a pickaxe (with varying speeds depending on the type). As soon as the effect expires, I want to revert back to not breaking bedrock, including if I am currently breaking a block.

Is such an effect possible? If so, how would I go about implementing that?