Help with an enchantment

Started by unseen433 on Sun, 06/06/2021 - 14:20

Topic category: User side tutorials

Last seen on 20:20, 7. Jun 2021
Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Help with an enchantment
Sun, 06/06/2021 - 14:20

Im trying to figure out a way to make a dash enchantment. The idea is that when the player right-clicks with a sword they are propelled forward.

An example is that if you have dashing 5 and you right-click with a sword, you will be propelled forward 5 blocks.

Thank you to anyone that helps

Last seen on 05:45, 28. Jul 2021
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
First , create a enchantment…
Mon, 06/07/2021 - 06:37

First , create a enchantment 'Dashing' with maximum level of 5 , then create a procedure and recreate this:

 Event trigger - Player right clicks with item

  If ---------------And-----And----------- Has provided itemstack enchantment Custom:Dashing

                          |               ----------- Get level of enchantment of provided itemstack type Custom:Dashing = 5

                          L______________ Is provided itemstack tooltype = Sword

 Do ------ Execute command / tp @p ^5 ^ ^ at x y z

(These are all procedure blocks)

let me know if this helped.

 

Last seen on 18:23, 20. Jun 2021
Joined Jun 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
It wouldn't really be dash…
Sun, 06/13/2021 - 09:31

It wouldn't really be dash but teleport, as the player would be able to pass through blocks with it. And it would always teleport player on the x axis, so in one of 8 different directions.

I would instead either increase motion of the direction player is facing, or make a check if there are blocks in the way of the player (that aren't grass), check which direction player is facing and tp on that axis for either -5 or 5.

Also I'm pretty sure you don't have to make such a big if block, instead you can create a local variable called "level" and assign to it enchantment level, and then when specyfying how many blocks player should dash through just use "get local variable: level"

Last seen on 12:41, 28. Jul 2021
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
For the dash instead of the…
Sun, 06/13/2021 - 10:49

For the dash instead of the teleportation, here is the procedure :https://mcreator.net/forum/69055/how-does-one-send-player-direction-hes… increase the range depending on the enchantement level, multiply each final value (the result of the calcul of x, y and z) by the level of the enchantement