forum Forumsplay_arrow Minecraft fiber_manual_record Redstone


Command block help requested... again...

1 emerald6 replies80 views
created 09/19/2018 2:48 pm by HappyHippo77
last reply 09/20/2018 2:12 pm
Hey (again)! This time I was working on making explosive tags (A.K.A paper bombs, Naruto ninja tool) in Minecraft. I'm using an invisible armor stand being summoned in a certain position relative to the player holding the re-textured item in a certain way so it appears to be a paper bomb on the ground. Everything is working beautifully except for one thing. I want to have a smoke particle effect at the paper bomb but because of the way I am summoning the armor stand by looking down or up while using the paper bomb you can misplace the particles... Is there any way to use the "^ ^ ^" coordinates without effecting the y axis?
Posted by avatar
Level 25 : Expert Ninja

6 replies

09/20/2018 7:52 am
Level 7 Apprentice Taco

  1. I could think of a way with 2 different armor stands. First summon one at the coordinators ~ ~ ~ . Have that armorstand constantly execute to you and tp it to ~ ~ ~ 0 ~. Finally, have your final armorstand execute the first one and teleport to ^ ^ ^(number). Theoretically, it should teleport it a few blocks in front of you without changing the x value
09/20/2018 2:12 pm
Level 25 Expert Ninja
The problem has already been resolved but thanks for the effort anyway! :D
09/19/2018 3:19 pm
Level 35 Artisan Engineer
Can you show us exactly what you're doing? Because sure, you can use the new ^ coordinates without changing anything, you do that in the same way you use the ~ positioning.

If I had to guess at what could be causing your issues is: /execute at vs. /execute positioned as. Both commands somewhat do the same with the major difference that 'positioned as' doesn't compensate for rotation while the first does; so if you use ^ then the actual position will always depend on rotation of the player. So if the player is looking at the ground then ^ ^ ^3 wouldn't merely mean "3 blocks in front of the player"; it would also compensate for rotation and therefor lower the y axis as well to compensate.

You can resolve that by using positioned as.
09/19/2018 5:35 pm
Level 25 Expert Ninja
Spoiler - click to reveal
scoreboard objectives add paperbombtimer dummy

execute as @e[type=item,nbt={Item:{id:"minecraft:diamond_hoe",tag:{Unbreakable:1,Damage:3,display:{Name:"{\"text\":\"Explosive Tag\"}",Lore:"Press Q to use!"]}}}}] at @s run summon armor_stand ~ ~-2.75 ~ {Tags:["paperbomb"],NoGravity:1,ShowArms:1,Invisible:1,HandItems:[{id:"minecraft:diamond_hoe",Count:1b,tag:{Damage:3,Unbreakable:1}},{}],Pose:{Body:[0f,0f,0f],LeftArm:[0f,0f,0f],RightArm:[-90f,0f,0f],LeftLeg:[0f,0f,0f],RightLeg:[0f,0f,0f],Head:[0f,0f,0f]},DisabledSlots:65793}

execute as @e[tag=paperbomb,scores={paperbombtimer=..1}] at @s run tp @s @p

scoreboard players add @e[tag=paperbomb] paperbombtimer 1

execute as @e[tag=paperbomb,scores={paperbombtimer=1..2}] at @s run tp @s ~ ~-1.4 ~

execute as @e[tag=paperbomb] at @s run kill @e[type=item,nbt={Item:{id:"minecraft:diamond_hoe",tag:{Unbreakable:1,Damage:3,display:{Name:"{\"text\":\"Explosive Tag\"}",Lore:"Press Q to use!"]}}}}]

execute as @e[tag=paperbomb,scores={paperbombtimer=280..}] at @s run summon tnt ~ ~ ~

execute as @e[tag=paperbomb,scores={paperbombtimer=280..}] at @s run kill @s

execute as @e[tag=paperbomb,scores={paperbombtimer=80..}] at @s if entity @a[distance=..2] run summon tnt ~ ~ ~

execute as @e[tag=paperbomb,scores={paperbombtimer=80..}] at @s if entity @a[distance=..2] run kill @s

I'm using a function (Code for the part I'm working on above in the spoiler). I want to add a particle effect to the paper bomb. Essentially I need a way to run a command relative to where the armor stand is rotated without effecting the y axis. Kind of like if "^ ~ ^" worked, but you can't mix "^" and "~".
09/19/2018 6:06 pm
Level 8 Apprentice Engineer
/execute rotated as @s rotated ~ 0 run setblock ^ ^ ^5 stone
09/19/2018 6:20 pm
Level 25 Expert Ninja
THANK YOU SO MUCH! It works!!!




© 2010 - 2018