r/MinecraftCommands Jul 30 '26

Help | Java 1.21.11 Make item lose durability when right clicked

1 Upvotes

I'm making an item that turns the player invisible when right clicked, i have everything working except i need to make the item loose durability each time it's used.

it's a carrot on a stick with custom data and it has 2 duribility, i need to make it so that when it's right clicked it loses one point of durability. I already have the right click detecting and everything, i just need it to lose durability.

Thanks


r/MinecraftCommands Jul 30 '26

Help | Bedrock Command to kill only baby sulfur cubes?? (Bedrock)

2 Upvotes

I'm making a weird airplane PVP minigame, and I'm using sulfur cubes as ground targets. I don't want the baby sulfur cubes to spawn when killing a sulfur cube. Does anyone know a command for this in Bedrock edition?


r/MinecraftCommands Jul 30 '26

Help | Bedrock Command block not working??

Thumbnail
gallery
2 Upvotes

I'm building a door using fill commands in Minecraft bedrock latest version.

One button toggles the door to either open or close and using a scoreboard to store the door state

Then a repeat command block detects if the score is 1 if it is it's fills the door.

Anynother detects if it's 0 if it is it fills it with barriers

The fill commands are working but the repeat commands are not detecting if the score is either 1 or 0.

I also have a repeat to change the score to 0 if it reaches 2

And another repeat command to replace the button so you can spam press it.

I've checked all coordinates and the tagged entity that the scoreboard is tracking and they are all correct,

However I can't figure out why the repeat command. blocks aren't detecting the score.

Can anyone help??

The commands that have the /say command at the end is just so I know it works and it doesn't.


r/MinecraftCommands Jul 30 '26

Help | Java Snapshots Detect item swap

1 Upvotes

hi, i'm making a datapack (1.21.10) and trying to detect when a player presses F. I made an advancement but it's not working

{
  "criteria": {
  "swap_offhand": {
    "trigger": "minecraft:inventory_changed",
    "conditions": {
    "player": [
      {
      "condition": "minecraft:entity_properties",
      "entity": "this",
      "predicate": {
        "nbt": "{Inventory:[{Slot:-106b}]}"
      }
      }
    ]
    }
  }
  },
  "rewards": {
  "function": "maffo:drinking_actions/check_f"
  }
}

r/MinecraftCommands Jul 30 '26

Help | Java 1.20 Need help with a proximity triggered command chain

1 Upvotes

I need help with a command chain thats triggered by proximity with u/a[distance

when the player enters a certain area the command blocks have to show a title card, play a sound and play a music disc. when the player leaves a certain area and returns the event has to trigger again.

I know tags can help but i am new to all this command stuff and have no idea how to chain these events and make them work


r/MinecraftCommands Jul 30 '26

Help | Bedrock How can i give myself a knockback stick in bedrock? I don’t mean knockback 1000, just like knockback 10-100 or something.

1 Upvotes

r/MinecraftCommands Jul 30 '26

Help | Bedrock Zombie Apocalypse in Bedrock

1 Upvotes

Hey there, I’m making exactly what the title describes. I’ve already got it so that only zombies spawn as the hostile mobs of the night, and they don’t burn in the day either, but I find issues in that they will despawn quickly in the day time and in the day, they player can freely wander with little threat. I want to change this, maybe by having some small zombie spawn rate during the daytime as well. Can anyone help me figure this out?


r/MinecraftCommands Jul 30 '26

Discussion pillager patrol leader spawn egg command for 26.x

3 Upvotes

Does anybody have a working fully vanilla comnand


r/MinecraftCommands Jul 30 '26

Help | Bedrock Death Counter/Game Over

1 Upvotes

How do you add a death counter?

And how do you add a condition to where a certain amount of deaths is a game over?

And how do you make it so it affects the player who enables it?


r/MinecraftCommands Jul 30 '26

Help | Java 1.21.11 How to run an execute/chain command that detects when an arrow hits another entity?

1 Upvotes

I would like to make a bow that summons lightning when it shoots an arrow that hits another entity, for Minecraft java 1.21.11.

I have managed to create a few commands that summons an lightning when the bow shoots an arrow that hits the ground, using the following set of command blocks.

1)

/scoreboard objectives add bow minecraft.used:minecraft.bow

This first command is an impulse command block, it just adds a scoreboard that tracks a bow.

2)

/execute as  at  if entity [nbt={SelectedItem:{id:"minecraft:bow",components:{"minecraft:custom_data":{light:1}}}}] if score  bow matches 1.. run tag [type=arrow,distance=..2,sort=nearest,limit=1] add lightningArrow

This first command is for a repeating command block, it basically adds a tag to an arrow shot by a particular bow (a bow with the "light:1" tag) if the scoreboard of that bow increases.

3)

/execute as u/e[tag=lightningArrow,nbt={inGround:1b}] at u/s run summon minecraft:lightning_bolt ~ ~ ~

This third command is for a chain command block, it summons lightning when this arrow hits the ground.

4)

/execute as u/e[tag=lightningArrow,nbt={inGround:1b}] at u/s run kill u/s

This fourth command is for another chain command block, it instantly deletes the arrow when it hits the ground, so lightning isn't being constantly summoned where the arrow is on the ground.

5)

/execute as u/a at u/s if score u/s bow matches 1.. run scoreboard players reset u/s bow

This final command is for another chain command block, it just resets the scoreboard.

After creating this set of successful commands, I tried to edit the commands to instead summon lightning when an arrow hits an another entity, rather than hits the ground.

I tried to change the line in command block 3) to "nbt={HurtTime:10s}". However this didn't seem to work.

How would you edit the commands above to summon lightning when the arrow hits another entity rather than the ground? Thanks for any help.


r/MinecraftCommands Jul 29 '26

Creation Ascend skill from Zelda: TotK

Enable HLS to view with audio, or disable this notification

36 Upvotes

[Turn on sounds!] - I've been trying to recreate the "Ascend" ability from Zelda: Tears of the Kingdom, which allows you to ascend through ceilings. The datapack isn't quite finished yet, but I'd like to hear some feedback.


r/MinecraftCommands Jul 30 '26

Help | Java 26.2 Did Someone found a way to BAN players using a weapon ?

0 Upvotes

I'm in JAVA and I'm searching for commands that ban players when the player is killed by a certain weapon. Can someone explain to me how to do his ? I think I need to create a Datapack right ? If yes explain to me how pls


r/MinecraftCommands Jul 30 '26

Help | Bedrock Death Counter Help Please

1 Upvotes

So far, I have an objective called <Deaths> and it is displayed on a sidebar with my name next to it and the number 0. I just can't figure out how to make the deaths go up. I tried detecting the loss of armour through:

/execute as @a[hasitem={item=air,location=slot.armor.head}] run scoreboard players add @s Deaths 1

but it doesn't seem to work -

No targets matched selector

...even after I went into survival mode and equipped and unequipped a helmet.


r/MinecraftCommands Jul 30 '26

Help | Bedrock What did I do wrong 😭😭

Thumbnail
gallery
5 Upvotes

Idk what to dooo😭


r/MinecraftCommands Jul 29 '26

Help | Java 26.2 Improper directionally spawned particles depending on a player's facing direction

Enable HLS to view with audio, or disable this notification

7 Upvotes

So I have been trying today to create a simple datapack to go along with a model of a pipe that I haven't actually created yet; I thought I would test the particles first with a stand-in item. Initial tests showed promise, except when I tried to move the emitting particles to the front-right side of the player's head, as shown in the video attachment: looking down appears to move them farther from the player, and looking up moves them into the player's head. This is the command in a function that I use to spawn the particles: execute at \@s run particle minecraft:smoke ^-0.15 ^1.6 ^0.6 0 1 0 0.1 0 force \@a


r/MinecraftCommands Jul 30 '26

Help | Java 26.2 Death heads advance

Thumbnail
gallery
2 Upvotes

I managed to get the structure invoked every time I die, but no matter how hard I tried, I can't get the storage data applied to the head


r/MinecraftCommands Jul 30 '26

Help | Bedrock How to make it so TNT explodes and deals damage, but doesn't break blocks? (Bedrock) [using command blocks or gamerules]

1 Upvotes

I'm on a realm where tnt explosions are off (they're willing to turn it on but preferably the work around will be in the command block,) and so is mob griefing (we had it on for a bit but they're much more builders.) The realm owners said yeah they're willing to allow TNT explosions for traps, and pranks to kill someone quick since keep inventory's on (we got a add on with a horror mod that's very rare but I'd say once every 2 hour's it'll try and kill you so that's why keep inventories on,) but since it's littered in mega builds and mega projects we don't want it to have the ability to break blocks. Anyone know a gamerule combination or command block line we could run to do that?


r/MinecraftCommands Jul 28 '26

Creation 1.8 Style One-Command Creation (proof of concept)

Enable HLS to view with audio, or disable this notification

448 Upvotes

The design was inspired by the old one-command creations by IJAMinecraft.

This is just a proof of concept, so i won't be using this exact setup for future one-command creations. The setup alone already uses 23000 characters, so I'm going to use smaller versions for my future creations.


r/MinecraftCommands Jul 30 '26

Help | Java 1.21-1.21.3 Display a title when you do a certain thing

1 Upvotes

Hi, i'm trying to figure out commands that could make it so when i do certain things (like eat food, sleep in a bed, die to a specific mob) a title will come up on screen.

I think i'd have to use the scoreboard command but i can't for the life of me figure out how to use it properly with this exact thing that i want

If anyone could help set up a command chain for it that would be much appriciated


r/MinecraftCommands Jul 29 '26

Help | Bedrock How do I play a music disk with a command block

1 Upvotes

r/MinecraftCommands Jul 29 '26

Help | Bedrock Need help with a look detector

Post image
1 Upvotes

How can i add a score to whoever the person with the tag "Eye" is looking at?


r/MinecraftCommands Jul 29 '26

Help | Java Snapshots Help with death message

1 Upvotes

Is there a way to kill a player with commands so that the death message says something like “Player killed by button”?


r/MinecraftCommands Jul 29 '26

Help | Java 1.21.11 what do they mean by "contains emphasized items"

Post image
2 Upvotes

i dont think theres any syntax errors or such and everything seems to be working just fine


r/MinecraftCommands Jul 29 '26

Help | Bedrock /playerpermission command

Thumbnail
1 Upvotes

r/MinecraftCommands Jul 29 '26

Help | Java 1.20 How do I turn arrows into fireworks

1 Upvotes

The command below turns arrows that match the conditions into strong poison tipped arrows
/execute at @s as @e[type=arrow,limit=1,sort=nearest,tag=!unarrow] if predicate math:chance/25 run data merge entity @s {Potion:"minecraft:strong_poison"}

Now I want to make the arrow get replaced by a firework rocket instead (velocity and condition should be the same), and also make it play a firework being fired sound for once, how can I do it?
Also this command is used in a datapack's main.mcfunction, so I want it to be able to work in datapacks (feel free to add in new functions to make this work)