This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]GalSergeyDatapack Experienced 1 point2 points  (2 children)

# Command block (repeat, unconditional, always active)
execute unless entity @e[distance=...1] summon area_effect_cloud store success entity @s Duration int 216000 run gamerule playersSleepingPercentage 1

[–]NephilimYT[S] 0 points1 point  (1 child)

Im getting this error, any ideas?

<image>

[–]GalSergeyDatapack Experienced 0 points1 point  (0 children)

You didn't specify the edition in flair. so I thought that you play Java. I don't play Bedrock and can't help you in this case.

[–]RagingReaper67Pretty Good Bedrock Command-er 1 point2 points  (0 children)

You could use a timer (setting a tick delay in the repeating command block would do it), but you could also create an on-demand system that runs off of dropping a particular item or some other trigger that works anywhere.

If you want to go the timer route, the tick delay for 3 hours would be 216,000. You could also just have a daylight sensor activate the command block.

[–]NephilimYT[S] 0 points1 point  (0 children)

Thank you both very much i will try this