Make Custom Entity Move Faster When in Water?

Started by ValerianMC on Tue, 08/18/2020 - 11:24

Topic category: Help with modding (Java Edition)

Last seen on 11:27, 25. Oct 2020
Joined Jul 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Make Custom Entity Move Faster When in Water?
Tue, 08/18/2020 - 11:24

Is there any way (by procedure or other means) to make a custom entity move faster when they're in water and also for a player to move faster in water when holding a certain item?

Last seen on 19:10, 28. Oct 2020
Joined Jun 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
For the entity, you could…
Tue, 08/18/2020 - 12:12

For the entity, you could bind this procedure to the "on entity tick rate" trigger:

If (block at x, y, z) = (water)

give dolphin grace effect to the mob for 20 ticks

 

For the item, bind this procedure to the "on item tick in player hand":

Give speed effect to the mob for 20 ticks

 

To make it work with a vanilla item you should use a global trigger

Last seen on 11:27, 25. Oct 2020
Joined Jul 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Thank you so much!
Wed, 08/19/2020 - 11:26

Thank you so much!

Last seen on 11:27, 25. Oct 2020
Joined Jul 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I think I understand what…
Wed, 08/19/2020 - 11:48

I think I understand what the procedure needs to look like, however, I'm having troubles find the "block at x, y, z" block and the one where i can insert water.

Last seen on 08:28, 9. Oct 2020
Joined Jul 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
"Get block at x y z" is…
Wed, 08/19/2020 - 23:32

"Get block at x y z" is second to bottom in the "block procedures" section (it is yellow). The block you can insert the water into is in the "minecraft components" section (the only yellow one). In "logic" you want the bottom block (also yellow) for comparing the other two.

Last seen on 11:27, 25. Oct 2020
Joined Jul 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Thank you!
Fri, 08/21/2020 - 12:30

Thank you!

Last seen on 08:28, 9. Oct 2020
Joined Jul 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
No problem :)
Fri, 08/21/2020 - 17:57

No problem :)