/r/MinecraftCommands
A place for all things about commands, command blocks and data-packs in vanilla Minecraft; to share, to question, to discuss, and more!
Please read the pinned post before posting.
Welcome to /r/MinecraftCommands!
Discuss, share, and ask questions about Minecraft commands and command blocks. Have fun and don't be afraid to ask questions!
Please read the pinned post before posting.
Feel free to join and ask questions on our community Discord server.
The links and pages on the subreddit wiki might help you.
If you have any questions or issues about the subreddit, you can contact the Moderators for assistance.
Rules of the subreddit:
No spamming comments, posts, or links.
Do not post inappropriate content.
Be respectful: Do not use offensive language, especially directed towards others.
Use common sense.
If you may fail to follow these rules on a constant basis, and ignore a moderator's warnings, you may be banned!
ENJOY!
This subreddit uses a custom version of /r/Naut.
You can follow the design development of the subreddit at /r/MCCDesign.
/r/MinecraftCommands
Ive been trying for a few days to make my datapack that adds lore books to chest loot tables only spawn one of each book. Frankly I'm stumped. I have lore books written up, I have them included in chest loot tables, propagating perfectly fine. However I want to limit it so that there is only ever one of each lore book. I cannot figure out how to A) remove it from the pool once one has been found, or B) how to just delete them as they are generated after one has been found (and marked safe from deletion?)
Any help is appreciated.
I am making my own variant of '3rd life' and have come across some issues, the premise is that you start on 1 heart and every time you die you gain 1 heart until you reach 10 hearts, the if you die, you are out. I am able to easily make a system that determines how many lives you have but i am struggling with a system that sets your hearts amount to 'deathCount + 1'. is there any quick command i can chuck in a command block to do this?
I need it so that when a player eats a specific food it detects it and uses a command to place a block for a certain amount of time
tellraw @a {"text": "hello im on"}
scoreboard objectives add x dummy
scoreboard objectives add y dummy
scoreboard objectives add z dummy
execute store result score @a x run random value 900..1876
execute store result score @a y run random value 900..1876
execute store result score @a z run random value 900..1876
tellraw @a [{"bold":true,"color":"blue","text":"X="},{"bold":false,"italic":true,"score":{"name":"@a","objective":"x"}}]
tellraw @a [{"bold":true,"color":"yellow","text":"Y="},{"bold":false,"italic":true,"score":{"name":"@a","objective":"y"}}]
tellraw @a [{"bold":true,"color":"aqua","text":"Z="},{"bold":false,"italic":true,"score":{"name":"@a","objective":"z"}}]
function macro:summon_gravity {"x":"score.x","y":"score.y","z":"score.z"}
like i have this function and i want to have a thing that places a armor stand with high gravity in the world at a random location and spawns a structure at that location cause for some reason data pack dose not want to use my structure in world gen
I am working on a custom enchantment and I wanted to use /damage to trigger the enchantment through commands but it doesn't seem to work, is there other ways I can trigger enchantment effects through commands?
Hi! im still very new to command blocks and how they work. im currently trying to work on a Stardew Valley custom map and i need help. im trying to seperate the exteriors and interiors so that when you "enter" a building, it takes you to the actual interior ive built elsewhere. is there any sorta of command that can make it to where i can send someone to another area when they walk in? or maybe when they interact with the door? any help would be appreciated thank you!!
Have villagers explode when I'm close to them I'm a command block expert I'd say and I cannot have this happen without going near one and them all exploding.
Hello, I'm pretty new to using commands/command block and can't figure this out.
What I'm trying to do is..
The world will be set to adventure mode, but each player will have their "base area" that changes them to survival mode. When they leave their base area, they go back into adventure mode even if they enter another player's base area.
Any help would be greatly appreciated
Why when I put 1 second for effects it makes it 20 and when I put 20 seconds it becomes 400 seconds, basically it is multiplying by 20. Why?
Hey! Recently, i've been working on a save system for maps, where the idea's that you can run a function command to save & load savestates. I've already completed inventory saving, but i've hit a wall when it comes to saving the actual blocks themselves. I've discovered that structure blocks powered by redstone don't save the structure to disk as they do when you open the gui and press SAVE manually, and beyond that i can't think of any more solutions. Any ideas i can try? Thanks!
I am trying to set a cooldown for when a player throws a trident. I had a function that did this using the "used.trident" objective, but it seems that 1.21.2/3 has made it so throwing it no longer counts the score up.
How else can I test this?
Thanks
Yeah that's pretty much it, if there is any way that all enchants and potion levels cap at level 1? whether that be from enchanting/brewing, or finding it in a loot chest. I want to keep them at level 1
I'm trying to create a data pack for minecraft 1.21.3 that changes the mushroom island to a tropical island, but I can't remove the mycelium, what can I do?
I need help a command. Imagine 3 locations, 1,2, and 3. What I want is a button at lactation 1 which teleports you to location 2 where you stay for 10 minutes and then automatically got to location 3 -!: visa versa.
So 1 and 3 are start and destinations and 2 is the middle point. Is this possible?
so i got a structure block to save these skulls from the wither and they are named wither_skull_dangerous for those who don't know and im trying to make it lock in on the player when spawned any idea how to do that?
Help, I'm trying to make a Despenser that automatically puts armour on a player, I also need it to infinity refill. Im Basing this on a scp like map that also uses this method to equip armour when spawning in.
my command blocks keep saying my title command works but nobody sees it
currently i have
/title @ a[tag=####] subtitle "#####"
/title @ a[tag=####] title "#####"
whenever the command blocks are activated it says in chat
title command successfully executed
but nothing comes up
Skibidi
hello i need help, i tried to make custom grass in my biome to generate naturally, but it gives me an error pls check, i double checked everything, i think it could be the custom function or the configured feature that uses the function pls help here is the datapack and resourcepack
I want a funtction to cange the tick rate but when i try to execute the funtion to test it, just doesn't show up.
I have no other commands on the funtion other than "tick rate 40", i have saved changes, reloaded the world, checked that the datapack is enabled and all the other function work
Can you just not modify tickrate on a datapack?
is there a way to create an arrow that can give you freezing damage as well as display the frost screen affect without needing the interaction with a power snow block?
How can I do that?
Pretty much the title.
Running a server with a few friends on 1.21.3, we have the pale garden turned on but it's pretty limited compared to what will be in the update this week.
There is a handful of datapacks on the server, are they likely to all break if I update the server to whatever this update is 1.21.4? Or do we need to wait for the update to release to know?
Examples of packs in use - Vanilla Tweaks, Mob Heads, Dungeons and Taverns, Trimsfault
I want to make a command where every time i hit an enemy they get slowness 1 but i cant get the command to work. Can someone help me?
Is it possible to add nbt data to items used in a recipe? If so I would like to detect if the apple has custom data of "cursedapple:true"
Code:
{
"type": "minecraft:crafting_shapeless",
"ingredients": [
{
"item": "minecraft:glass_bottle"
},
{
"item": "minecraft:apple"
}
],
"result": {
"id": "minecraft:splash_potion",
"components": {
"minecraft:custom_name": "{\"text\":\"Cursed Potion\",\"color\":\"gray\",\"bold\":true,\"italic\":false}",
"minecraft:potion_contents": {
"potion": "minecraft:water",
"custom_color": 0,
"custom_effects": [
{
"id": "minecraft:unluck",
"amplifier": 0,
"duration": 21,
"ambient": false,
"show_particles": false,
"show_icon": false
}
]
},
"minecraft:hide_additional_tooltip": {}
}
}
}
I am trying to make a parkour map when you try and beat the game in parkour style and I was wondering is there a command that lets you teleport back to spawn when touching a block.