How to make the entity / player float on fluid?

Started by EnderKasra on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make the entity / player float on fluid?

So in my mod, there is saltwater which if you don't know, in real life you can float in saltwater but I cant find a way to make my entity/players float? Help!

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Simple answer is, within theā€¦
Tue, 09/26/2023 - 03:50

Simple answer is, within the fluids element, create a "player collides with block" trigger. The "if get block at x y z" equals your liquid (use the XYZ to determine where the player is in relation to the liquid, so that this will only affect the player when they are under the liquid and not all the way outside of it) do attempt to override notion of event/target entity to get x velocity get y velocity + (number. Play around with it to get the "bouncyness" you desire) get z velocity.

Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks stitch!
Tue, 09/26/2023 - 07:54

Thanks stitch!