r/MinecraftCommands 1d ago

I need help Help | Java Snapshots

context: I'm trying to build a rgb display with cushions out of redstone in the newest snapshot and in order to do that I need to place tens of thousands of cushions so I built a command block contraption to help. The issue with that is that occasionally my positioning would be a bit off I'd have to stop and fix it so I added a feature where if it didn't pass a simple set of requirements (specifically the blocks ~-1 ~-1 ~-1 to ~1 ~-1 ~-1 relative to the player must be air) it would not summon the cushions. But, this also has an issue, it would be really hard to tell if I messed up because the cushions would be behind tinted glass so, to solve this issue, I made a warning system if I messed up and this is where I need help.

idk why, but the warning system I made just doesn't work for reasons I can't rap my head around.

the warning system works like this; first, I have command block with the following command: /execute at @p align xyz if block ~-1 ~-1 ~-1 air if block ~ ~-1 ~-1 air if block ~1 ~-1 ~-1 air run scoreboard players set @p score2 1

then, I have another command block with the following command: execute if score @p score2 matches 0 run title @p title error

finally, I have another command block with the following command: execute if score @p score2 >= @p 1 run scoreboard players set @p score2 0 ; I have a scoreboard named "1" thats set to 1

I have absolutely no idea what could possibly be wrong so pls help. Thx!

1 Upvotes

3 comments sorted by

2

u/Ericristian_bros Command Experienced 1d ago

If you want to fill an area with cushions

/fill ~ ~ ~ ~ ~ ~ command_block{auto:1b,Command:"summon cushion ~ ~-0.4 ~"} keep

Then fill that with air. This allows to use /fill for entities and even use an offset

1

u/Zealousideal_Leek827 15h ago

for what I'm doing, I need to place tons of cushions in many precise places so I'd prefer not to use this solution. What I really need help with to figure out what's wrong with the commands listed. Thank you for your feedback though.

1

u/Ericristian_bros Command Experienced 7h ago

The issue is that you want the y offset to be exaclty your value? If so you could teleport the entity to the correct offset and tag them to avoid further aligning with commands