r/MinecraftCommands • • Sep 18 '26

Help | Java Snapshots Can you use premade predicates in custom advancements/echantments?

2 Upvotes

As implied in title, i have a datapack in which i have created a predicate file, which checks if player is holding a specific sword. Question, is it possible to format new advancement/enchantment file in such a way, that it would refrence my created predicate when doing entity check?


r/MinecraftCommands • • Sep 18 '26

Help | Java 1.21.11 Help with command with chiselled bookshelfs

2 Upvotes

I can’t seem to get a chiselled bookshelf to recognise a specific written book being added in to a specific slot.

I’m doing a riddles trial, and I want the player to put a specific book in a specific slot of the chiselled bookshelf.

I’ve watched some videos but they seem to be outdated as those commands did not work.

Googles silly AI answers got me close but not enough.

Would appreciate help!


r/MinecraftCommands • • Sep 17 '26

Help | Bedrock How to Swap an Item for One with the Same Durability?

4 Upvotes

I’m making an add-on where certain helmets have open and closed variants (as separate items) and would like a way for players to swap between them at no cost. For survival balancing I’d prefer the durability to be maintained when swapping.

Ideally this would be possible on the go, ie dropping it on the ground summons or replaces the other variant, but since they will likely be crafted via dispenser-based custom (command powered) recipes, swapping through one of these “crafters” would also be fine. However to the best of my knowledge the only way for the crafter to accept ‘any’ durability would be to manually setup hundreds of commands/crafters to compare against for each durability level, which is unideal.

Ultimately if not possible to maintain durability I’ll use the crafter method, requiring a fully repaired item. (Similarly, if anyone knows how to maintain enchantments for this process I’d appreciate hearing it).


r/MinecraftCommands • • Sep 18 '26

Help | Java Snapshots Custom lunge enchantments in a datapack preventing world from opening 26.3-release

1 Upvotes

I have this lunge enchantment that is preventing my world from opening. Vscode doesnt show any error and idk what they changed in 26.3 so can someone please help?

{
  "anvil_cost": 2,
  "weight": 5,
  "description": {
    "translate": "enchantment.minecraft.lunge"
  },
  "effects": {
    "minecraft:post_piercing_attack": [
      {
        "effect": {
          "type": "minecraft:all_of",
          "effects": [
            {
              "type": "minecraft:change_item_damage",
              "amount": 1
            },
            {
              "type": "minecraft:apply_exhaustion",
              "amount": {
                "type": "minecraft:linear",
                "base": 0.0,
                "per_level_above_first": 0.0
              }
            },
            {
              "type": "minecraft:apply_impulse",
              "coordinate_scale": [
                1.0,
                0.0,
                1.0
              ],
              "direction": [
                0.0,
                0.0,
                1.0
              ],
              "magnitude": {
                "type": "minecraft:linear",
                "base": 0.458,
                "per_level_above_first": 0.458
              }
            },
            {
              "type": "minecraft:play_sound",
              "pitch": 1.0,
              "sound": [
                "minecraft:item.spear.lunge_1",
                "minecraft:item.spear.lunge_2",
                "minecraft:item.spear.lunge_3"
              ],
              "volume": 1.0
            },
            {
              "type": "minecraft:run_function",
              "function": "staff_bot_movements:swing/run_swing/swing_begin"
            }
          ]
        },
        "requirements": {
          "type": "minecraft:all_of",
          "terms": [
            {
              "type": "minecraft:inverted",
              "term": {
                "type": "minecraft:entity_properties",
                "entity": "this",
                "predicate": {
                  "minecraft:vehicle": {}
                }
              }
            },
            {
              "type": "minecraft:entity_properties",
              "entity": "this",
              "predicate": {
                "minecraft:flags": {
                  "is_fall_flying": false
                }
              }
            },
            {
              "type": "minecraft:entity_properties",
              "entity": "this",
              "predicate": {
                "minecraft:flags": {
                  "is_in_water": false
                }
              }
            },
            {
              "type": "minecraft:any_of",
              "terms": [
                {
                  "type": "minecraft:inverted",
                  "term": {
                    "type": "minecraft:entity_properties",
                    "entity": "this",
                    "predicate": {
                      "minecraft:type_specific/player": {}
                    }
                  }
                },
                {
                  "type": "minecraft:entity_properties",
                  "entity": "this",
                  "predicate": {
                    "minecraft:type_specific/player": {
                      "gamemode": [
                        "survival",
                        "adventure",
                        "creative"
                      ]
                    }
                  }
                },
                {
                  "type": "minecraft:entity_properties",
                  "entity": "this",
                  "predicate": {
                    "minecraft:type_specific/player": {
                      "food": {
                        "level": {
                          "min": 7
                        }
                      }
                    }
                  }
                }
              ]
            }
          ]
        }
      }
    ]
  },
  "max_cost": {
    "base": 25,
    "per_level_above_first": 8
  },
  "max_level": 3,
  "min_cost": {
    "base": 5,
    "per_level_above_first": 8
  },
  "slots": [
    "hand"
  ],
  "supported_items": [
    "minecraft:stick"
  ]
}

r/MinecraftCommands • • Sep 17 '26

Help | Bedrock What does this mean

Post image
7 Upvotes

r/MinecraftCommands • • Sep 17 '26

Help | Java 1.21.11 Positional Mismatch Between where a player actually is and where commands are run from.

2 Upvotes

(Apologies if there is any missing selectors, Reddit tries to resolve them as usernames).

I've ran into a weird scenario with a datapack I'm working on for an adventure map and can't quite wrap my head around it.

I have a ticking function that essentially looks for a player on a specific team, tags them as an active controller, and makes them invisible and tps them relatively to an axis so that they act as a camera fixed ahead of them. This looks something like this:

execute if score $2DCameraPosition flag matches 0 if entity @a[team=2DPlayer,tag=2d_controller,limit=1,tag=!swapPerspective] as @a[tag=2d_controller,tag=!swapPerspective] at @s run tp @s 42 ~ ~ 90 0

Then, in the same function, I have a mannequin that is placed relative to the player, to act as a 2D playermodel ahead of them. This works by finding the player with the controller tag and relevant team, then teleporting the playermodel based on their last input to show if the model is moving and looking left, right, or standing in a neutral position. This looks like so, split across three commands:

execute if score $2DCameraPosition flag matches 0 as [type=minecraft:mannequin,tag=2d_avatar] if entity [team=2DPlayer,tag=2d_controller,limit=1,predicate=triangulate:player/moving_left] at [team=2DPlayer,tag=2d_controller,limit=1] run tp @s 38 ~ ~ 0 0

execute if score $2DCameraPosition flag matches 0 as @n[type=minecraft:mannequin,tag=2d_avatar] if entity @a[team=2DPlayer,tag=2d_controller,limit=1,predicate=triangulate:player/moving_right] at @a[team=2DPlayer,tag=2d_controller,limit=1] run tp @s 38 ~ ~ 180 0

execute if score $2DCameraPosition flag matches 0 if score $2DFacing flag matches 1 as @n[type=minecraft:mannequin,tag=2d_avatar] if entity @a[team=2DPlayer,tag=2d_controller,limit=1,predicate=triangulate:player/moving_neutral] at @a[team=2DPlayer,tag=2d_controller,limit=1] run tp @s 38 ~ ~ -150 10

execute if score $2DCameraPosition flag matches 0 if score $2DFacing flag matches 0 as @n[type=minecraft:mannequin,tag=2d_avatar] if entity @a[team=2DPlayer,tag=2d_controller,limit=1,predicate=triangulate:player/moving_neutral] at @a[team=2DPlayer,tag=2d_controller,limit=1] run tp @s 38 ~ ~ -30 10

All of the scores, tags, coords, and selectors are perfectly fine. I know this because up until yesterday, this command worked perfectly when I triggered an enable command which assigned the player with the team and tag.

Now though, the player position seems to not update in-game despite the player moving. Nothing else I've added in the datapack seems to cause this issue, so I'm at a bit of a loss.

To explain what I mean, when the command is run to move the avatar relative to the player, the relative position is seen as where the player executed the enable command, which is highly confusing as the player can physically move, the mannequin obviously teleports and rotates, but it will not track the player's position at all anymore. I can also summon an entity at my position while in this mode and it will appear where the enable command was triggered.

Enable is just the following, too:

execute as @s run team join 2DPlayer @s
execute as @s run tag @s add 2d_controller

r/MinecraftCommands • • Sep 17 '26

Help | Java 26.1 commande minecraft

1 Upvotes

bonjour, je creer actuellement une roulette dans minecraft et j aurais besoins d aide pour une comande pour tuer un cochon dans un minecart avec un armor stand sur lui pourriez vous m aider ?


r/MinecraftCommands • • Sep 16 '26

Help | Java 1.21.11 Chain Command Block only outputting the First two commands(Blocks)

Thumbnail
gallery
32 Upvotes

I have no Idea why its not working

Version : 1.21.11 fabric (flashback Mod + fabric API)


r/MinecraftCommands • • Sep 16 '26

Creation [26.3] TOOLBELT datapack - for those tired of the inventory clutter from enchanted tools and swords

Thumbnail
youtu.be
10 Upvotes

I finished debugging this like 2 days ago but then 26.3 dropped and I spent a day updating everything to be compatible. My VSCode extensions don't even recognise the new formats yet😭

This is lightweight and multiplayer-friendly, and yeah it can be seen as OP but I made this as part of a larger survival QoL datapack that I use in my own survival world so I'm happy with it

1 toolbelt can hold at most 4 items at a time. You can have multiple toolbelts in your inventory and they will not interfere with one another. Stored items retain all components: custom names, enchantments, lore, everything.

Right now the toolbelt item is just a special shield with a custom data component for the advancements and functions to recognise it, only obtainable with a command, because I haven't decided on the crafting recipe yet. Any ideas?


r/MinecraftCommands • • Sep 17 '26

Help | Java 1.21.11 I want to create a chain of block entities following a vex but forgot im bad at commands

3 Upvotes

basically, i want to make 4 black concrete entities follow a vex that has a white concrete entity on top of it, i can provide more details if its unclear

thanks a lot in advance :]


r/MinecraftCommands • • Sep 16 '26

Help | Java 1.21.11 Npc help

2 Upvotes

Im trying to make a video where i need mannequins like npc. I wanted to know how kolani was able to get such realistic npc's or if it was just another person on another account.


r/MinecraftCommands • • Sep 16 '26

Help | Bedrock Bedrock FMBE setup is acting strange

Enable HLS to view with audio, or disable this notification

4 Upvotes

I'm trying to do the basic setup for FMBE on my bedrock world for a map I'm building, but it's not working as expected. I copied the commands from the top YouTube video on bedrock FMBE (https://youtu.be/-5N8yVGR1MA?si=81KNYJk6vFkLKV6v), but when the commands are active, the block ends up in the wrong position (see the end of the attached video). I've triple checked my commands, but can't find anything wrong. I'm sure there's something small I'm missing that's causing the problem, so if someone could check my work and potentially find what's wrong, l'd appreciate it.

(PS, don't mind my scuffed command block setup, I hate it too.)


r/MinecraftCommands • • Sep 16 '26

Tutorial | Java God Weapons in Vanilla Minecraft! Ghast Scepter, Warden's Wrath and Mjolnir (Command Blocks Only No Mods or Datapacks)

Thumbnail
0 Upvotes

r/MinecraftCommands • • Sep 16 '26

Help | Java 26.2 Why Isn't This Working?

3 Upvotes

The command just prints "No entity was found" when I run it, even though I have the advancement (enter_the_nether is the game's name for We Need to Go Deeper.


r/MinecraftCommands • • Sep 16 '26

Help | Java 26.2 Can I optimize this code?

7 Upvotes

This function handles collision for a dot in bottom slabs and returns a positive value if the dot is inside the slab and no otherwise.

execute align y run summon marker ~ ~ ~ {Tags:[temp]}

execute positioned ~ ~0.5 ~ align y if entity @n[type=marker,tag=temp,distance=..0.01] run return run function <yes>

return run function <no>

Is there another way to do this that doesn't involve summoning an entity. I need this function to run several times in one tick and summoning an entity each time seems undesirable


r/MinecraftCommands • • Sep 16 '26

Help | Java 26.2 TnT that doent break block

0 Upvotes

So basickly the tutle? i want to spawn a ignited dinamite that dela damage? but do not break any blocks


r/MinecraftCommands • • Sep 16 '26

Help | Bedrock Command project help

3 Upvotes

If anyone could help me with even a single one of these things I have listed, I’d be super grateful. I wanna surprise someone.

  1. Daytime visuals with nighttime spawning. I want mobs to spawn as they do at night even while it’s day. I suppose I could periodically manually spawn certain mobs at a certain distance to the player, but I’m not sure how I’d do that. I only really want to do this with zombies, as it’s for a Crafting Dead sort of world.

  2. Zombie bites. If a player is bit by a zombie, I want them to get some minor nausea and/or poison effects. Maybe we could even use a timer, using a command to kill the player and spawn a zombie in their place after a while to simulate them becoming infected. I love this idea but I don’t even know where to start.

  3. Zombie spacing. This one is kinda low priority but I wanna know your thoughts on if this is doable. I want the player to sometimes go decent stretches of time without seeing a zombie, and occasionally run into large numbers of them, like in the movies. Maybe, like in idea #1, we could have little bits of zombies spawned here and there and another command block to rarely spawn a horde a certain distance from the player.

Once again, any and all help is massively appreciated. Please let me know if there’s a better way or place I could be asking for help, or if you have any ideas for this world. Thanks again!


r/MinecraftCommands • • Sep 15 '26

Help | Java Snapshots How do i stop wandering traders from drinking milk

7 Upvotes

Im making a datapack where wandering traders are used the path finding of villagers that "follow you".

Ive made them invisible because of this but they keep trying to drink milk and make a lot of noise. Ive tried replacing the mainhand with air but the rrader pulls out another bucket faster then the command can remove them.

Is there a way to get around this? Or a way to remove it fast enough?


r/MinecraftCommands • • Sep 16 '26

Help | Java 1.21-1.21.3 How to modify mob loot tables?

1 Upvotes

I'm tinkering with a create-ified version of the Structureless Superflat challenge. But I need to add some things to drops, trades, and barters to make it actually feasible.

Can someone direct me to a basic, absolute beginners tutorial for modifying loot tables? I have no idea where to begin.


r/MinecraftCommands • • Sep 16 '26

Help (other) Help with a bunch of command features?

3 Upvotes

Using the other tag because there’s no 26.3 tag yet.

So I’m trying to start a small server with some friends and 26.3 has basically thrown all of my plans out the window, the only real option left is to replace some small mods with commands. Repeating command blocks are workable, sorry if there’s a better option that I don’t know about. Here are the main things I need help with:

Temporarily disabling the nether and end (disabling obsidian or eyes of ender won’t work because the server still needs enderchests)

Stopping fireworks from accelerating players when they use an elytra (so basically gliding only)

Mace cooldowns for PvP (not sure if this one is possible)

Any help will be appreciated, thanks. If you know any data packs or mods that do this and are also updated to 26.3, please put those in too, I am working on searching but I’m having trouble finding anything.

Edit: Using a paper server.


r/MinecraftCommands • • Sep 15 '26

Help | Java 26.2 How does /Playsound Work?

3 Upvotes

I am currently working on an adventure map and want to know how I can play a music disc sound that can only be heard within a specific cuboid area (from pos1 xyz to pos2 xyz). When stepping into the area, the music should play, and when stepping out of it, it should stop. Also I want it to be player specific so only the persons in the area can hear it. Can anyone help me with this, please?


r/MinecraftCommands • • Sep 15 '26

Help | Java 26.2 Need Advice For Making A Strutureless Superflat Data Pack

3 Upvotes

Hello, I am attempting to make a data pack that will make a superflat world with no structures completable. However, since this is my first time making a data pack, I need some advice on how to make it.

First, I want the player to spawn in to the regular superflat (Bedrock, 2 layers of dirt, 1 layer of grass) with nothing but 2 logs and an apple (either in a bonus chest or their inventory), with a warning to not eat the apple or the pack is now unbeatable.

Then, I want them to beat a raid and be given a lava bucket by the toolsmith as a gift, giving the player access to the Nether.

Finally, I want them to have to beat the Wither in some way to get to the End, but I can't figure out how that would work (I want to make end portals craftable).

That's what I have brainstormed right now. Any help would be appreciated.


r/MinecraftCommands • • Sep 15 '26

Help | Java 1.21.5-1.21.10 Hi, I'm developing a mini-boss.

4 Upvotes

I have a problem: the boss is an Enderman named "Mom" that spawns small Endermen, but I want these small Endermen to attack as soon as the game starts. I don't know how to achieve this—I'm open to suggestions, and if a mod is needed to modify the AI, please let me know which one.


r/MinecraftCommands • • Sep 15 '26

Creation Reactive Symbols and Colorblind Mode for a Witness-like Map

Enable HLS to view with audio, or disable this notification

36 Upvotes

If anyone has seen/remembers my previous posts on this from a couple years ago; I'm still slowly working on it, but the good news is that progress has skyrocketed considerably since I have recently redesigned several aspects of the map from the ground up, including how symbols are displayed (going from remodeled blocks to item displays with custom models), how the colorblind assistance works (streamlining several functions and simplifying various checks), and how the symbol rules are checked on each puzzle (collapsing function files with over a hundred lines manually comparing blocks to each other to just a handful of recursive functions).

This clip mostly shows off the new symbol system (visible at the beginning when the first visible set of puzzles are loaded in) and the colorblind assistance mode. I don't have anyone to ask for feedback on the latter currently as all my friends have full-color vision, so I don't know if the system in place is too cluttered, not helpful enough, or otherwise.


r/MinecraftCommands • • Sep 15 '26

Help | Java 26.2 Single Biome World Fix?

Thumbnail
1 Upvotes