0

I know I can have one /data command target multiple entities of one kind in a given range like this:

/execute as @e[type=some_entity,x=1,y=2,z=3,dx=4,dy=5,dz=6] run data modify @s Example

It's a command that I can put into ONE command block no matter how many entities are targeted.

Is there a way to achieve a similar result for block entities? Examples include furnaces, hoppers, dispensers/droppers etc. It may not necessarily be one command, but the number of command blocks required should not depend on number of blocks targeted (assume the range doesn't go over limits like 32768).

Need a solution for Java 1.16.x.

  • Such a task is harder because you're dealing with blocks, not entities. The reason that it's so easy when dealing with entities is because they can can run commands by themselves, but blocks cannot run commands. – ExpertCoder14 Nov 22 at 21:23

Your Answer

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

Browse other questions tagged or ask your own question.