Fire-Resistance type potion for custom fluid

Started by TheGreenFax on Sat, 08/15/2020 - 03:05

Topic category: Help with modding (Java Edition)

Last seen on 18:39, 29. Jul 2021
Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Fire-Resistance type potion for custom fluid
Sat, 08/15/2020 - 03:05

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:
  • Tracker tickets:
  • 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 18:39, 29. Jul 2021
Joined Mar 2018
Points:

User statistics:

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

It worked! Thank you so much. :)