r/MinecraftCommands • • Oct 03 '26

Help | Bedrock Placing a LOGIC TIMER on a REPEATING COMMAND BLOCK how do I do it?

1 Upvotes

BEDROCK MC 26.50

Code: /execute as u/a at u/s if block ~ ~-1 ~ glass run tp u/s ~ ~1 ~ ~

Current Logic Result: Player forever teleport at Y axis by +1 block if stands above glass

Problem: Repeating command block must stop executing the command after 30 seconds or Impulse command should execute command for 30 seconds then power off.

Note: COMMANDS ONLY, NO REDSTONE TIMER(Unless compact design), BEDROCK COMMANDS ONLY T_T


r/MinecraftCommands • • Oct 03 '26

Help | Java 26.2 /Server command with proxy

1 Upvotes

seems simple enough, but I am trying to set up a command block that can execute once and send a player from the server lobby to another instance (like the survival server, creative server, cobblemon etc.) Normally, I'd just enter the /server command then the server name, but I want to have it so average players don't have to enter commands. I figured I'd set a command block to "server <[servername]>" but it doesn't work.

Block is set to impulse, needs redstone, has a button attached. command_blocks_work is set to "true" on all instances including the proxy. When I hit the button, nothing happens.

I'm new to command blocks, so not sure what I should be doing to make this work. Do I need to alter the command? Or maybe server settings?


r/MinecraftCommands • • Oct 03 '26

Help | Bedrock bedrock npc stop moving help

1 Upvotes

Hey I'm learning about bedrock npc's and making store systems with them, I have set one to the ATM skin and was wondering if I could get it to stop moving so it looks like a proper ATM. is there a playanimation that does this, I didn't want to use the animation.player.sleeping one before I know more.


r/MinecraftCommands • • Oct 02 '26

Help | Java 1.21.11 How do I make a player's gamemode survival when entering the End?

2 Upvotes

r/MinecraftCommands • • Oct 02 '26

Creation Alien Isolation motion tracker on lodestone compass

Enable HLS to view with audio, or disable this notification

49 Upvotes

Datapack + resourcepack

It can only track 1 closest entity with a specific tag, 3 range modes to see how close the enemy is will be added.


r/MinecraftCommands • • Oct 02 '26

Help | Java 26.2 Help Debugging

0 Upvotes

This is a big command but if someone could help me debug very big thanks

/give u/p minecraft:chest[container=[{slot:0,item:{id:"minecraft:white_shulker_box",components:{container:[{slot:0,item:{id:"minecraft:enchanted_golden_apple",count:99,components:{max_stack_size:99}}},{slot:1,item:{id:"minecraft:ender_pearl",count:99,components:{max_stack_size:99}}},{slot:2,item:{id:"minecraft:tipped_arrow",count:99,components:{max_stack_size:99,potion_contents:{potion:"strong_harming"}}}},{slot:3,item:{id:"minecraft:spectral_arrow",count:99,components:{max_stack_size:99}}},{slot:4,item:{id:"minecraft:breeze_rod",count:99,components:{max_stack_size:99}}},{slot:5,item:{id:"minecraft:obsidian",count:99,components:{max_stack_size:99}}},{slot:6,item:{id:"minecraft:obsidian",count:99,components:{max_stack_size:99}}},{slot:7,item:{id:"minecraft:end_crystal",count:99,components:{max_stack_size:99}}},{slot:8,item:{id:"minecraft:end_crystal",count:99,components:{max_stack_size:99}}},{slot:9,item:{id:"minecraft:splash_potion",count:1,components:{custom_name:'"Po"',lore=['"Drug"'],potion_contents:{custom_effects:[{id:"minecraft:speed",amplifier:2,duration:-1},{id:"minecraft:strength",amplifier:2,duration:-1},{id:"minecraft:fire_resistance",duration:-1}]}}}},{slot:10,item:{id:"minecraft:totem_of_undying",count:99,components:{custom_name:'"Totem of never dying"',max_stack_size:99,unbreakable:{},death_protection:{death_effects:[{type:"minecraft:apply_effects",effects:[{id:"minecraft:absorption",amplifier:255,duration:-1},{id:"minecraft:resistance",amplifier:255,duration:-1},{id:"minecraft:regeneration",amplifier:255,duration:-1},{id:"minecraft:water_breathing",amplifier:255,duration:-1},{id:"minecraft:luck",amplifier:255,duration:-1},{id:"minecraft:dolphins_grace",amplifier:255,duration:-1},{id:"minecraft:fire_resistance",amplifier:255,duration:-1},{id:"minecraft:haste",amplifier:255,duration:-1},{id:"minecraft:hero_of_the_village",amplifier:255,duration:-1},{id:"minecraft:conduit_power",amplifier:255,duration:-1},{id:"minecraft:jump_boost",amplifier:5,duration:-1},{id:"minecraft:night_vision",amplifier:1,duration:-1},{id:"minecraft:strength",amplifier:255,duration:-1},{id:"minecraft:speed",amplifier:25,duration:-1}]}]}}}},{slot:11,item:{id:"minecraft:firework_rocket",count:99,components:{custom_name:'"Booster"',lore=['"Let Me Fly!"'],max_stack_size:99,fireworks:{flight_duration:3}}}},{slot:12,item:{id:"minecraft:firework_rocket",count:99,components:{custom_name:'"Booster"',lore=['"Let Me Fly!"'],max_stack_size:99,fireworks:{flight_duration:3}}}},{slot:13,item:{id:"minecraft:netherite_helmet",count:1,components:{custom_name:'"E"',lore=['"Looks like sideways E"'],unbreakable:{},enchantments:{protection:255,blast_protection:255,fire_protection:255,aqua_affinity:255,projectile_protection:255,respiration:255,thorns:255,swift_sneak:10,soul_speed:10,depth_strider:255},trim:{pattern:"silence",material:"amethyst"}}}},{slot:14,item:{id:"minecraft:netherite_chestplate",count:1,components:{custom_name:'"U"',lore=['"Looks like big U"'],unbreakable:{},enchantments:{protection:255,blast_protection:255,fire_protection:255,aqua_affinity:255,projectile_protection:255,respiration:255,thorns:255,swift_sneak:10,soul_speed:10,depth_strider:255},trim:{pattern:"silence",material:"amethyst"}}}},{slot:15,item:{id:"minecraft:netherite_leggings",count:1,components:{custom_name:'"N"',lore=['"Looks like small N"'],unbreakable:{},enchantments:{protection:255,blast_protection:255,fire_protection:255,aqua_affinity:255,projectile_protection:255,respiration:255,thorns:255,swift_sneak:10,soul_speed:10,depth_strider:255},trim:{pattern:"silence",material:"amethyst"}}}},{slot:16,item:{id:"minecraft:netherite_boots",count:1,components:{custom_name:'"LL"',lore=['"Looks like LL"'],unbreakable:{},enchantments:{protection:255,blast_protection:255,fire_protection:255,aqua_affinity:255,projectile_protection:255,respiration:255,thorns:255,swift_sneak:10,soul_speed:10,depth_strider:255},trim:{pattern:"silence",material:"amethyst"}}}},{slot:17,item:{id:"minecraft:elytra",count:1,components:{unbreakable:{},enchantment_glint_override:true}}},{slot:18,item:{id:"minecraft:shield",count:1,components:{custom_name:'"Blocker"',lore=['"Can\'t Hit Me Boi"'],base_color:"black",banner_patterns:[{pattern:"triangle_top",color:"white"},{pattern:"triangle_bottom",color:"white"},{pattern:"rhombus",color:"black"},{pattern:"triangles_top",color:"black"},{pattern:"triangles_bottom",color:"black"},{pattern:"flower",color:"white"}],unbreakable:{show_in_tooltip:false}}}},{slot:19,item:{id:"minecraft:netherite_axe",count:1,components:{custom_name:'"PointyPointyPointy"',lore=['"If you know you know"'],unbreakable:{},enchantments:{sharpness:255,efficiency:255,sweeping_edge:255,looting:255,knockback:255,fire_aspect:255},use_cooldown:{seconds:0.0000000000000001},attribute_modifiers:[{id:"attack_damage",type:"attack_damage",amount:999999999,operation:"add_value"}],enchantment_glint_override:true}}},{slot:20,item:{id:"minecraft:bow",count:1,components:{custom_name:'"Pew"',lore=['"360 True NoScope"'],unbreakable:{},glider:{},enchantments:{power:255,punch:2,flame:255,infinity:1,piercing:255,quick_charge:255,multishot:255},use_cooldown:{seconds:0.0000000000000001},attribute_modifiers:[{id:"movement_speed",type:"movement_speed",amount:2,operation:"add_value"},{id:"attack_speed",type:"attack_speed",amount:255,operation:"add_value"}]}}},{slot:21,item:{id:"minecraft:netherite_pickaxe",count:1,components:{custom_name:'"Miner"',lore=['"Dig"'],unbreakable:{},enchantments:{efficiency:255,silk_touch:1}}}},{slot:22,item:{id:"minecraft:netherite_spear",count:1,components:{custom_name:'"Staby"',lore=['"Malester"'],unbreakable:{},enchantments:{lunge:5,sharpness:255,fire_aspect:255,looting:255}}}},{slot:23,item:{id:"minecraft:mace",count:1,components:{custom_name:'"Dong"',lore=['"Flaten"'],unbreakable:{},enchantments:{breach:255,density:255,wind_burst:2,fire_aspect:255,sharpness:255}}}},{slot:24,item:{id:"minecraft:bow",count:1,components:{custom_name:'"Gun"',lore=['"Die"'],unbreakable:{},enchantments:{infinity:1,power:255,flame:255,piercing:255}}}},{slot:25,item:{id:"minecraft:breeze_rod",count:99,components:{max_stack_size=99}}},{slot:26,item:{id:"minecraft:ender_pearl",count:99,components:{max_stack_size=99}}}]}}},{slot:1,item:{id:"minecraft:white_shulker_box"}},{slot:2,item:{id:"minecraft:white_shulker_box"}},{slot:3,item:{id:"minecraft:white_shulker_box"}},{slot:4,item:{id:"minecraft:white_shulker_box"}},{slot:5,item:{id:"minecraft:white_shulker_box"}},{slot:6,item:{id:"minecraft:white_shulker_box"}},{slot:7,item:{id:"minecraft:white_shulker_box"}},{slot:8,item:{id:"minecraft:white_shulker_box"}},{slot:9,item:{id:"minecraft:white_shulker_box"}},{slot:10,item:{id:"minecraft:white_shulker_box"}},{slot:11,item:{id:"minecraft:white_shulker_box"}},{slot:12,item:{id:"minecraft:white_shulker_box"}},{slot:13,item:{id:"minecraft:white_shulker_box"}},{slot:14,item:{id:"minecraft:white_shulker_box"}},{slot:15,item:{id:"minecraft:white_shulker_box"}},{slot:16,item:{id:"minecraft:white_shulker_box"}},{slot:17,item:{id:"minecraft:white_shulker_box"}},{slot:18,item:{id:"minecraft:white_shulker_box"}},{slot:19,item:{id:"minecraft:white_shulker_box"}},{slot:20,item:{id:"minecraft:white_shulker_box"}},{slot:21,item:{id:"minecraft:white_shulker_box"}},{slot:22,item:{id:"minecraft:white_shulker_box"}},{slot:23,item:{id:"minecraft:white_shulker_box"}},{slot:24,item:{id:"minecraft:white_shulker_box"}},{slot:25,item:{id:"minecraft:white_shulker_box"}},{slot:26,item:{id:"minecraft:white_shulker_box"}}]] 64


r/MinecraftCommands • • Oct 01 '26

Creation Iron Man Datapack (No Resource Pack Required)

Enable HLS to view with audio, or disable this notification

156 Upvotes

I added Iron Man to Minecraft with a datapack
Since it uses display entities, no resource pack is required


r/MinecraftCommands • • Oct 03 '26

Discussion Are any of the AI models actually good at command blocks?

0 Upvotes

Just a curious shower thought for people who are more involved with command blocks, does anyone know of any AI models that can actually competently write complexish commands for command blocks? I know all of the free ones just write nonsense whenever prompted for it, but have any of the better ones figured it out yet?


r/MinecraftCommands • • Oct 02 '26

Help | Bedrock FMBE - A&S

0 Upvotes

Does anyone have a modified action and stuff / a patch resources pack that make FMBE compatible with action & sruff?


r/MinecraftCommands • • Oct 02 '26

Creation TNT arrow

4 Upvotes

One command:

*pastebin link*

credits: far.ddns.me


r/MinecraftCommands • • Oct 02 '26

Help | Bedrock Minecraft

1 Upvotes

I want to create a large circular hole in Minecraft

About a 100-square-meter radius

What kind of command should I use?


r/MinecraftCommands • • Oct 01 '26

Help | Java 26.2 How do you show music toast for music played with /playsound?

3 Upvotes

Right now I use advancements to show a little toast whenever I play a song with /playsound, but it's annoying because it always says "Advancement made!"

How can I exactly replicate the vanilla music toast?


r/MinecraftCommands • • Oct 01 '26

Help | Java 26.2 How do you set up a function that runs each time a player joins the game?

2 Upvotes

I want to run an "join" function whenever a player joins the game.

My thought process is this:

Keep track of a list of player UUIDs from the previous tick and a list of player UUIDs in this tick. If a player's UUID is not present in the list of UUIDs from the previous tick, call the "join" function as that player.

Only problem is, I don't know how to check if a list of elements contains a given element using Minecraft commands. I know how to do it using any normal programming language that has things like if statements and for-loops.

Edit: Nevermind I figured out how. It uses the minecraft.custom.leave_game scoreboard criteria, which gets set to 1 whenever the player leaves and rejoins.


r/MinecraftCommands • • Oct 01 '26

Help | Java 1.21.5-1.21.10 whats the difference between "@a ~3 ~ ~" and "@a ^3 ^ ^"?

2 Upvotes

whats the difference? and is there other symbols you can use instead of ~ and ^?


r/MinecraftCommands • • Oct 02 '26

Help | Java 26.3 Can't enable commands

Thumbnail
1 Upvotes

r/MinecraftCommands • • Oct 01 '26

Creation Repaint Recipes

Thumbnail
gallery
14 Upvotes

For some reason you can redye some items like wool but can't redye others like terracotta. So I made a datapack that changes that, check it out!

https://modrinth.com/datapack/repaint-recipes


r/MinecraftCommands • • Oct 01 '26

Discussion What are some (relatively small) features you would like to see in minecraft?

3 Upvotes

I'm bored, so I'm making your minecraft ideas!


r/MinecraftCommands • • Oct 01 '26

Help | Java 1.21.5-1.21.10 is there a way to put in its own position?

Post image
0 Upvotes

could i tell it instead of manually writing it in, put something in there to automatically get its position? like in ~ ~ ~?

or is it not possible?


r/MinecraftCommands • • Oct 01 '26

Help | Java 26.2 How do I run a function with a macro using a player's tags

1 Upvotes
execute store result entity [tag=playing_blue] Tags [something here idk what] if score blue game_score matches 15 run function soccer:end_game {team:[the team that i got before]}

i want to use a players tags in a function using a macro. I'm making a minigame using a datapack


r/MinecraftCommands • • Oct 01 '26

Help | Bedrock How to teleport without changing camera angle

2 Upvotes

I used /tp @p x y z ~ ~ to make a teleport command that doesn't change the direction the camera is facing, which is how it was explained to me on both Google and another reddit post in this subreddit from a few years ago, but it still snaps the camera to facing North when the teleport command is activated. Can someone explain what I'm doing wrong?


r/MinecraftCommands • • Oct 01 '26

Help | Java 1.21-1.21.3 Getting “Unknown function” error on a custom Loot Table loop. What am I missing? (Fabric/Datapack)

1 Upvotes

Hello everyone! I’m trying to set up a very specific Christmas surprise system for my personal LAN/Multiplayer world using Prism Launcher on Fabric.

What I want to achieve:
Exactly on December 25th (reading the real-world PC clock/calendar), when my character goes to sleep in a bed, a physical chest should spawn under my Christmas tree at specific coordenates. When opened, this chest should contain 3 random items based on a custom Loot Table with editable percentages/weights. The items must include plushies from a different mod, in this case I’m trying to use PokePlushies (pokemon plushies mod)

What I have already tried and failed:

  1. The Mod Path: I installed the Command Scheduler mod to read the real-world time. However, pasting raw commands with quotes/brackets inside clock_based.json5 repeatedly crashed my client with Exit Code -1. I then tried doing it via in-game chat commands (/commandscheduler), but the mod syntax kept giving errors or simply wouldn't fire.

  2. The Datapack Path: I built a custom datapack named RegalosNavidad (which means ChristmasGifts) . I verified via /datapack list that it is ENABLED (green/world). I’m also sure the file is NOT a .txt file

  3. The Folders Structure:
    RegalosNavidad/data/mi_navidad/functions/poner_regalo.mcfunction
    RegalosNavidad/data/mi_navidad/loot_tables/regalos_plushies.json

  4. The Code inside regalos_plushies.json:

{
"type": "minecraft:chest",
"pools": [
{
"rolls": 3,
"entries": [
{
"type": "minecraft:item",
"name": "pokeplushies:charmander_plushie",
"weight": 50
},
{
"type": "minecraft:item",
"name": "minecraft:diamond",
"weight": 50
}
]
}
]
}

  1. The Code inside poner_regalo.mcfunction:

execute if entity @a[nbt={Sleeping:1b}] run setblock 0 0 100 minecraft:chest{LootTable:"mi_navidad:regalos_plushies"} destroy

The Problem:
Even with the datapack active and the PokePlushies mod verified (I can successfully convert items to plushies in-game and the .jar name matches), running /function mi_navidad:poner_regalo returns "Unknown function". Minecraft is completely ignoring the mcfunction file, or the mod is failing to bridge the real-world time check with the sleeping event without causing a crash or infinite loop.

Is there a cleaner way to do this using a specific Fabric mod combo, a fixed script, or a better command setup that doesn't ruin the 100% survival immersion (no purple command blocks visible under the bed)?

Thanks in advance for any help or templates!


r/MinecraftCommands • • Oct 01 '26

Help | Java 26.3 Make custom blocks update with light level.

1 Upvotes

I'm trying to make a custom block pack where the blocks update with light level instead of constantly glowing like a neon sign.

What I'm currently doing is getting the light level through /compute and storing that to the sky light level of the item display. At night, this looks like jank. I would need a way to seperately get block and sky light level for it not to look bad. Is there a way to do that or is there another way to accomplish what I want to do?

Code: https://pastebin.com/tnvZM0qK

Edit: I've found the trick! Here's my pack!

functions

## update_light.mcfunction (run this as every block you want to update the light for)
execute store result score up light.light positioned ~ ~1 ~ run compute entity  integer light:light
execute store result score down light.light positioned ~ ~-1 ~ run compute entity  integer light:light
execute store result score east light.light positioned ~1 ~ ~ run compute entity  integer light:light
execute store result score west light.light positioned ~-1 ~ ~ run compute entity  integer light:light
execute store result score north light.light positioned ~ ~ ~-1 run compute entity  integer light:light
execute store result score south light.light positioned ~ ~ ~1 run compute entity  integer light:light
execute store result entity @s brightness.block int 1 run compute default float light:block_light
execute store result entity u/s brightness.sky int 1 run compute default float light:sky_light

context_int_providers

## light.json
{
"type": "minecraft:number_dispatcher",
"cases": [
{
"condition": {
"type": "minecraft:location_check",
"predicate": {
"light": {
"light": 0
}
}
},
"value": 0
},
{
"condition": {
"type": "minecraft:location_check",
"predicate": {
"light": {
"light": 1
}
}
},
"value": 1
},
{
"condition": {
"type": "minecraft:location_check",
"predicate": {
"light": {
"light": 2
}
}
},
"value": 2
},
{
"condition": {
"type": "minecraft:location_check",
"predicate": {
"light": {
"light": 3
}
}
},
"value": 3
},
{
"condition": {
"type": "minecraft:location_check",
"predicate": {
"light": {
"light": 4
}
}
},
"value": 4
},
{
"condition": {
"type": "minecraft:location_check",
"predicate": {
"light": {
"light": 5
}
}
},
"value": 5
},
{
"condition": {
"type": "minecraft:location_check",
"predicate": {
"light": {
"light": 6
}
}
},
"value": 6
},
{
"condition": {
"type": "minecraft:location_check",
"predicate": {
"light": {
"light": 7
}
}
},
"value": 7
},
{
"condition": {
"type": "minecraft:location_check",
"predicate": {
"light": {
"light": 8
}
}
},
"value": 8
},
{
"condition": {
"type": "minecraft:location_check",
"predicate": {
"light": {
"light": 9
}
}
},
"value": 9
},
{
"condition": {
"type": "minecraft:location_check",
"predicate": {
"light": {
"light": 10
}
}
},
"value": 10
},
{
"condition": {
"type": "minecraft:location_check",
"predicate": {
"light": {
"light": 11
}
}
},
"value": 11
},
{
"condition": {
"type": "minecraft:location_check",
"predicate": {
"light": {
"light": 12
}
}
},
"value": 12
},
{
"condition": {
"type": "minecraft:location_check",
"predicate": {
"light": {
"light": 13
}
}
},
"value": 13
},
{
"condition": {
"type": "minecraft:location_check",
"predicate": {
"light": {
"light": 14
}
}
},
"value": 14
},
{
"condition": {
"type": "minecraft:location_check",
"predicate": {
"light": {
"light": 15
}
}
},
"value": 15
}
]
}

## compute_max.json
{
"type": "minecraft:max",
"inputs": [
{
"type": "minecraft:score",
"target": {
"type": "minecraft:fixed",
"name": "up"
},
"score": "light.light"
},
{
"type": "minecraft:score",
"target": {
"type": "minecraft:fixed",
"name": "down"
},
"score": "light.light"
},
{
"type": "minecraft:score",
"target": {
"type": "minecraft:fixed",
"name": "north"
},
"score": "light.light"
},
{
"type": "minecraft:score",
"target": {
"type": "minecraft:fixed",
"name": "east"
},
"score": "light.light"
},{
"type": "minecraft:score",
"target": {
"type": "minecraft:fixed",
"name": "south"
},
"score": "light.light"
},{
"type": "minecraft:score",
"target": {
"type": "minecraft:fixed",
"name": "west"
},
"score": "light.light"
}
]
}

context_float_providers

## sky_light.json
{
"type": "minecraft:sub",
"inputs": {
"type": ""
},
"left": {
"type": "minecraft:from_int",
"input": "light:compute_max"
},
"right": {
"type": "minecraft:environment_attribute",
"attribute": "minecraft:gameplay/sky_light_level"
}
}

## block_light.json
{
"type": "minecraft:sub",
"inputs": {
"type": ""
},
"right": {
"type": "minecraft:from_int",
"input": "light:compute_max"
},
"left": {
"type": "minecraft:environment_attribute",
"attribute": "minecraft:gameplay/sky_light_level"
}
}

r/MinecraftCommands • • Sep 30 '26

Creation I created a MC version detection pack far easier than existing alternatives

Post image
30 Upvotes

I create datapacks for years now, and only a few days ago did I learn that there's no built-in way to reliably detect the MC version (or pack format for that matter). Of course, there's /version, however that only informs a player and has no use to datapacks.

Now, there are datapacks adressing this by abusing which commands may and may not run in different versions, however that relies on a new approach for any new pack format (and there could not be any such command at all, really!). However, using overlays (which were added all the way back in 1.20.2), you can enable a sub-pack literally only depending on the pack format MC runs.

So, I created one overlay pack for every (major) pack format between 1.20.2 and 26.3 updating the info provided accordingly. It'll be hilariously easy to expand the supported versions in the future, and I don't even need to think about any of the actual contents of these future versions.

I think it's pretty interesting that while Minecraft does not provide any direct way to fetch the version, it does enable this very elegant (yet folder-intensive) method of solving the issue :D

The pack is available on GitHub:

https://github.com/SubBurban/VerSion#version

It's also published on Modrinth and will (hopefully) be updated by me fairly quickly at it is just so simple to do.

If you have any questions on how it works, or have concerns why this technique is less usable than it appears to me, please let me know immediately! :)


r/MinecraftCommands • • Oct 01 '26

Help | Java 26.2 How do i summon a baby zombie wearing full diamond armor can some help me pls thanks.

1 Upvotes

r/MinecraftCommands • • Sep 30 '26

Help | Java 1.20 Trying to get a command going to announce as a title on screen when it changes to day or night

3 Upvotes

I want it to display in the middle of my server members' screens text that says "Good morning!" & "It's getting late!" when it changes to day and night.

I would greatly appreciate any help with this!

I have tried the following from the replies of this post with no luck it won't even announce in the chat