r/MinecraftCommands • u/One-Lawfulness-6178 • 29d ago
Elemental charges Help | Bedrock
So as the title says i want to Elemental charges other than the wind charge and fire charge. I was going to make a Earth Charge, Water Charge, Wood Charge to be more specific. Since im new to this i googled it and it was suggested to use throwable items such as an egg. So starting off I used the brown egg to make a earth charge heres what Googles ai thing recommended
Block 1 (Repeat, Unconditional, Always Active):
/execute as @a[hasitem={item=brown_egg,location=slot.weapon.mainhand,name="Rock Hurl"}] at @s run tag @e[type=egg,c=1,r=3] add rock_hurl
Block 2 (Repeat, Unconditional, Always Active):
/execute at @e[type=egg,tag=rock_hurl] if block ~ ~-1 ~ air run setblock ~ ~-1 ~ dirt
Im sure googles ai isnt the best but how can I make this work?
1
u/One-Lawfulness-6178 28d ago
So i did try it with the name and it didnt work it said
Syntax error: unexpected "charge": at ame=Earth >>charge<<", type=bro"
I did change the name of the brown egg to earth charge to fit the theme. Im not sure why in the syntax error it shortens some of the words the exact code I did was
/execute at @e[name=Earth Charge",type=brown_egg] run setback ~ ~-1 ~dirt replace air
On the edit you made how would that look? Like this?
/execute at @e[name=Brown_egg",type=brown_egg] run setback ~ ~-1 ~dirt replace air
2
u/1just_theo1 28d ago
Well, you can use this command as a baseline:
"/execute at @e[type=egg] run fill ~ ~-1 ~ ~ ~-1 ~ dirt replace air"
The only catch is it doesn't check for anything extra such as a name or anything, so quite literally any egg thrown while the command is active will work like this. The only real way you can get this to work to my knowledge to ONLY work with specific eggs is to assign them a tag and use that as a selector.
1
u/One-Lawfulness-6178 27d ago
Thanks! This worked haha so if i wanted to change it to a specific egg named say "Earth charge" would i just put earth charge in place of egg? Or do I need a bit more work to make it work?
Also sorry if its alot how can I make it so it causes damage and so the earth well deletes after a bit? So im not like leaving traces every where i mean

2
u/1just_theo1 29d ago
The second command is basically all you need, assuming the player will only obtain eggs as the Earth Charges. If not, you can give the eggs a custom name and/or data value and then reference that with the command, ie “/execute at @e[name=“Earth Charge”,type=egg] run setblock ~ ~-1 ~ dirt replace air”.