Fire-Resistance type potion for custom fluid

Started by TheGreenFax on

Topic category: Help with modding (Java Edition)

Last seen on 17:20, 3. Mar 2024
Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Fire-Resistance type potion for custom fluid

Hi. So, I made a custom fluid that damages the player and gives an effect when they step in it. I'm now trying to create a potion that prevents that from happening. I'm using a procedure, but I'm not sure how to do this and what blocks I should try and use. Any idea on how to do this?

Last seen on 03:47, 4. Sep 2020
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If the damage to the entity …
Sun, 08/16/2020 - 04:29

If the damage to the entity (player in this case) is in the "OnEntityCollides" trigger of the fluid you can do the following:

Before hurting the entity that is colliding with the fluid, you can check if the potion (effect) that you created is active in the entity and if it is, you can skip the part where you damage it.

 

Hope it helps!

Last seen on 17:20, 3. Mar 2024
Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It worked! Thank you so much…
Sun, 08/16/2020 - 18:31

It worked! Thank you so much. :)