3

Enchants

Saniritvikk 5/26/22 3:48 pm
138
6/6/2022 1:30 pm
I want to make a sword when right clicked it shoots a laser, one problem since I need to make it a carrot on a stick for that I can't enchant it normally in survival mode with sharpness 5 and ext. is there a way to make so that is possible without needing to make it pre-enchanted?
Posted by
Saniritvikk
Level 15 : Journeyman Miner
0

  Have something to say?

JoinSign in

11

HoboMaggot
05/28/2022 4:44 am
Level 55 : Grandmaster Blob
While you're holding the item, use an invisible, teleporting villager for right click detection
https://www.youtube.com/watch?v=HTBsnv6v_Hc
Although this isn't survival friendly as when you left click, the villager blocks ur damage.

This is the only way to right click without using a coas or eye of ender
1
Rob333
05/27/2022 5:55 pm
He/Him • Level 50 : Grandmaster Sus Imposter
Maybe if you make a sword with a special tag and with a function you detect when the player shifts with the sword with special tags on the hand for shooting the laser in that moment, so with this you would need to shift for shooting laser, but it is impossible to make it shooting the laser when right clicking (i´m not sure about the last).
1
JustAnotherDeletedAccount
05/26/2022 4:11 pm
Level 6 : Apprentice System
Maybe don't take my advice (I'm stupid)
But I would make custom recipes and a
the custom item for every enchantment.

Well it depends on how many enchantments
should be
possible, if there is only sharpness
then maybe do
that otherwise when there is
like sharpness,
mending, unbreaking, etc.
then maybe someone
else has the answer
¯\_(ツ)_/¯
1
Saniritvikk
05/27/2022 2:54 pm
Level 15 : Journeyman Miner
That would work, but here are the problems:




1. How am I supposed to detect the enchantment book since when you say "Enchanting book" it is any enchantment book



2. If someone has like sharpness 5 on something and they want mending on it they would only get a sword with mending



3. A lot of crafting recipes
1
JustAnotherDeletedAccount
05/27/2022 4:57 pm
Level 6 : Apprentice System
Wait how does Minecraft comprehend enchantments then?
1
Rob333
05/27/2022 5:12 pm
He/Him • Level 50 : Grandmaster Sus Imposter
With NBT´s, there is one called "Enchantments".
1
Saniritvikk
05/27/2022 9:50 pm
Level 15 : Journeyman Miner
I already tried using enchantments it just failed
1
JustAnotherDeletedAccount
05/28/2022 3:49 am
Level 6 : Apprentice System
You said you wanted a "laser sword" so normal sharpness would be useless anyway, why not use custom enchantments?

My ideas:

Beam | --> Beam ||||| [Makes the Laser stronger/lets the laser make more damage] [Idk you're handling the damage but I assume it's per second so for every beam level +1 damage per second]

Power | --> Power ||| [Lets the laser be activated longer] [Once again idk how you're making the laser but this enchantment would allow holding the beam/laser longer before it would deactivate]


Laser Handle | --> Laser Handle ||| [Makes the Laser/Beam bigger] [Makes the beam size bigger]

Repairing electric | [Like Mending, repairs your sword] [Repairs your Laser sword]


Fast Laser | --> Fast Laser || Makes the laser have a tinier cooldown] [Idk how you're doing this but with this, there is a shorter cooldown between shot laser beams]
1

Welcome