1

I want to make an execute command so that, for example, a command that detects all snowballs and summons one falling sand riding all snowballs that are currently in the air (you know, an entity). I always was confused by the Riding entity nbt tag and I never knew if it meant that it summons a new entity and rides on it or it would summon a new entity and make that entity RIDE it. Is this effectively the same thing as the command?

execute positioned as @e[type=snowball) run summon ~ ~ ~ snowball{Riding:FallingSand}

Another question, if two snowballs hit each other, will they both disappear?

3
  • Please limit your question posts to one question only. I've removed the erroneous question from your post, you're welcome to post it as a new question, however you need to show research effort on it. Feb 26 at 0:19
  • One, I can't play minecraft and searching it on google results in forum posts about snowballs not dealing knockback instead of my wanted result,
    – Korogue
    Feb 26 at 14:48
  • Oops... nvm, Two, for some reason you didn't remove the second question, so ya...
    – Korogue
    Feb 26 at 14:49
0

If I understand correctly you want to summon a fallingblock on every snowball that already exists?

I think the best way would be to constantly summon a fallingblock on top that has a "Time:0" nbt so it despawns again, but because it's constantly spawned it doesn't seem like it's despawning.From what I vaguely understand, you want it to be able to hit things too, right? Since you said something about "not dealing knockback instead of my wanted result" I'm assuming you want it to hit stuff.

In that case you need

/execute as @e[type=snowball] at @s run summon minecraft:falling_block ~ ~ ~ {BlockState:{Name:"minecraft:sand"},Time:0,Motion:[0.0d,-0.1d,0.0d],HurtEntities:1,FallHurtAmount:1,FallHurtMax:1,DropItem:0}

Which should allow the block to hit entities and deal 1 damage. But it doesn't actually deal damage, because the block needs to hit the ground and the entity to deal damage to it, I noticed while testing.

I would have suggested

/execute as @e[type=snowball] run data merge entity @s {Passengers:[{id:"minecraft:fallingblock",BlockState:{Name:"minecraft:sand"},Time:1}]}

But this doesn't work somehow. (I tested it)

Edit: For question two, snowballs can't hit eachother mid-air. (you can test by throwing a few straight up in the air)

1
  • Thanks, goooood.
    – Korogue
    Mar 3 at 16:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.