Questions tagged [minecraft-commands]

Anything related to the usage of commands, command blocks and functions in the Minecraft game series. If you're building a redstone device without commands, use the [minecraft-redstone] tag instead. Always use this tag together with the [minecraft-java-edition], [minecraft-bedrock-edition], or [minecraft-education-edition] tag.

Filter by
Sorted by
Tagged with
0 votes
0 answers
102 views

How Do You Get Custom Villagers In Bedrock

I am trying to make a minigame where you have to get a stack of emerald blocks and trade them with a villager to beat the game but I can't get a custom villager.
user avatar
2 votes
1 answer
644 views

Did using the /give command to get items with attributes change in 1.17.1?

I've already stumbled upon some similar threads, but none on version 1.17. So my issue is, I want to make custom items (sword, armors…) with custom attributes. I tried copy/pasting some commands, but ...
user avatar
0 votes
0 answers
33 views

How to get better particle trails Minecraft Bedrock

I wanted to make a flame stay on my head but, it moves in front of me when I look down and I've tried using ^^^ to make it move with me.
user avatar
0 votes
0 answers
69 views

InGround tag for tridents?

Link I'll be referencing to: Specific lightning arrow task, after the arrow strikes, and only using a specific bow This is just a quick question, using the chain of commands in circusbaby23's answer, ...
user avatar
0 votes
0 answers
49 views

Trigger Command After Specific Death Message

I am creating an adventure map in MC Bedrock and need a way to trigger a command when a player dies a certain way. For example, if a player is on Level 4 (tracked by a scoreboard), if they die by “...
user avatar
2 votes
1 answer
497 views

How to use /fill to fill tilled dirt?

I am trying to fill large areas of land with tilled dirt on one of my worlds. (Creative Mode) I am making a giant farm. I've been using the command /fill to put the dirt down, but is there any way to ...
user avatar
0 votes
2 answers
197 views

Frozen mob - Minecraft 1.17.1

I want to make some decorative "guard" mobs to stand next to my builds. Here is a command I tried to summon an Iron Golem that is frozen: summon iron_golem ~ ~ ~ {NoAI:1b} The Iron Golem ...
user avatar
1 vote
0 answers
39 views

Detecting if a player is in a storage GUI

I'm building a game in Bedrock Edition and can't figure this out. I need it so that when a player takes blocks out from a storage block and puts them into their hand while still in the storage GUI, ...
user avatar
  • 525
0 votes
1 answer
62 views

How to improve my lightning arrows?

A few weeks ago, I asked about how to summon lightning an x amount of times at an arrow shot from a specific bow (I named it Chaos of Asraelax), only after it hits the ground (because execute at @e[...
user avatar
0 votes
1 answer
218 views

Is there a way to test for a player's health Minecraft Bedrock?

I've been trying to make a Dead by Daylight map in Minecraft Bedrock but I can’t figure out how to make it so that when a player gets hit they receive a speed boost.
user avatar
0 votes
0 answers
156 views

How do I clear only items that have a certain NBT tag? [duplicate]

Is there, or is there not, a way to clear a player of every item no matter the id or count? But it HAS to have a specific NBT tag or it won't clear.
user avatar
0 votes
1 answer
48 views

How to kill a certain player from a group when they have scoreboard value?

I'm developing Squid game, and I'm currently on Red, Greenlight. 4 of my friends will join. The code I'm using is making a scoreboard and if it passes the fake player's point -> kill The code is ...
user avatar
4 votes
1 answer
69 views

Is it possible to trade with villagers using some sort of score? (commands)

I'm trying to make a system that transfers emeralds to a score to not take up inventory space, and that score can be used to trade. Is this possible? And if so, is it possible to display this score in ...
user avatar
2 votes
1 answer
333 views

How to change max players without enabling cheats [duplicate]

Per the title, I wish to know how I can change the max number of players allowed on my MinecraftPE world/server without losing any achievements (Or the ability to earn them). I am using iPadOS, but ...
user avatar
0 votes
0 answers
26 views

Why my Minecraft villager does not identify items while trading?

I am trying to make some custom villager trades that use emeralds with mending for money. But if I try to trade with those emeralds, the villager doesn't trade with me. These are the commands. This is ...
user avatar
  • 1
1 vote
1 answer
309 views

How do i get my custom mob to drop items with lores and have 2 diffrent attributes? (Minecraft 1.16.4 java)

Im making a boss type of a mob in my server and i couldnt find how to make a mob drop items with lores and 2 attributes. ( i need an illusioner to drop a skeleton head that is named "skull of the ...
user avatar
  • 11
1 vote
2 answers
360 views

Detecting an arrow in a mob?

Currently, I have 3 bows that shoot arrows, and when each arrow strikes the ground (detects if in ground by inGround=1b tag), it will summon lightning, tnt, anvils, or whatever doohickey thing I'm ...
user avatar
2 votes
1 answer
66 views

Teleporting Multiple People with Command Block in Minecraft Java Edition

Me and some friend have been working on a project in Minecraft, we are recreating some of the games from Minecraft Championships and having our own personal MCC. I am trying to find a way to teleport ...
user avatar
1 vote
1 answer
62 views

How to apply potion effect to players in specific distance?

I'm trying to make my friend Bee get the weakness potion effect every time she goes 20 blocks near my other friend Kay. How do I do this with command blocks?
user avatar
-1 votes
1 answer
98 views

Minecraft, Dead By Daylight minigame question [closed]

I have a question about a game I am creating. In the game people have to make 5 devices activate and how I plan to do this is they have to click a button 100 times with the command, /scoreboard ...
user avatar
1 vote
1 answer
173 views

Teleport to Scaled Coordinates?

I am working on a datapack and would like the give the end dimension a coordinate scale like the nether (so it can be used for fast travel). So I set the coordinate scale to 16 in the json file and it ...
user avatar
  • 805
0 votes
1 answer
43 views

How to give an inverted nbt tag to a mob?

Im having a problem where I need to grab the downwards motion of a player and transfer it to an upwards motion for another entity, I know how to give the Y motion of a player to an entity with the /...
user avatar
0 votes
1 answer
71 views

How to make items not stackable

I made item frames with items that keep replacing themselves, so I can get the items infinitely by clicking on it, but I don't want these items to stack. I know I can make items unstackable with tags, ...
user avatar
  • 77
0 votes
1 answer
123 views

How to kill every armor stand with an empty head slot

I need a command to kill every armor stand that has air in his head. I tried using /kill @e[type=minecraft:armor_stand,nbt={ArmorItems:[{},{},{},{}]}] and also tried /kill @e[type=minecraft:...
user avatar
  • 77
17 votes
1 answer
3k views

Where can I quickly get a list of all Minecraft blocks?

The title may be a bit unclear so let me explain a bit better; I want a list of every block currently in game for a datapack I'm working on. To be clear which way I want them: acacia_button ...
user avatar
2 votes
1 answer
513 views

1.16.5 - Detect what item player has in offhand slot

I want to create an item throwing system, that when I press F, the item goes 5 blocks for the direction I'm looking at. The problem is when I try to detect what item is in my offhand. I tried spawning ...
user avatar
  • 77
2 votes
1 answer
62 views

Randomize minecraft spawnpoint for every player in the server

So, I'm trying to find a way to make every player have a randomized spawn point. I know I can try by using /spreadplayers and then make everyone set their spawn point to where they landed and, other ...
user avatar
  • 23
1 vote
1 answer
160 views

how to make a named trident execute a command

So i'm making this world with lots of commands and when a trident hits the ground, it makes a cow named bob spawn. and when an arrow hits the ground, it gives a diamond. two is not enough for my next ...
user avatar
0 votes
1 answer
49 views

How to give a mob the player's motion?

I wanna make a mob have the same Motion as a player (as in changing their {Motion} tag) Is this even possible?
user avatar
1 vote
1 answer
40 views

How do I subtract points from a scoreboard from the NBT tag of an item in Minecraft Java 1.17.1?

Imagine I have a gold ingot with the NBT tag of {price:100}, and I have a scoreboard named "Money". How am I able to subtract the value of the player's Money by the number price in the NBT? ...
user avatar
2 votes
1 answer
227 views

How to hide an unbreakable tag in an unbreakble item?

I know how to make an unbreakable item, but is there a way to make it so that nobody can know that it's unbreakable?
user avatar
2 votes
0 answers
133 views

Summoning a ring/sphere of arrows around an arrow which had just struck the ground

I've been messing around with bows and arrows and summoning stuff when the arrow hits the ground, like lightning, but I've got an idea I do not really know where to start at. So here's the plan, I ...
user avatar
0 votes
1 answer
36 views

How to make bats giving poison effect to nearby players?

Bats don't do anything, and I'm thinking of making a datapack, so that when a bat gets close to a player, it will "bite" them, giving them a poison effect. How would I do this?
user avatar
0 votes
1 answer
129 views

Syntax error: Unexpected "score: at "execute if >>score<< Seconds Timer matches 60

I am trying to make a digital clock using the scoreboard commands and command blocks, when I try doing this and have followed steps correctly it says Syntax error: Unexpected "score: at "...
user avatar
0 votes
1 answer
189 views

How to properly detect use on a named/tagged Carrot on a stick?

I've been trying to detect the use of a custom Carrot on a stick using scoreboards. The way I'm doing this is by spawning one with a custom model, name and tag: give @p carrot_on_a_stick{display:{Name:...
user avatar
0 votes
0 answers
39 views

How do you detect whether a player has two of a specific item in their inventory, and then delete one?

I'm trying to recreate the old Missile Wars Mini-game in Minecraft Bedrock edition, and I've come across a problem that's stumped me; detecting if a player has 2 of the same stackable item, and then ...
user avatar
  • 1
0 votes
1 answer
40 views

How to make a rejoin system score in Minecraft 1.16.5?

I'm trying to make a Rejoin "system" where, if you rejoin the server, you get a score like it used to be in 1.12.2, with the command: /scoreboard objectives add [NAME] stat.leaveGame but I'...
user avatar
  • 1
1 vote
1 answer
94 views

How do I make a Minecraft map title show only once?

I'm trying to make a Minecraft map, but I ran into a problem. I want a title to appear when you go to a different zone (Similar to Wynncraft), but the problem is that it is showing multiple times, and ...
user avatar
3 votes
0 answers
36 views

Best way to dynamically call function

For my project, I have callable objects (arbitrary NBT dict that is theoretically capable of calling an mcfunction) stored on an NBT array (the Stack). At an arbitrary time in execution I want to be ...
user avatar
  • 490
0 votes
1 answer
79 views

How to spawn mobs still

In Minecraft, I have seen videos in which mobs are completely still, not even budging a pixel when attacked. I think this is possible via commands How do I do this?
user avatar
  • 137
1 vote
1 answer
612 views

How do I track which players join my Aternos Minecraft server [BE]

I have a Bedrock Edition Minecraft server that is hosted on aternos.org. I haven't yet made it public, but I'm wondering if there's any way to track which players join my server. I know that Aternos ...
user avatar
1 vote
2 answers
214 views

How can I create a command that gives me an effect every time I take damage?

I want to make a command that makes it so that every time I take damage, I get regeneration 3 until I come back to full health. I have zero knowledge of commands and coding so I'd appreciate some help....
user avatar
3 votes
1 answer
153 views

Summoning a falling entity on top of an arrow which had just hit the ground

This is just a follow-up question from my previous one, Specific lightning arrow task, after the arrow strikes, and only using a specific bow. So in that one, I asked how would one summon lightning an ...
user avatar
2 votes
1 answer
212 views

How to create a damaged item in Minecraft?

I need an item to have one durability and only break one block, so I need this command: /give @p minecraft:wooden_axe{CanDestroy:["minecraft:dark_oak_planks"]} 1 to also spawn it with only ...
user avatar
  • 23
4 votes
1 answer
261 views

Procedurally create/read from nbt object/dictionary

I'm working on a project that requires creating nbt dictionaries from another nbt array. Essentially, the scenerio is as follows I have array [1,2,3,4] and I would like to create a dictionary {1:2, 3:...
user avatar
  • 490
0 votes
1 answer
291 views

Is it possible to equip elytra using commands on Minecraft Pocket edition

Im on Pocket edition trying to make a puzzle map and I'm trying to equip elytra using commands and I can't figure it out
user avatar
0 votes
1 answer
684 views

How to summon a mob with an enchanted item? [duplicate]

I don't know how to summon a entity with an enchanted item, please help! (version 1.12.2) command: summon minecraft:zombie ~ ~ ~ {HandItems:[{id:iron_axe,Count:1}]} How can I make the iron axe ...
user avatar
0 votes
1 answer
79 views

I´m trying to set up a command which scans the scoreboard if a specific player has any deaths, and if so, a region of blocks should be replaced w/ air

This doesn´t work and I dont know why, please any suggestions. Thank you! /execute if entity @e[type=player,scores={Deaths=1}] run fill -427 4 81 -430 20 200 minecraft:air
user avatar
  • 1
3 votes
3 answers
340 views

Specific lightning arrow task, after the arrow strikes, and only using a specific bow

I was testing out this really fun command: /execute at @e[type=arrow] run summon lightning_bolt. It was really fun, summoning an entire line of lightning bolts, one after another, but what if I would ...
user avatar
0 votes
1 answer
38 views

Set a block when something happens

Okay, so I'm trying to get a block to change when something happens. I have the command execute as @a[scores={hunger=6}] run say you cant do that anymore to detect when your hunger is low. I also ...
user avatar

1
3 4
5
6 7
98