Help with an enchantment

Started by unseen433 on

Topic category: User side tutorials

Active 3 years ago
Joined May 2019
Points:
657

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 0
Help with an enchantment

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

Active 3 years ago
Joined Mar 2021
Points:
550

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 4
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.

 

Active 2 years ago
Joined Jun 2018
Points:
693

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 4
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"

Active 5 months ago
Joined May 2020
Points:
715

User statistics:

  • Modifications: 3
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 128
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