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" or "minecraft-bedrock-edition" tag.

Filter by
Sorted by
Tagged with
0
votes
1answer
44 views

In minecraft, How do i set a spawnpoint using command blocks

I'm trying to make a parkour course and I want to have the player respawn at every new checkpoint they reach when they die
-1
votes
1answer
83 views

How to do the /ride command in mine craft?

I want to put a baby polar bear on a panda. How can I accomplish this with /ride, and how does it work?
0
votes
0answers
45 views

How to detect a player's left-click [duplicate]

I'm writing a command for a customised enchantment that teleports a player holding a certain item to the direction that it's facing. However, according to my knowledge, there's no statistic in /...
2
votes
0answers
58 views

How can I make a smithing table recipe that yields a named item?

I am trying to make a datapack where you can combine a turtle shell and a netherite ingot in a smithing table to get a turtle shell with knockback resistance and armor toughness. I have figured out ...
1
vote
1answer
27 views

How can I detect when a player holds a tagged item? I just need to know the nbt for tagged items

My command is execute at @a[ scores={fire_mage=1..},tag=mage:1b] run summon minecraft:fireball ^ ^1 ^1 However this command does not detect the tag and shows an error for tag.
1
vote
1answer
47 views

How can I place a block randomly around my world?

I downloaded a lucky block mod and I want to place them randomly in my world. Is there a command to do this? I'd prefer the entire world to be affected but if it's just around 200 blocks then that's ...
1
vote
1answer
137 views

Is it possible to make armour that can survive /kill?

/kill is said to be infinity damage but I have a question can you really survive it in Java edition. However, it is possible that you can pretty much survive this if you are on Minecraft Java Edition ...
0
votes
1answer
75 views

How to teleport a player forward in the direction they're facing? [duplicate]

I am trying to simulate Mortis from Brawl Stars in Minecraft. In order to do this, I need to teleport the player a few blocks forward every time they click their mouse button to attack. I need help to ...
0
votes
1answer
61 views

What am I doing Incorectly?

I am trying to kill all entities in a custom dimension named "console" except myself, armor stands, and items. At the moment, it is killing all entities in all dimensions except me, armor ...
3
votes
1answer
24 views

How to check if a slot of a container block is empty?

I want to make a custom crafing system using droppers and need to check if certain slots are filled with the correct items. I can't find a way to check if certain slots are empty though. As not all ...
1
vote
1answer
21 views

Teleporting entity through command block teleports entity to command block and stops moving, even with execute as

I am using a repeating command block to repeatedly teleport a falling block with a custom tag called "Debris" 0.125 blocks on the negative z axis causes the falling block to teleport to the ...
0
votes
0answers
21 views

How can I detect when I hit a mob in minecraft? [duplicate]

I want to create a game in my server where you have a bunch of mobs, and when you hit one it gets sent to a "bucket", and the more mobs in the bucket, the more points you have. I've gotten ...
1
vote
1answer
58 views

Minecraft Windows 10: Is there a way to enchant armor a player is wearing?

I'm setting up a killer gamemode and I would like the killer to have armor with the curse of binding on it. I'm triggering the transformation with a single button attached to multiple command blocks. ...
-1
votes
2answers
65 views

How would i use /fill to fill an area with downward-facing dispensers filled with a bucket of lava?

I need a command for my server to fill an area of 516 blocks with downward-facing dispensers each carrying 1 bucket of lava. This is for a prison system. version 1.16.4 Vanilla
4
votes
1answer
76 views

How to transform the ID of a block at a certain position into an NBT string?

I'm trying to make a camouflage skill and I want to summon two falling block entities on the player to make it look like they're just two blocks standing there instead of a player. I know how to ...
3
votes
0answers
39 views

Spawn Mobs With Specific Items Equipped

Hi All, In MCPE 1.16.2, I want to create a way in which when I eat a specific item (call that ‘alpha’), it spawns 4 mobs with a helmet equipped. And also would it be possible to make the mobs work for ...
1
vote
1answer
96 views

How do I get portal blocks?

On the PS4, is it possible to get a nether portal block or an end portal block in my inventory to place wherever I want? If so, how would that be done?
0
votes
2answers
33 views

How to replace every specific item anywhere in my inventory with a specific item?

I am trying to make a datapack for weighted armors by replacing all normal armors with ones with specific attributes. I understand how attributes work, but I can't seem to find a way to replace normal ...
0
votes
1answer
35 views

How do i get a Snow fox in minecraft ps4. i have tried commands and they don't work

I have tried several commands but none work. Please help, it's for ps4 in a realm I have googled it and watched vids but nothing i have found works, please help me
1
vote
2answers
147 views

How to point a compass arrow to a certain player?

my cousin wants to play minecraft manhunt, but we play on ps4. I was wondering if we could use a command block to make a compass arrow point at a certain player.
2
votes
2answers
59 views

How to group air void air and cave air

execute unless air ~ ~ ~ doesn't work when you're in the void or in a cave. Is there something like #air that joins all air blocks together, like #wool?
2
votes
1answer
736 views

How do I make stacks of unstackable items?

Originally asked as the second question of Why is the /enchant command giving me an error when I go outside the normal level bounds?: Also, is there a way to get stacked armor pieces and stacked ...
2
votes
1answer
59 views

How can I get “primed TNT” in my inventory?

Is there a way I can make it so when I place an item it places primed TNT (flashing TNT that is about to explode)?
0
votes
2answers
87 views

Why is the /enchant command giving me an error when I go outside the normal level bounds?

When I tried to use the /enchant command on an item to get sharpness 6, it wouldn't work and gave me an error. Is there a way to toggle safe enchants? Or is there a different way to approach this?
3
votes
0answers
42 views

Test For A Specific Item In Head Slot & Then Activate Something Else

Hi All, I’m trying to create an addon in MCPE 1.16.2 but I’m struggling to do one thing. I want to be able to detect a player with an item on his head and then follow on with another command like ...
1
vote
1answer
37 views

Is there a way to detect every of a single entity and make another entity ride it at all times?

I want to make an execute command so that, for example, a command that detects all snowballs and summons one falling sand riding all snowballs that are currently in the air (you know, an entity). I ...
1
vote
0answers
22 views

Is there anyway to make mobs not attack you while playing in survival mode in minecraft edu?

Me and my friend are building some type of a RPG game in Minecraft: Education Edition and we were trying to figure out how to make mobs nonhostile while in survival and in normal mode. I searched up ...
12
votes
3answers
115 views

How can I get an enchanted item that cannot be used in a grindstone?

I'm trying to create a joke item (a book with quick charge 32k). This item should be completely useless. I know a way of making the book "too expensive" to apply in an anvil in survival mode,...
1
vote
4answers
725 views

How do I make Piglins dance in Minecraft?

So, I'm trying to get piglins to dance in Bedrock Edition, but they don't seem to dance when I play Pigstep. How do I get piglins to dance on Minecraft Bedrock Edition? Do I need to use /function?
0
votes
3answers
62 views

In a given location, how can I give a player some item?

So I want to make some minigame where players can get a certain item when they get into a specific location, where then they can craft with it and then PVP. So I thought of using the /execute command ...
-1
votes
1answer
27 views

How can I exclude a team from a selector?

I am making a Minecraft map and I made a minigame. I have this automatic effect to give infinite regeneration. I want to exclude the people playing the game from regeneration. The command I had is ...
1
vote
1answer
22 views

How to set scoreboard of the player to 'N' if the current score is 'n'? (Minecraft)

I am trying to set a scoreboard to track the players' progress through my map with a scoreboard but I don't want it to continue counting up if the player plays the same part multiple times. The ...
0
votes
1answer
28 views

Giving specific players whack effects. ( Wither touched)

So I want to create an action for a specific player when they whack an entity or other player they give them the wither stat on a Forge server in java. I feel like I can make something with ...
-1
votes
1answer
27 views

How to detect a players name in minecraft without testfor command in minecraft

I know that you can use testfor @p, but imagine the adventure maps or story maps if you care about chats. You will see it knows your name; for example, if the player name is "345tyou", we ...
-2
votes
2answers
38 views

How do I test for two items in one Command Block?

I want to test for two items in one Command Block. I tried this command: execute if entity @e[type=item,dx=-2,dy=6,dz=-2,nbt={Item:{id:"minecraft:quartz"}}] That is for just one item. How ...
9
votes
1answer
926 views

How can I make a piece of armor give the player no protection?

I've tried commands around this concept, but couldn't wrap my head around the NBT data for them. /replaceitem entity @p armor.feet minecraft:iron_boots 1 I want iron boots that don't actually do ...
1
vote
0answers
21 views

How to store execution result on entity arbitrarily without effecting gameplay?

I need to store the amount of one item a player has in their inventory to their own entity, but I need to store it in an arbitrary way that doesn't effect the gameplay. If this makes it any clearer, I ...
1
vote
1answer
13 views

Can scoreboard triggers be disabled?

Story The trigger scoreboard type is used to allow players, even without cheats, to modify their value of a scoreboard objective. By typing /scoreboard players enable <playerName> <objective&...
1
vote
0answers
19 views

How do I create an advancement that detect for an entity?

How do I create advancement that trigger when player gets near this: execute at @e[type=minecraft:item_frame,nbt={Item:{id:"minecraft:nether_star"},Facing:1b}] if block ~ ~-1 ~ minecraft:...
1
vote
0answers
21 views

Enchant particle 1.16.1

I've been trying to figure out how to make particles falling from the ceiling in 1.16.1 (I have optifine and it's java) but all my tries just failed , not a single particle appear, of course I checked ...
0
votes
2answers
68 views

How can I kill all entities outside the world in Minecraft?

I have summoned 100000 items and now I can't enter my world... What can I do? Is there any way to kill all entities inside it?
2
votes
3answers
101 views

In Minecraft how can I track how many mobs are alive?

I've been building a Minecraft map where you fight bees(yes I know I'm a cold-hearted person) and I'm trying to figure out a way so it stops spawning more bees when there is a certain amount(I don't ...
0
votes
0answers
28 views

error trying to put a command in minecraft [duplicate]

Hi (im spanish sorry for my english) im try to put this command in minecraft but not works, i need place a lever in chiseled stone bricks. /give @p lever 1 0 {CanPlaceOn:["minecraft:stonebrick 3&...
1
vote
1answer
50 views

Using command blocks to set players on fire

I want to use a command block to set a player (which already has permanent fire resistance) permanently on fire, mostly as an aesthetic. Right now I have the following command: /data merge entity <...
2
votes
1answer
37 views

How do I change the orientation of a falling block disguised as a minecraft:rail

I have this command: /summon minecraft:armor_stand 172.5 56.5 -242.5 {Invisible:1b,Invulnerable:1b,NoGravity:1b,Passengers:[{id:"minecraft:falling_block",BlockState:{Name:"minecraft:...
1
vote
2answers
96 views

How to get my dirt to not turn into a grass block?

So I made a flat world and I use it for displaying every single block and item in the game using the order of the creative inventory (excluding items accessible via commands). A certain order is dirt ...
0
votes
0answers
36 views

Find fishing bobber “owner” in Minecraft 1.16

I'm attempting to allow someone to use a fishing rod and essentially make an ore buster. I'm just not sure how I would be able to efficiently find the user of said fishing rod and perform the rest of ...
0
votes
1answer
49 views

Run a command block once every day

I created a device which gives out diamonds when a lever is pulled. The code is: setblock ~ ~5 ~ minecraft:diamond_ore destroy I want this to run on repeat and give out a diamond everyday or every ...
0
votes
1answer
41 views

F3 button not working in Minecraft [duplicate]

My F3 button doesn't work in Minecraft and no I don't want to brighten me screen but the F3 button is used for opening the coordinates and a lot of other things but for some reason I press the button ...
0
votes
1answer
40 views

Run Command If Player Is Not Within Radius

I am trying to make a repeating command block that will run a command if a player is not within the set radius, but I don't know how. If anybody knows please help. I am running 1.16.5

1 2 3
4
5
87