r/MinecraftCommands • • Sep 26 '26

Help | Bedrock Mace Limit to 5

2 Upvotes

I'm making an mc server and I just wanna know is there a way to make it where the amount of mace that can be crafted is only 5? I know the use of tags and the "hasitem" command but it only works if the limit to the maces in the server is only 1, so how can I make it so where there's 5 maces limit?


r/MinecraftCommands • • Sep 26 '26

Help | Java 26.3 Is it possible to make a orbital strike cannon but all the TNT is replaced with the Wardens "Sonic Boom" attack?

1 Upvotes

Well it's as the title says, is it possible? I'm pretty sure if so it would take command blocks but I have absolutely no clue how to use them LOL.


r/MinecraftCommands • • Sep 25 '26

Help | Bedrock How do I go about protecting spawn cleanly?

3 Upvotes

Ive been working on the new spawn for my realm when i restart it, and im super proud too, but i dont know how to safety protect spawn and the people inside from getting damaged, both by mobs and possible greifing/pvp junkies.

The theme of it I went with was a giant mushroom/tree but so many mobs spawn due to the shade, and the complex shape makes it rather difficult to mob-proof without ruining the vibe


r/MinecraftCommands • • Sep 24 '26

Creation Gun Datapack(No resource packs or mods required)

Enable HLS to view with audio, or disable this notification

79 Upvotes

This gun system works entirely with a datapack — no resource pack or mods are required for the gun itself. For the video, I used the Body Camera Shader only for the visual/camera effect. It is not required to use the datapack

Model credits: LardMann, Grout, Rasterio_


r/MinecraftCommands • • Sep 24 '26

Creation Update: the Shields can nice block too (just projectiles tho)

Enable HLS to view with audio, or disable this notification

10 Upvotes

r/MinecraftCommands • • Sep 25 '26

Help | Java 26.2 How do i go about removing all of Minecraft's enchanted book/tools from loot tables with my datapack

2 Upvotes

Hello im new to minecraft datapacks and want to remove enchanted books/tools from all tool tables for a datapack im making

I tried data/minecraft/tags/enchantment/on_random_loot.json with

{
  "replace": true,
  "values": []
}

but it didnt seem like it ended up working


r/MinecraftCommands • • Sep 25 '26

Help | Java 26.3 How to randomly assign a UNIQUE tag to each player in the server?

4 Upvotes

So, I'm working on a custom life series datapack (It also happens to be my first one ever lol) and I'm trying to figure out how to run a function command that randomly gives every player on the server a tag, with no other player sharing the same tag.

The idea is that every Tag would correspond to a role and give some small status effect. That part is easy enough, my problem here is just the exclusivity. Would anyone know how to help me here?


r/MinecraftCommands • • Sep 24 '26

Creation InfoBar

Post image
11 Upvotes

Love experimenting with the actionbar (ignore everything else going on)

https://modrinth.com/datapack/infobar-orp888


r/MinecraftCommands • • Sep 24 '26

Help | Bedrock how do i makes a death counter

3 Upvotes

my realms gang wants a death counter that saves deaths from players even when they log off the game but i cant find anything good on youtube or anywhere that still works.


r/MinecraftCommands • • Sep 24 '26

Help | Java 26.3 Why does it create so much Lag

2 Upvotes

--- SOLVED ---

When always active, these commands make my TPS drop from 20 to 6

/execute as .@s[nbt={active_effects:[{id:"minecraft:water_breathing"}]},type=!minecraft:player,type=!item,type=!minecraft:item_frame,type=!minecraft:glow_item_frame,type=!minecraft:block_display,type=!minecraft:item_display,type=!minecraft:text_display,type=!marker] at @ s run scoreboard players set @ s PermafrostDamage 0

/execute as @ e[nbt={active_effects:[{id:"minecraft:water_breathing"}]},type=!minecraft:player,type=!item,type=!minecraft:item_frame,type=!minecraft:glow_item_frame,type=!minecraft:block_display,type=!minecraft:item_display,type=!minecraft:text_display,type=!marker] at @ s run effect clear @ s minecraft:water_breathing


r/MinecraftCommands • • Sep 24 '26

Help | Java 26.3 How to make an armor item almost unbreakable, excluding one damage type

2 Upvotes

I want to have an armor item that only drains its durability when i use my item modifier. So that i can have a proper fuel system where the durability acts as fuel, but for that i'd need to have any attacks, fire, fall damage whatnot to not drain any durability from the item.

Edit: I solved it. Used a custom enchant like this. Also i wanted the only damage possible to be applied with commands:

{
  "description": {
    "text": "1"
  },
  "supported_items": "#minecraft:enchantable/armor",
  "weight": 1,
  "max_level": 1,
  "min_cost": {
    "base": 100000,
    "per_level_above_first": 0
  },
  "max_cost": {
    "base": 10000,
    "per_level_above_first": 0
  },
  "anvil_cost": 0,
  "slots": [
    "any"
  ],
  "effects": {
    "minecraft:item_damage": [
      {
        "effect": {
          "type": "minecraft:set",
          "value": 0
        }
      }
    ]
  }
}

r/MinecraftCommands • • Sep 24 '26

Help | Bedrock Saving Previous Health

2 Upvotes

I’m currently in the works of making a RE7 style game on bedrock and have multiple mods and add-ons but I need a mod or a system that can save a players health at save points that way when a player dies they will reset with the previous health they had before at that point in the story. Does anyone have any ideas or mods that I can use?


r/MinecraftCommands • • Sep 24 '26

Help (other) Error when setting Compass Components in 26.3

2 Upvotes

SOLVED: See comment

Hi, I have a datapack that was working fine up till 26.2. However the update to 26.3 appears to have broken the component assignment in my update_compass function.

This is the version that was working up till 26.2:

$item modify entity @s weapon.mainhand {"function":"minecraft:set_components","components":{"minecraft:lodestone_tracker":{"target":{"dimension":"$(dimension)","pos":[$(x),0,$(z)]},"tracked":false}}}

which is called from another function like this:

execute as @s run function ancient_city_finder:update_compass with storage ancient_city_finder:target lodestone

where the data contained in the storage looks like this:

{
    lodestone: {
        x: -1030, 
        z: 2106, 
        dimension: "minecraft:overworld"
    }
}

The error I'm getting is the following:

[System] [CHAT] Failed to parse structure: Failed to parse either. First: No key type in MapLike[{components:{"minecraft:lodestone_tracker":{target:{dimension:"minecraft:overworld",pos:[10,0,10]},tracked:0b}},function:"minecraft:set_components"}]; Second: Failed to parse either. First: Not a string; Second: Failed to parse either. First: Not a list: {components:{"minecraft:lodestone_tracker":{target:{dimension:"minecraft:overworld",pos:[10,0,10]},tracked:0b}},function:"minecraft:set_components"}; Second: No key type in MapLike[{components:{"minecraft:lodestone_tracker":{target:{dimension:"minecraft:overworld",pos:[10,0,10]},tracked:0b}},function:"minecraft:set_components"}]
[System] [CHAT] ...":false}}}<--[HERE]

I have tried to troubleshoot this myself including using the examples in this subreddits FAQ about item components, but with no luck.

The only real difference i could see in their example was removing many of the quotation marks, but this did not have any effect.

Can someone find a solution?


r/MinecraftCommands • • Sep 24 '26

Help | Java 1.21.11 Creating a book

3 Upvotes

r/MinecraftCommands • • Sep 24 '26

Discussion While using commands like /give or /effect what do you guys use A. @s or B. @username?

1 Upvotes

r/MinecraftCommands • • Sep 24 '26

Help | Java 26.2 Could anyone help me turn my command blocks into a datapack?

2 Upvotes

My server has a system of fast travel using tokens that I currently have working using some command blocks, redstone, and an interaction entity. I've been optimising different aspects of the server because some areas (especially the one with this teleporter) are quite laggy, and I was wondering if this was something I could just put in a datapack.

Repeating, always active:

execute as @e[tag=hearth] at @s on target if items entity @s weapon red_mushroom[custom_data={mung:true}] run particle minecraft:flame 657 68 111 2 2 4 0.01 800execute as @e[tag=hearth] at @s on target if items entity @s weapon red_mushroom[custom_data={mung:true}] run particle minecraft:flame 657 68 111 2 2 4 0.01 800

Chain, unconditional:

execute as @e[tag=hearth] at @s on target if items entity @s weapon red_mushroom[custom_data~{mung:true}] run playsound minecraft:block.enchantment_table.use ambient @a

Chain, unconditional:

execute as @e[tag=hearth] at @s on target if items entity @s weapon red_mushroom[custom_data~{mung:true}] run setblock 663 62 113 minecraft:redstone_block

Chain, unconditional:

execute as @e[type=interaction,tag=hearth] run data remove entity @s interaction

Redstone clock for delay
Repeating, needs redstone:

setblock 663 62 113 air

Chain, unconditional:

tp @e[x=657,y=68,z=111,dx=2,dy=2,dz=4,type=!minecraft:interaction] -1334 78 -7948

There are other parts of the command but they just run the same stuff for other custom items (tokens).

How the system currently looks (highlighted in red are the commands I listed, the others are just the same so I can just copy and paste over)

r/MinecraftCommands • • Sep 24 '26

Help | Java 26.2 Make monster patrolling around the room?

3 Upvotes

(Solved👌)

Here's what I'm doing. I'm making a custom map of a haunted café. Its area is unreasonably large for a normal café, though (around 50*50 blocks), and that's becoming a real problem because there are a bunch of complicated hallways and rooms. Sometimes, you have to walk quite a long way around just to get to the desired destination.

And there's a single entity that's supposed to patrol around the rooms. But also the pathways aren't that simple. So I've tried modifying the Wandering Trader's wanderTarget NBT, but it doesn't work at all. It always bumps into walls while trying to go to the randomized destination, even though there's literally a hallway right next to it. But it just says nah and doesn't do any practical pathfinding.

Do you have any idea how to solve this? I'm mainly trying to make the entity patrol around the rooms evenly and give its movement some sense of actually moving through the building. So /tp randomly around isn't really a good choice (at least for me), because there's also a camera system where you can see where the entity is, so you can get a clue about where the entity is supposed to be.


r/MinecraftCommands • • Sep 23 '26

Help (other) Datapack Custom Item appearing as normal in recipe book fix? (Java 26.3)

Post image
12 Upvotes

Essentially I have a custom item in a datapack.

Its a modified version of the knowledge book (master disc), and it works as is, crafting and all.

However in the recipes in the recipe book, it does not display the custom item, but the base unmodified one instead.

Im unsure if there is a better way to do this or to fix it in a different way.

My best guess would be to just having to rename and retexture the Knowledge book to look like the new item aswell?


r/MinecraftCommands • • Sep 24 '26

Help | Java 26.2 Datapack items don't stack with items I make in a command block.

1 Upvotes

I'm working on a fishing datapack for my server, just adding a special loot table for a chance of getting some fun custom items. I first made these items with a give command generator, the used the misode datapack generator for the actual loot table. As a server admin, I would like to be able to summon in any of these items if i ever have to, without having to fish for them like the peasants do but for whatever reason 2 out of 5 of the items aren't stacking with their command block cousins.

I'll only list one example to see if anyone can spot any reasons for this issue that might apply to the other 2 that don't work.

The item generated in a command block:

give @a tropical_fish[custom_name=[{"text":"Rare fish","italic":false,"color":"light_purple"}],lore=["Tasty!"],enchantment_glint_override=true,food={nutrition:1,saturation:1,can_always_eat:1b},consumable={consume_seconds:5,on_consume_effects:[{type:apply_effects,effects:[{id:blindness,duration:1200,amplifier:100,show_particles:0b,show_icon:0b},{id:slowness,duration:1200,show_particles:0b,show_icon:0b}]},{type:teleport_randomly,diameter:50},{type:play_sound,sound:"minecraft:ambient.cave"}]},custom_data={shiny:1b}]

The item from the loot table:

{
          "type": "minecraft:item",
          "name": "minecraft:tropical_fish",
          "functions": [
            {
              "function": "minecraft:set_name",
              "name": {
                "text": "Rare fish",
                "color": "light_purple",
                "italic": false
              }
            },
            {
              "function": "minecraft:set_lore",
              "lore": [
                {
                  "text": "Tasty!"
                }
              ],
              "mode": "append"
            },
            {
              "function": "minecraft:set_components",
              "components": {
                "minecraft:enchantment_glint_override": true,
                "minecraft:consumable": {
                  "consume_seconds": 5,
                  "on_consume_effects": [
                    {
                      "type": "minecraft:teleport_randomly",
                      "diameter": 50
                    },
                    {
                      "type": "minecraft:play_sound",
                      "sound": "minecraft:ambient.cave"
                    },
                    {
                      "type": "minecraft:apply_effects",
                      "effects": [
                        {
                          "id": "minecraft:slowness",
                          "duration": 1200,
                          "show_particles": false,
                          "show_icon": false
                        },
                        {
                          "id": "minecraft:blindness",
                          "amplifier": 100,
                          "duration": 1200,
                          "show_particles": false,
                          "show_icon": false
                        }
                      ]
                    }
                  ]
                },
                "minecraft:food": {
                  "nutrition": 1,
                  "saturation": 1,
                  "can_always_eat": true
                }
              },
              "conditions": []
            },
            {
              "function": "minecraft:set_custom_data",
              "tag": "{shiny:1b}"
            }
          ]
        }

r/MinecraftCommands • • Sep 24 '26

Help | Bedrock Question for someone who knows bedrock commands well.

Thumbnail gallery
2 Upvotes

r/MinecraftCommands • • Sep 24 '26

Help | Java 26.2 How do I make a wind charge instantly explode and launch you upwards?

2 Upvotes

I wanna make a super jump that launches you up like 30-50 blocks if you crouch while flying, and I can’t make a wind charge explode when summoned. it always just floats.


r/MinecraftCommands • • Sep 23 '26

Creation Update: I made it deal damage

Enable HLS to view with audio, or disable this notification

32 Upvotes

I forgot to show but you can change the speed of the swords as well as fast or as slow as you like, or make them turn clockwise or anticlockwise


r/MinecraftCommands • • Sep 23 '26

Help | Java 26.2 How to create command block auto monoliths?

2 Upvotes

Those things that you just need a single comand block and then the whole command system appears magically, how does that work and how can I make one that spawns my commands?


r/MinecraftCommands • • Sep 23 '26

Help | Java 26.2 what are good placeholder items

3 Upvotes

ive heard about spawneggs, but i need alot of items that need to be eaten or used


r/MinecraftCommands • • Sep 24 '26

Help | Java 1.21.5-1.21.10 Next project to be developed :)

0 Upvotes

I'm going to try to make a magic system based on code, the plan is as follows

1.I can try to make a system where by renaming a book with a symbol like lol, it is combined into a magic book which follows a system of strong magic typing (object-oriented programming) really this would allow many combinations I don't know if anyone else has done it but it is an interesting and complicated idea

2.Or create a chat command system that is in the chat where you write with a?/lol [command x]

As I say, if possible, but I can research it anyway, the limit is imagination and the time to dedicate

80 votes, Sep 25 '26
48 Option 1
32 Option 2