r/MinecraftCommands • u/Ani_lmao • 5m ago
Help | Bedrock Question
Is there a way to /loot ominous vaults, I'm new to commands
r/MinecraftCommands • u/Ani_lmao • 5m ago
Is there a way to /loot ominous vaults, I'm new to commands
r/MinecraftCommands • u/Wise_Competition5906 • 20m ago
I’m in bedrock edition and want to replace all bedrock in the world with deny blocks (In super flat), but /fill doesn’t have a big enough radius. Is there at least a way to replace it ~500-1000 blocks in all direction from spawn?
r/MinecraftCommands • u/plumper303 • 1h ago
Hello. I am trying to make a tag called "holding_creation" appear only when I am holding an item with the custom_data {creation:true}. It is not working. When I stop holding the item the tag doesn't go away, yet when I run the command that is supposed to remove the tag manually in my chat it works perfectly. For some reason the command does not work exclusively in the tick function. Every other command works in this function. That one just refuses to operate. Can someone explain to me why this is happening? Thank you. Here are all the commands in my tick function:
#give mode 0
execute as [tag=holding_creation] if score creation_mode matches 0 unless items entity weapon.mainhand *[custom_data~{creation_mode:0}] run item replace entity weapon.mainhand with iron_axe[custom_name=[{"text":"CREATION","bold":true,"italic":false}],food={nutrition:0,saturation:0,can_always_eat:1b},consumable={consume_seconds:1000000,animation:none,has_consume_particles:0b},tool={default_mining_speed:10,rules:[{blocks:"#mineable/pickaxe",correct_for_drops:1b},{blocks:"#mineable/axe",correct_for_drops:true},{blocks:"#mineable/hoe",correct_for_drops:true},{blocks:"#mineable/shovel",correct_for_drops:true}]},unbreakable={},custom_data={soulbound:true,creation:true,creation_mode:0}]
#give/remove creation
execute as [tag=creation_owner] unless items entity container.* *[custom_data~{creation:true}] unless items entity player.cursor *[custom_data~{creation:true}] unless items entity weapon.offhand *[custom_data~{creation:true}] run give iron_axe[custom_name=[{"text":"CREATION","bold":true,"italic":false}],food={nutrition:0,saturation:0,can_always_eat:1b},consumable={consume_seconds:1000000,animation:none,has_consume_particles:0b},tool={default_mining_speed:10,rules:[{blocks:"#mineable/pickaxe",correct_for_drops:1b},{blocks:"#mineable/axe",correct_for_drops:true},{blocks:"#mineable/hoe",correct_for_drops:true},{blocks:"#mineable/shovel",correct_for_drops:true}]},unbreakable={},custom_data={soulbound:true,creation:true,creation_mode:0}]
execute as [tag=!creation_owner] run clear *[custom_data~{creation:true}]
#holding creation tag
execute as if items entity weapon.mainhand *[custom_data~{creation:true}] run tag add holding_creation
execute as [tag=holding_creation] unless items entity weapon.mainhand *[custom_data~{creation:true}] run tag remove holding_creation
execute as [tag=holding_creation] unless items entity weapon.mainhand *[custom_data~{creation:true}] run say hi
#only one creation
execute as store result score num_of_creation_in_inv run clear *[custom_data~{creation:true}] 0
execute as if score num_of_creation_in_inv matches 2.. run clear *[custom_data~{creation:true}] 1
scoreboard players reset num_of_creation_in_inv
#switch creation mode
execute as [tag=holding_creation] if predicate origin:is_sneaking unless score mode_switch_cooldown matches 1.. run function origin:creation/switch_creation_mode
#decrease cooldowns
execute as if score mode_switch_cooldown matches 1.. run scoreboard players remove mode_switch_cooldown 1
execute as if score u/s mode_switch_cooldown matches ..0 run scoreboard players reset u/s mode_switch_cooldown
r/MinecraftCommands • u/DoughnutTime7526 • 1h ago
Setup: El setup es compacto, el primer bloque (con una palanca) en repetir, incondicional, se necesita Redstone, y el segundo en cadena, incondicional, siempre activo arriba de este.
Traducción del primer comando: (paste)
_.Se Ejecuta como el "jugador más cercano" (@p) con la condicional de "tener el item de pala de piedra en la mano principal" ([hasitem={}]) en la "Posición u coordenadas relativas del jugador" (at @s) corre el comando "carga la estructura de nombre replace, a 1.6 bloques de altura desde el piso del jugador (^ ^1.6)y 1.5 bloques de distancia desde el jugador" (^1.5)
Traducción del Segundo Comando: (copy)
_.Se Ejecuta como el "jugador más cercano" (@p) con la condicional de "tener el item de papel en la mano principal" ([hasitem={}]) en la "Posición u coordenadas relativas del jugador" (at @s) el comando "carga la estructura de nombre replace, a 1.6 bloques de altura desde el piso del jugador (^ ^1.6)y 1.5 bloques de distancia desde el jugador" (^1.5) hasta las mismas a 1.6 bloques de altura desde el piso del jugador (^ ^1.6)y 1.5 bloques de distancia desde el jugador" (^1.5)
_.Uso: sosteniendo el papel en la mano, miras a el bloque que quieres copiar y te lo quitas rápidamente, seguidamente miras a el otro lado en que quieres pegarlo ahora sosteniendo nuestra pala de piedra no pegando nos completamente al bloque en frente nuestro, y mirando recto hacia en frente ¡y listo! Una herramienta hecha en dos pasos, que puedes añadir para agilizar e inclusive ampliar el matiz de decoraciones que normalmente no serían posibles sin esta cualidad de forzar el poner bloques donde normalmente no se puede.
(Está idea obviamente es hecha a las prisas y por una necesidad que tuve mientras construía) así que la comparto a la comunidad para que exploten la idea, tengan buena tarde, o día, o noche ^^
r/MinecraftCommands • u/Your_averge_deegen • 2h ago
Basically what im trying to make is a set commands that make it so a specific player randomly gets 4 different effects for 5 seconds
some of the things ive tried experimenting with are scoreboards and a combo of the random command and the following command:
execute if score PLAYER RandomEffect matches 1 run effect give PLAYER minecraft:nausea 100 3
if anyone reading this has an idea on anyway i could set this up please let me know!
r/MinecraftCommands • u/TrompiBueno • 4h ago
How can I create a weapon with "Sharpness I" that upgrades to "Sharpness II" upon killing an entity, mob, or player, where the Sharpness level corresponds to the number of entities, mobs, or players killed? Note that when the enchantment level increases, the weapon must remain identical—retaining the same name, durability, etc.
r/MinecraftCommands • u/_ItzJustLuke • 4h ago
You can view particles with their proper sprites, animations, physics, and interactions :))
It also supports having multiple particles active at once, and has support for almost every particle
(This is NOT bug free, So if you encounter any issues please let me know)
https://lukejw12.github.io
This is the website
r/MinecraftCommands • u/Dorick_Da_Lazy • 4h ago
I found:
execute at @e[type=minecraft:snowball] unless block ~ ~-1 ~ air run summon minecraft:tnt
from https://www.reddit.com/r/MinecraftCommands/s/ppEtyL1gwS
and it works just fine until i add ,tag=<my tag> I want one tag to summon TnT and another to summon a wind charge
also if anyone knows a way for wind charges to instantly trigger that would be helpful also, thanks
r/MinecraftCommands • u/aussiegaminelitetv2 • 5h ago
r/MinecraftCommands • u/hd_vehset2 • 8h ago
Im coding the lunge enchantment from the start so entities such as zombies are gonna be able to use lunge enchantment but even tho I only change x and z Motions, it still resets the y motion to 0 so zombie keeps freezing in the air, how can I fix that. Here's the command;
summon minecraft:armor_stand ~ ~ ~ {Tags:[speartarget]}
execute as @e[tag=spearmacezombi] at @s run tp @s ~ ~ ~ facing entity @p[gamemode=!creative,gamemode=!spectator]
execute at @e[tag=spearmacezombi] run tp @e[limit=1,tag=speartarget] ^ ^ 1
execute as @e[tag=speartarget] store result score @s speartargetx run data get entity @s Pos[0] 10
execute as @e[tag=speartarget] store result score @s speartargety run data get entity @s Pos[2] 10
execute as @e[tag=spearmacezombi] store result score @s spearzombix run data get entity @s Pos[0] 10
execute as @e[tag=spearmacezombi] store result score @s spearzombiz run data get entity @s Pos[2] 10
scoreboard players operation @e[tag=speartarget] speartargety -= @e[tag=spearmacezombi] spearzombiz
scoreboard players operation @e[tag=speartarget] speartargetx -= @e[tag=spearmacezombi] spearzombix
execute as @e[tag=speartarget,limit=1] store result entity @e[tag=spearmacezombi,limit=1] Motion[0] double 0.1 run scoreboard players get @s speartargetx
execute as @e[tag=speartarget,limit=1] store result entity @e[tag=spearmacezombi,limit=1] Motion[2] double 0.1 run scoreboard players get @s speartargety
item replace entity @e[tag=spearmacezombi] weapon.mainhand with netherite_spear
kill @e[tag=speartarget]
execute at @e[tag=spearmacezombi] unless entity @a[distance=..3,gamemode=survival] unless entity @a[distance=..3,gamemode=adventure] run schedule function spearmacebot:lunge 7t append
also this command is in the spearmacebot:lunge function so it loops
r/MinecraftCommands • u/death_by_me_69 • 9h ago
Why doesn't the Trial Spawner I placed in Creative mode give ominous loot (like an Ominous Trial Key) after I drink an Ominous Bottle?
I placed both the Trial Spawner and the spawn egg in Creative, then switched to Survival and completed the trial, but it only gives normal loot instead of ominous loot. I am in Java 1.21.1 btw.
I've tried multiple times, and it's still not working. Am I missing something? I even tried the /setblock and even gave myself a spawner with its state as ominous, but it still didn't work. I just need it to work like a normal trail spawner.
Please help—I can't figure this out. 😭
r/MinecraftCommands • u/Appropriate_Show255 • 10h ago
I'm making an "execute if score join.er joining >= ..." command block. The command requires 2 existing scoreboard scores. I'm going to compare the score to 2.
r/MinecraftCommands • u/EntertainmentSea3789 • 11h ago
Enable HLS to view with audio, or disable this notification
r/MinecraftCommands • u/Gabriele4781 • 12h ago
Enable HLS to view with audio, or disable this notification
I made a working clock tower for my server only using commandblocks and a single plugin that lets me create variables but I think it could be easily replaced with a datapack
r/MinecraftCommands • u/Limp_Ad_3304 • 14h ago
Does anyone know how to fix a bug with Spyglass where command autocomplete suggestions don't appear and commands are colored either monochromatically or incorrectly - even though VSCode recognizes the file as "mcfunction" and Minecraft executes the commands properly? The datapack was created using the "/datapack create" command, so there are no structural errors. Spyglass output indicated a failure to download the cache. I tried deleting the cache and reinstalling the extension. The only thing that worked was installing version 4.5.0, but that doesn't suit my needs because I'm building a map for version 1.21.11, and the Spyglass syntax in that version is outdated.
r/MinecraftCommands • u/MonarchiaPlays • 19h ago
Enable HLS to view with audio, or disable this notification
Using a datapack, I've added a diet system to the game. Consuming foods of different groups is intended to give a set number of points to each respective group. For example, the golden carrot is intended to give 6 points to the vegetables score (which it does.) The potato is intended to give 1 point to the score (which it also does.) But for some reason, the carrot behaves completely differently. It is intended to give 3 points, but gives more, and gives points when clicking a block, as shown in the video. The setup is identical for all three items, and I scoured the code for instances where perhaps something else was adding to the score, but I can't find anything.
Carrot consumption is detected with an advancement carrot.json:
{
"criteria": {
"consume": {
"trigger": "minecraft:consume_item",
"conditions": {
"item": {
"items": ["carrot"]
}
}
}
},
"rewards": {
"function": "mastermode:eat/carrot"
}
}
This advancement is interchangeable with the golden carrot/potato advancement, barring you'd have to change instances of "carrot" with "golden_carrot" or "potato".
As a reward, this advancement runs the following function, carrot.mcfunction, that adds 3 points to the vegetables score and clears the advancement so another carrot may be eaten.
advancement revoke only mastermode:consumed/carrot
scoreboard players add @s vegetables 3
# For testing purposes:
say carrot.mcfunction ran
Again, I've used Ctrl+Shift+F in VS Code to look for instances of "scoreboard players add u/s vegetables 1", or "carrot", or "vegetables", and I've found nothing. I cannot for the life of me explain why the carrot specifically is working like this. I've tested like a dozen other food items and none of them have this problem. Any ideas/solutions would be appreciated.
r/MinecraftCommands • u/K1DaGreat1 • 19h ago
Alright so I'm trying to make a datapack to where if you stand on a specific coordinate, it'll say hi. I put it in the tick function it doesn't work. But when I do the command ingame it works, is there a way to fix this?
r/MinecraftCommands • u/Necessary-Pear718 • 20h ago
damage @s 1 minecraft:in_fire by @n[tag=boss]
Works when I remove the
by @n[tag=boss]
but no clue why.
r/MinecraftCommands • u/Excellent-Hurry-9284 • 1d ago
I was wondering if i could show some parts of a dialog only if the player meets a condition is there any way?
in minecraft Java using commands/datapacks
r/MinecraftCommands • u/Necessary-Pear718 • 1d ago
Is there any easy way to apply a specific amount of knockback to a player? Specifically, I want to make it so that if a player leaves an area (the area being [distance=..10] from a specific marker) they get pushed back in.
Also, unrelated question, but is there an easy way to make a "breakable" block display that drops nothing and can have a variable breaking time?
Sorry for the yap :D
r/MinecraftCommands • u/nastyforehead • 1d ago
I want to display an image on the screen using a resource pack using the new post effect thing but I have no idea where to start at all
r/MinecraftCommands • u/AcceptF • 1d ago
is there a way to use stored scoreboard values in a command? like if i have a scoreboard value called random that outputs a random value and i want to place a structure, is there a way to set it up so it runs like
/place template minecraft:random
r/MinecraftCommands • u/ceery-6483 • 1d ago
The commands to summon him and his teleportation pattern
r/MinecraftCommands • u/Select-Challenge-957 • 1d ago
We have a private server and i discovered a plugin that i can spawn 3d models made with the /summon block_display command called BlockDisplayCreator.
When i used it to spawn some block displays in for furniture, my friend told me he was experiencing some lag, and after /killing all the block displays, checking entity hitboxes, and even using an XRay entity detection mod where i found no leftover entities, he still lagged and blamed it on my block displays. He stated that they must've left some kind of residue that causes lag buildup and low fps even after they're deleted. I said that's completely wrong because all the plugin does is evoke a /summon command and all the summon command does is spawn a bunch of entities together that can be completely deleted by using the /kill command. He refused to understand and stated that he never lagged before i added the entities in, and as soon as i added them in he started lagging even after i /killed them.
Is there a possibility that there is a minecraft bug that causes it to keep some kind of "cache" or data that makes the game have constant lower fps?
r/MinecraftCommands • u/Redstocat2 • 1d ago
I checked some other solutions in this subreddit and they did not work, please help me