3

This might just be asking how to keep chunks always loaded, but there's a bit more to this question.

I have a command block (repeating) that is always running a command that will detect if a specifically-renamed item (a feather that is renamed 'Feather of the Skies') is not in the offhand slot, and if it is not there, then it clears a specific potion effect (in this case, levitation)

Here is the command I am running currently (it runs fine):

/effect clear @a[nbt=!{SelectedItem:{id:"minecraft:feather",tag:{display:{Name:"\"Feather of the Skies\""}}}}] minecraft:levitation

However, whenever I leave my base, the chunk that the command block is in unloads, and renders the detector/command block useless. Is there any way to make this command block stay unloaded, or is there any alternative solution so that the command does not have to stay in a chunk to work? (maybe something like a scoreboard?)

In other words, is there a way to either keep this chunk always loaded OR is there a way to make the command run regardless of your location in the world?

I am playing on Minecraft Java Edition, on ver. 1.14.4, and the world is completely vanilla, if this information is needed.

1
  • Use a mod with chunk loaders? – nick012000 Apr 20 '20 at 7:27
6

The chunks surrounding the world spawn are always loaded, so this is the best place to put command blocks that you always want to run. You can change where the world span is using the /setworldspawn command.

However, the better option in this case is to put your commands in a function file and load it through a datapack. Google search offers a number of tutorials for how to do this.

0

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.