Started by
Vexilotus
on
Topic category: Help with Minecraft modding (Java Edition)
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?
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
Thank you so much!
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.
"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.
Thank you!
No problem :)
Hey guys, had a very similar issue. How to make sure that after eating a certain food, the player receives buffs under water and debuffs on land, but make sure that the system constantly checks whether the player is on land or under water, and, depending on this, changes the effects for a certain period of time. How can this be done?