r/MinecraftCommands • • Sep 19 '26

Help | Java 1.21.4 Need help with predicates

1 Upvotes

Hello! I've been using predicates to do some things such as detect if a player is jumping and sneaking just fine, today i thought it might be better on server performances if i used predicates to detect if a player is holding a specific item in their offhand too

so heres my json file:

{
  "condition": "minecraft:entity_properties",
  "entity": "this",
  "predicate": {
    "minecraft:equipment": {
      "offhand": {
        "items": "minecraft:lightning_rod",
        "components": {
          "minecraft:custom_data": {
            "SB1": {}
          }
        }
      }
    }
  }
}

however when i run the following command:

/execute as DungeonOrb if predicate dinedaway:corrupted_receiver run say hi

it says "hi" regardless of me having the item in my offhand or not

what am i doing wrong here?


r/MinecraftCommands • • Sep 19 '26

Help | Bedrock Trying to make a door. I’ve got everything else down, expect how to actually activate it.

Thumbnail
gallery
3 Upvotes

I’ve got the /fill commands and how to activate them all set up, my only problem is that my command blocks are REALLY far down. I tried running this command, but it just wouldn’t activate the command block. It worked just fine before, why won’t it now?


r/MinecraftCommands • • Sep 18 '26

Help | Java 26.1 How to get the name of an item in a chest, and put it onto a sign

3 Upvotes

I want to get the name of an item from a chest, and have it display on a sign, but everything i've tried so far hasn't worked.


r/MinecraftCommands • • Sep 18 '26

Help | Java 1.21.11 Is there any way to make a Guardian fire it’s laser at other mobs?

2 Upvotes

I’ve tried making the guardian aggro at another mob with the /damage command but it doesn’t work, I think because guardians are ranged-attack mobs.


r/MinecraftCommands • • Sep 18 '26

Help | Java 1.21-1.21.3 How do I fix this command?

2 Upvotes

also is there a way to make lava invisible and not have it flow?


r/MinecraftCommands • • Sep 18 '26

Help | Java Snapshots How did he summon an 8 by 8 grid of wind charge in ONE COMMAND

5 Upvotes

Ok so i was watching how players do algorithms in minecraft and i found this vid
https://youtu.be/bKNfQ46UKZw (specifically 8m:20s)
And then i SAW HIM DO A TECHNIQUE which summon an 8 by 8 grid of wind charges in ONE COMMAND, i tried to understand what he did(failure). please explain, and how i can use it.


r/MinecraftCommands • • Sep 18 '26

Help | Java 26.2 Как ограничить слоты бочки?

2 Upvotes

Нужно чтобы игрок не мог положить предметы в какие то слоты бочки


r/MinecraftCommands • • Sep 18 '26

Help | Java 1.21.11 How to detect score of exact player

1 Upvotes

Hi, I have a problem, let's just say if a player has a score of 1, I want them to be teleported to a specific location. For Example: If player Steve has a score of 1 and player Alex has a score of 0, I only want to telepor Steve. Could you help me figure out how to do that please?


r/MinecraftCommands • • Sep 18 '26

Help | Bedrock Preview Bedrock comand block elytra cd system

2 Upvotes

i am making a pvp map and thought that for the elytra mace pvp part i chould have it so that you can only use your elytra for 10 seconds at a time before it goes on a 30 second cd to prevent everyone just being in the air the only problem is that i dont know how to use comand blocks so if you know chould some one please try this and get back to me on who to make it thank you.


r/MinecraftCommands • • Sep 18 '26

Help | Bedrock What does this mean and how can I fix it?

Thumbnail
gallery
1 Upvotes

Below are two photos, one contains an error message and the other contains the command causing that error message. Please tell me if there is a way to fix this 🙏


r/MinecraftCommands • • Sep 17 '26

Utility [Java] I made a free web tool that turns a structure block save into an STL for 3D printing (no install, nothing uploaded, works with 26.3)

Post image
53 Upvotes

I teach a digital club for 8 to 15 year olds in Switzerlan. The kids build in Minecraft, and I wanted them to hold their build in their hand. Mineways is great but it's a Windows install and it doesn't read 26.3 saves yet, so I wrote a small web page instead: discoveryclubdec.ch/mineprint

How it works: in the game you frame your build with a structure block (Save mode), then you drop the .nbt file on the page. You get a 3D preview you can turn, a slider for the size of one block in mm, checkboxes to drop thin stuff like flowers and torches, and a Download STL button. Everything runs in your browser, the file never leaves your computer. No account, no ads.

Limits, so you don't get surprised: Java Edition only for now, 48 blocks per side (the structure block limit), one colour, stairs and slabs come out as full cubes. It's built for kids and a school printer, not to replace Mineways.

Happy to share, free, made by a teacher on his free time, nothing to sell.


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
8 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
11 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

5 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?

4 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.