14

My brother has a problem with hooking people with fishing rods instead of focusing on survival. I know about the /clear command, but command blocks are only active when the chunk they're in is loaded, and I'm afraid that he'll go past that to get a fishing rod and start it up again. Since Minecraft is basically infinite, I can't keep placing command blocks whenever he moves away from one.

Is there a mod, command, etc. that can outright prohibit certain items from players' inventories no matter where they are in Minecraft?

15
  • 14
    You do realize he'll probably just find another way to be troublesome right? Oh, and no more mending books for you.
    – Joshua
    Commented Jan 11, 2021 at 1:21
  • 3
    If he's not focusing on survival what's the problem? Just let him starve a few times. Commented Jan 11, 2021 at 12:12
  • 4
    How is preventing him from doing that going to actually solve any problem?
    – o0'.
    Commented Jan 12, 2021 at 0:17
  • 13
    "I have an interpersonal problem with a fellow player. How can I solve it with code?"
    – Yakk
    Commented Jan 12, 2021 at 17:06
  • 2
    Strikes me that rpg stackexchange also frequently has questions roughly of this nature - where players don't have matching ideas of how best to have fun with the game. At that other site, the answer is almost always: rules based solutions won't address the underlying problem, which is that you're not "on the same page". Commented Jan 12, 2021 at 22:37

2 Answers 2

32

You don't need mods. Spawn chunks are always loaded, put your command block there.

0
15

Alternate Method: Use a datapack to run the /clear command. This works since datapack functions are always loaded, no matter where you are in the world. You can just reference a function in the minecraft function tag tick, and in the function add

clear <selector> <item> <count>

This will always clear x item(s), from y player(s), no matter where you are.

6
  • can't you paste this into a command block as well? And then just put that one into the spawn chunk (thx @HolyBlackCat) and have it run every tick with a redstone circle
    – Hobbamok
    Commented Jan 11, 2021 at 13:17
  • 1
    thats what the datapack trick is for. Datpacks can "hook" a function in to be run each tick. Thats explained in the article about Java functions: minecraft.gamepedia.com/Function_(Java_Edition). Putting them into the Tick tag runs them every tick
    – masterX244
    Commented Jan 11, 2021 at 13:30
  • 1
    @Hobbamok you could just do that, but from what I understand, the more commands you run every tick, the better it is to use functions instead of command blocks. Commented Jan 11, 2021 at 17:39
  • 1
    I would accept this as an answer but i cant because for some reason my minecraft hates datapacks and its very hard for me to create them properly. its a good answer, though. thanks!
    – Cyanite17
    Commented Jan 11, 2021 at 19:44
  • @PvParkour what happens when you use a datapack? Basic datapacks are also easy to learn. You can find many tutorials online about datapacks. Commented Jan 11, 2021 at 20:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .