Detecting left click is easy, but you have to summon an invisible entity at the player each tick. That way, when the player hits, the invisible entity get damage and you can test for that. Additionaly, you can summon the entity only if the player is holding the "wand" (as when the entity is here, the player can't hit blocks or other entities)
For throwing the fireball, it's even easier, I made a fireball wand datapack to somebody a couple weeks ago... You can even change the reload cooldown and the fireball power with scoreboards, and these stats are displayed on the screen, could be different stats for each player
I got into chiptune music composition.
You can listen to them on my Youtube channel : https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).
Detecting left click is easy, but you have to summon an invisible entity at the player each tick. That way, when the player hits, the invisible entity get damage and you can test for that. Additionaly, you can summon the entity only if the player is holding the "wand" (as when the entity is here, the player can't hit blocks or other entities)
For throwing the fireball, it's even easier, I made a fireball wand datapack to somebody a couple weeks ago... You can even change the reload cooldown and the fireball power with scoreboards, and these stats are displayed on the screen, could be different stats for each player
to detect a right-click, you can summon an invisible villager in front of the player and use the "minecraft.custom:minecraft.talked_to_villager" criteria to detect the click but this would obstruct the player from interacting with anything else.
The Meaning of Life, the Universe, and Everything.
Location:
Quebec
Join Date:
6/29/2014
Posts:
50
Minecraft:
Avarthar
Member Details
You could use some throwable item instead of a stick and simply retexture it in a resource pack to look like a stick, then you could detect when the item was used and use the direction the egg was thrown towards (Using it's local coordinates +1 in Z if I recall well: something like; ^ ^ ^1) then spawn a fire charge literally and disable the explosions for a few seconds or simply spawn a fire sprite following an armor stand or in the armor stand's hand and simply delete the armor stand after spawning explosion particles without triggering any block destruction.
As for the item you could have a quantity of it that changes to show some kind of "mana-point" or depending on how much mana you have that is stored in a scoreboard, you'd have a command run, giving you 1 egg per amount of mana points required and simply remove one of the egg once the mana goes down when using another spell.
With that, no entities would be in front of you or that would prevent you from interacting with anything and you would have a spell that works.
whats the easiest way to make a stick that shoots fireballs if you attack (or just click the left button)?
preferably fireballs that dont destroy blocks...
probably not that easy but i bet someone can help me!
thanks in advance!
Don't forget edgars283 is talking about Left-click detection... Eggs, carrot-on-a-stick and other right-click detectables are not what we're searching for here
You could use some throwable item instead of a stick and simply retexture it in a resource pack to look like a stick, then you could detect when the item was used and use the direction the egg was thrown towards (Using it's local coordinates +1 in Z if I recall well: something like; ^ ^ ^1)
You don't need to make a ressourcepack for all of that, as :
-We're not searching for right-click detection
-No need to get a thrown item's motion to set the fireball direction : It's easy to get the player looking direction then summoning a fireball with a motion set by looking at this parameter
then spawn a fire charge literally and disable the explosions for a few seconds or simply spawn a fire sprite following an armor stand or in the armor stand's hand and simply delete the armor stand after spawning explosion particles without triggering any block destruction.
Look at the Fireball's nbt before creating a system for replace it!
-You talk about fire charges : The blaze projectiles, which only set fire and no explosion
-You will have to summon a fireball with the ExplosionPower tag set to 0, so no damage to the land (but low damage too)
Rollback Post to RevisionRollBack
I got into chiptune music composition.
You can listen to them on my Youtube channel : https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).
Before trying to imagine some systems, you could look at my datapack (https://ufile.io/nmuof0v4) -Be in creative when typping /reload in order to get the wand and instructions- :
Features:
-Right-click detection with carrot-on-a-stick (but we're searching for left-click, we'll have to change that)
-Getting the player's direction when shooting and summoning a fireball with a motion value set from the player's direction
-ExplosionPower and Cooldown can be changed with scoreboards (yes, I can change the NBT value through scores)
So we don't have to search how to summon the fireball, this is made in the pack. All we need is a left-click detector.
What do you think about that, edgars283?
Rollback Post to RevisionRollBack
I got into chiptune music composition.
You can listen to them on my Youtube channel : https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).
Before trying to imagine some systems, you could look at my datapack (https://ufile.io/nmuof0v4) -Be in creative when typping /reload in order to get the wand and instructions- :
Features:
-Right-click detection with carrot-on-a-stick (but we're searching for left-click, we'll have to change that)
-Getting the player's direction when shooting and summoning a fireball with a motion value set from the player's direction
-ExplosionPower and Cooldown can be changed with scoreboards (yes, I can change the NBT value through scores)
So we don't have to search how to summon the fireball, this is made in the pack. All we need is a left-click detector.
What do you think about that, edgars283?
i guess i could download your datapack. thanks to everyone for helping me btw
so i downloaded the data pack and i think that this is good enough but i didnt quite understand how to change the power or cooldown of the wand and i would prefer that it didnt show the text of power and cooldown when a player acquires it .-.
-Go to data\magic\functions and open the "main.mcfunction" file with any text editor (notepad,...)
-Simply delete the following content from the function; It's supposed to be at the beggining
#Display wand holders their stats
title @a[nbt={SelectedItem:{tag:{WandType:"Firewand"}}}] actionbar ["",{"text":"Reload time : ","color":"gold"},{"score":{"name":"@p","objective":"FCDOperation"},"color":"red"},{"text":" Fireball power : ","color":"gold"},{"score":{"name":"@p","objective":"FireballPower"},"color":"red"}]
Then, in the same function, delete the last line :
#
execute as @a[nbt={SelectedItem:{tag:{WandType:"Firewand"}}}] if score @s FireballCoolDown >= @s FireballReload run function magic:firewandcooldownoperation
Finaly, delete the firewandcooldownoperation.mcfunction file (always in data\magic\functions) as you don't need it any more.
For changing individual player power/cooldown, there're 2 scores : "FireballPower" and "FireballCoolDown". These values are set to 0 to each new player when reloading the pack
-FireballPower sets... The fireball explosion power lol (0 = no land damage) -Increase at your own risks lol-
-FireballCoolDown is the time (in ticks : 1/20 second) before being able to shoot again
Before a player shoots, the pack looks for its scores and set the cooldown and explosion power; This allow you to give different values to different players
For example, if I set myself a FireballPower score of 3 and FireballCoolDown of 20, I will shoot fireballs which will have an ExplosionPower value of 3 and i will be able to shoot every 1 seconds.
Rollback Post to RevisionRollBack
I got into chiptune music composition.
You can listen to them on my Youtube channel : https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).
Yeah but where/how can i change them? im lost- data packs are new to me >-<
when you download the data pack, extract the archive and go into data > magic > functions and there you will find all the files eglaios was talking about. To open them, right-click a file and choose "edit" to open them in notepad.
I got into chiptune music composition.
You can listen to them on my Youtube channel : https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).
Hey!
whats the easiest way to make a stick that shoots fireballs if you attack (or just click the left button)?
preferably fireballs that dont destroy blocks...
probably not that easy but i bet someone can help me!
thanks in advance!
HI
Did you see this on a server? because that's done with plugins and not with vanilla commands.
Minecraft doesn't have any implemented way of detecting right clicks (except with a carrot on a stick).
Now because I'm not great with fireballs, I can only direct you to the wiki: https://minecraft.gamepedia.com/Ghast#Data_values_2
you can find all of its properties if you scroll down to the "data values" section.
Command block engineer // Developer // #TeamTrees
Detecting left click is easy, but you have to summon an invisible entity at the player each tick. That way, when the player hits, the invisible entity get damage and you can test for that. Additionaly, you can summon the entity only if the player is holding the "wand" (as when the entity is here, the player can't hit blocks or other entities)
For throwing the fireball, it's even easier, I made a fireball wand datapack to somebody a couple weeks ago... You can even change the reload cooldown and the fireball power with scoreboards, and these stats are displayed on the screen, could be different stats for each player
If you want, I could send the datapack's link
Here's the link to the fireball wand datapack :
https://ufile.io/nmuof0v4
I got into chiptune music composition.
You can listen to them on my Youtube channel :
https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).
to detect a right-click, you can summon an invisible villager in front of the player and use the "minecraft.custom:minecraft.talked_to_villager" criteria to detect the click but this would obstruct the player from interacting with anything else.
Command block engineer // Developer // #TeamTrees
You could use some throwable item instead of a stick and simply retexture it in a resource pack to look like a stick, then you could detect when the item was used and use the direction the egg was thrown towards (Using it's local coordinates +1 in Z if I recall well: something like; ^ ^ ^1) then spawn a fire charge literally and disable the explosions for a few seconds or simply spawn a fire sprite following an armor stand or in the armor stand's hand and simply delete the armor stand after spawning explosion particles without triggering any block destruction.
As for the item you could have a quantity of it that changes to show some kind of "mana-point" or depending on how much mana you have that is stored in a scoreboard, you'd have a command run, giving you 1 egg per amount of mana points required and simply remove one of the egg once the mana goes down when using another spell.
With that, no entities would be in front of you or that would prevent you from interacting with anything and you would have a spell that works.
Most of my replies are boring at best, but you cannot say I did not try. Just like this signature for example.
Hey!
whats the easiest way to make a stick that shoots fireballs if you attack (or just click the left button)?
preferably fireballs that dont destroy blocks...
probably not that easy but i bet someone can help me!
thanks in advance!
Don't forget edgars283 is talking about Left-click detection... Eggs, carrot-on-a-stick and other right-click detectables are not what we're searching for here
You don't need to make a ressourcepack for all of that, as :
-We're not searching for right-click detection
-No need to get a thrown item's motion to set the fireball direction : It's easy to get the player looking direction then summoning a fireball with a motion set by looking at this parameter
Look at the Fireball's nbt before creating a system for replace it!
-You talk about fire charges : The blaze projectiles, which only set fire and no explosion
-You will have to summon a fireball with the ExplosionPower tag set to 0, so no damage to the land (but low damage too)
I got into chiptune music composition.
You can listen to them on my Youtube channel :
https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).
Before trying to imagine some systems, you could look at my datapack (https://ufile.io/nmuof0v4) -Be in creative when typping /reload in order to get the wand and instructions- :
Features:
-Right-click detection with carrot-on-a-stick (but we're searching for left-click, we'll have to change that)
-Getting the player's direction when shooting and summoning a fireball with a motion value set from the player's direction
-ExplosionPower and Cooldown can be changed with scoreboards (yes, I can change the NBT value through scores)
So we don't have to search how to summon the fireball, this is made in the pack. All we need is a left-click detector.
What do you think about that, edgars283?
I got into chiptune music composition.
You can listen to them on my Youtube channel :
https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).
i guess i could download your datapack. thanks to everyone for helping me btw
HI
so i downloaded the data pack and i think that this is good enough but i didnt quite understand how to change the power or cooldown of the wand and i would prefer that it didnt show the text of power and cooldown when a player acquires it .-.
im asking for too much arent i?
HI
I made the datapack; I know the system lol
For removing the display :
-Go to data\magic\functions and open the "main.mcfunction" file with any text editor (notepad,...)
-Simply delete the following content from the function; It's supposed to be at the beggining
Then, in the same function, delete the last line :
Finaly, delete the firewandcooldownoperation.mcfunction file (always in data\magic\functions) as you don't need it any more.
For changing individual player power/cooldown, there're 2 scores : "FireballPower" and "FireballCoolDown". These values are set to 0 to each new player when reloading the pack
-FireballPower sets... The fireball explosion power lol (0 = no land damage) -Increase at your own risks lol-
-FireballCoolDown is the time (in ticks : 1/20 second) before being able to shoot again
Before a player shoots, the pack looks for its scores and set the cooldown and explosion power; This allow you to give different values to different players
For example, if I set myself a FireballPower score of 3 and FireballCoolDown of 20, I will shoot fireballs which will have an ExplosionPower value of 3 and i will be able to shoot every 1 seconds.
I got into chiptune music composition.
You can listen to them on my Youtube channel :
https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).
Yeah but where/how can i change them? im lost- data packs are new to me >-<
HI
when you download the data pack, extract the archive and go into data > magic > functions and there you will find all the files eglaios was talking about. To open them, right-click a file and choose "edit" to open them in notepad.
Command block engineer // Developer // #TeamTrees
Oh yeah the datapack system is quite recent lol
...But it's a great thing
I got into chiptune music composition.
You can listen to them on my Youtube channel :
https://www.youtube.com/channel/UCjWYbJGk7nvNDbnCvMlZGkw
Descriptions are in french, you'd just need some google translation copy-paste...
Also made some more or less complicated datapacks, shared here (planetminecraft).
k
HI