0

I want to make this sword that, when you right/left click it, it summons particles that go in a straight line and deal damage to anything they touch. I have only basic knowledge on stuff like this, and I think the first step would be making a scoreboard that detects when the player right clicks with the sword. However, I do not know the rest. Does anyone have an idea on how this is done in java 1.16? Thanks!

1 Answer 1

1

According to MCreator, this is the steps for the command to make a sword shoot fireballs:

  • Make the item when right clicked (sword).

  • Select "execute command".

  • Put /summon Fireball ~ ~2 ~ {ExplosionPower:2,direction:[0.0,0.0,0.0]} in the blank area.

Something to notice though, when the command is executed, the fireballs will be summon on top of the player's head and it will stay there until the player hit the fireball, like when you punch the fireball back at Ghast. Another thing to notice is that the explosion power can be change to any number, but I'd suggest you to keep the number small, don't make it bigger than 5 or else your computer will lag (if you don't have a good computer)

So, you should make a sword and execute that command, which will throw a fireball when right clicked when sword is equipped.

2
  • Thank you, I will try that! Apr 29, 2021 at 18:45
  • Additionally you could repeatedly put particles on the fireball and make the fireball invisible (which Im not too sure how to do that last part, but im pretty sure u can). Also do keep in mind that fireballs will break certain blocks on contact, but I'm guessing you could adjust that by making the explosion power 0 or something.
    – Penguin
    Apr 30, 2021 at 14:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .