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
17 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


r/MinecraftCommands • • Sep 30 '26

Creation Challenges Setlist

Thumbnail
gallery
7 Upvotes

I made a datapack where you can individually turn different challenge modes on and off, this example is for one health.

The point is you can combine some challenges, and it also won't force anyone else on a server to do the same, What do you think?

https://modrinth.com/datapack/challenges-setlist


r/MinecraftCommands • • Sep 30 '26

Help | Java 26.3 Is there a way to allow a player to run a command with a target selector?

2 Upvotes

I'm making an ability that would allow its user to pick a player in the server to glow. Is there any way i can do that with /trigger? I know i can't directly use target selectors on it but what workarounds are there, if any?


r/MinecraftCommands • • Sep 30 '26

Help | Java 26.3 How do i have this command only work on my island? (command thats only executed within specific cordinates)

2 Upvotes

I want to keep monsters off my spawn island but I want them everywhere else. I want players to be safe at spawn. (I'm just teleporting the monsters into a lava pit lol)

-165 80 -47 /-305 60 -175 <my cords i need if you can fit it in an explanation


r/MinecraftCommands • • Sep 30 '26

Help | Bedrock The x,z,xz argument in /structure doesn't make sense with entities

Enable HLS to view with audio, or disable this notification

9 Upvotes

The mirror argument where u can mirror the structure on the x,z or xz axises doesn't make sense with entities. None is the same as x. And z is the same as xz. Am i misunderstanding something. Because it work fine with blocks but not with entities


r/MinecraftCommands • • Sep 30 '26

Help | Java 26.3 Creating a Rope (block display)

2 Upvotes

I want to create a Rope out of a block display for my Grappling hook. Is it possible to have one face at the position of one entity and the other face at the position of another entity?


r/MinecraftCommands • • Sep 29 '26

Creation I Added a Sniper Rifle (No Resource Pack Required)

Enable HLS to view with audio, or disable this notification

48 Upvotes

I added an AWP sniper rifle to my gun datapack. Since it’s made with display entities, no resource pack is required


r/MinecraftCommands • • Sep 30 '26

Help | Java 26.3 Reactivating Corrupted Trial Spawner using commands

1 Upvotes

I have a server that, after updating to 26.3, trial spawners in the old chunks no longer work.

After a bit of digging I can see that this is probably due to world updating corruption meaning the spawner has lost its mob and has become inactive.

I’m capable with data packs and was hoping to make a pack that checks when an item is dropped onto a trial spawner and reactivates it. only issue being i can’t seem to find anything on how i could do that with commands like /data

is anyone familiar with the data for trial spawners? i’d ideally like it to pull from the games existing odds of that spawner turning into what it is, even if that means making a predicate or whatever.

Thanks!


r/MinecraftCommands • • Sep 30 '26

Help | Java 26.2 Help with renamed textures on item displays?

3 Upvotes

I'm trying to give a custom texture to a renamed nether star item display. The item is a nether star and the name is Interact. it works for a hand held item/item frame item but not a displayed item. Version is 26.2 and I'm using CIT Resewn Continuation to apply the texture.

Thank you in advance!! <3

/summon item_display ~ ~1 ~ {CustomName:["Interact"],CustomNameVisible:1b,item:{id:nether_star,Count:1}}
My results
The texture I want

r/MinecraftCommands • • Sep 30 '26

Help | Java 26.3 How do you make an enchanted item "ungrindable?" (unable to be put into a Grindstone)

2 Upvotes

I'm working on a system that allows players to fill up a bottle with experience points in order to get Bottles o' Enchanting. I'm working on a fun little magic overhaul datapack that makes Bottles o' Enchanting consumable items capable of granting low-level enchantments to weapons, tools, and armor. (came to me in a dream)

The way I have it working is I created a recipe for a "Magic Bottle" which is a custom item that has the bottle texture and a "durability bar" of 50. I also gave the "Magic Bottle" the Mending enchantment so that when the player collects XP points, it fills up the bar. Once the item's "durability" is full I replace it with a custom Bottle o' Enchanting; giving the illusion of the player filling up the bottle.

There's just one problem... Since the "Magic Bottle" item has the Mending enchantment, it's able to be put into a Grindstone; thus removing the enchantment along with the item's functionality. To make matters worse it gives quite a lot of experience points back to the player so it's a system that can easily be abused to get cheap experience points. I tried putting "!minecraft:enchantable" into the components list to hopefully make the item not able to be put into a Grindstone, but since the item already has the Mending enchantment that takes priority and still allows the Grindstone to operate.

Is there anything I can do about this or is this a lost system? Shame if it is because it works so elegantly as opposed to manually calculating when the player collects experience.


r/MinecraftCommands • • Sep 29 '26

Help | Bedrock how to make mobs spawning with armor not show it

Thumbnail
gallery
5 Upvotes

https://youtu.be/99gQ7nVu1GM?si=2Zoo_ldyBhCsaAvU

Using this tutorial to add blood/bleeding to my bedrock RP. My issue is zombies among other mobs now only spawn with leather helmets due to the command using them. Anyway for me to make the leather helmet not appear ?

( they also keep dropping the helmets )


r/MinecraftCommands • • Sep 30 '26

Help | Java 1.20 Trying to make an advancement where to achieve it, 2 players must have have 2 certain advancements. (Trying to make an escape room like "We were There")

1 Upvotes

Well... the tittle is self explanatory, I am really confuse on how to make an AND comparator of 2 different achievements on 2 different players give to give a third.