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
2
votes
2answers
4k views

Does Minecraft allow NBT tags in crafting recipes?

I have a small question: does Minecraft JE allow NBT tags in crafting recipes? Because I'm making a map in 1.14.3 and some part of the map need custom NBT tags crafting and I need to use custom ...
0
votes
0answers
13 views

Custom recipes with item with csutom nbt as output

I'm trying to make custom recipes for a datapack and have found out how, but not how to change the output to anything but a basic item. I want to output a carrot_on_a_stick with the custom nbt data of ...
1
vote
0answers
10 views

How would I test if my custom dimension exists?

I'm making a datapack that relies on a custom dimension. If the dimension hasn't loaded in, it will break things. When you add the datapack to a pre-existing world, then the dimension won't load until ...
4
votes
3answers
153 views

How to hide functions from the autofill menu in Minecraft Bedrock Edition?

I'm creating several functions in a behavior pack for Minecraft Bedrock Edition, and I'd like to be able to hide some of them from the autofill/autocomplete menu that lists functions when you first ...
0
votes
1answer
65 views

Can Minecraft BE commands be converted to JE commands?

I'm trying to remake/translate a Bedrock Edition command into Java Edition, but it's not working: /execute @e[type=!armor_stand] ~ ~ ~ tp ^ ^ ^0.10 facing @e[name=blackhole,r=10] What am I doing ...
0
votes
0answers
17 views

Changing Username with Commands (Minecraft)

On Hypixel, there's a "/nick" command that can change your username on the TAB and chat menu. I don't need the nametag changed, just the TAB name. I found a command for this by Phoenix SC, ...
2
votes
1answer
67 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 ...
2
votes
1answer
88 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. ...
2
votes
0answers
18 views

How do I make it that /trigger will only execute a command once?

So I am making a datapack for custom enchantments. I want to make it where every time I use /trigger , then the command will be executed once. However, at the same time the objective value used in /...
5
votes
1answer
98 views

Loading an entire Minecraft structure using structure blocks

I've experimented a bit with structure blocks in the past and I know how to load single structures using them. For example, if I wanted to load in an End Ship or Fossil I would just select the ...
2
votes
0answers
15 views

How do I track player death in a specific area? [duplicate]

I want to make a shrine, in which you sacrifice yourself (die) to trigger Night/Day change For that I need to track player death in the area of that shrine, not anywhere else So far I've tried to ...
1
vote
2answers
42 views

Trying to make a custom item for a server but it wont work

This command is supposed to give me a custom item for a server. Why won't it work? give @p minecraft:netherite_sword { display: { Name: "[{\"text\":\"Kindness (¾)\",\&...
2
votes
1answer
42 views

How to remove a summoned potion?

I summoned a no gravity potion in my world and don't know how to remove it. Is there any command I can type to get it removed? I used this command to summon it: summon minecraft:potion ~ ~ ~ {...
5
votes
4answers
108k views

How to test for an hold item name in Minecraft?

I'm trying to make a command block that spawns an item in front of you if you are holding an item with a specific name. I've got these two working scripts; /testfor @p[r=10] {Inventory:[{tag:{display:...
1
vote
2answers
2k views

Using custom commands in Multicraft

I'm trying out using Multicraft to manage some aspects of my public server. There's a command option that is supposed to allow commands to be run by the web app when players type the commands into ...
3
votes
1answer
340 views

Testing for structures near players

I want to have a redstone timer that has a signal into a command block, with /execute @a ~ ~ ~ testforblocks <Coordinate 1> <Coordinate 2> <Relative Position> and then a compartor, ...
1
vote
1answer
24 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
1answer
4k views

How do I make a scoreboard command that detects when a player crouches in multiplayer?

In Minecraft 1.13/1.14, I start with some commands that work for singleplayer like: /scoreboard objectives add Sneak minecraft.custom:minecraft.sneak_time /execute as @a[scores={Sneak=1..}] at (my ...
3
votes
1answer
64 views

How to identify the coordinates of a specific block

I'm creating a wave rush world where every night, enemies spawn from mob spawners and attack you. I found a cave system and placed mob spawners all over it, but now I need help to find all of them ...
0
votes
1answer
20 views

Command to have lava increase creating a flood

Is there a command available to bedrock edtion that creates a lava flood? I want it where every 30 seconds the lava increase 1 block in height.
0
votes
3answers
4k views

How to set the world spawn to a player?

I am making a minigame in minecraft, and would like to know if there is a way to set a world spawn to a player, so that the compass points to them.
2
votes
1answer
836 views

(Java Minecraft 1.13) How to summon a splash water bottle with no gravity?

Right now, I'm making a "Fire Hose" item which shoots splash water bottles. I've got the velocity and everything working but for some reason it falls much quicker than I expected, and the trajectory ...
0
votes
1answer
2k views

Add multiple NBT tag Tags [duplicate]

Context: Ok, so I am making some custom enchantment stuffs and I want to be able to change the NBT data of the item, the way I am doing it is just making the players put the items into a chest then /...
2
votes
1answer
40 views

How can I replace blocks with air in Minecraft BE? [duplicate]

I filled up a house with light_block in minecraft-bedrock-edition and I need to replace them with air. Is there any possible command to do that? Note: I'm not against using a command block if needed. ...
-2
votes
1answer
37 views

How do i get an item with a bold / italic colored name

I know how to get a colored item but i cant find out how to get a bold and colored item at the same time.
0
votes
0answers
29 views

How can I make the position of one armor_stand dependent on the vertical rotation of a second armor_stands head rotation in minecraft 1.17

I have a ferris wheel and let the head of an armor_stand rotate vertically on the central axis. Since it is a vertical rotation, I cannot link the gondolas to the rotation of the entire armor_stand ...
2
votes
1answer
158 views

How can I keep mobs from being too close together with /spreadplayers and /execute?

I want to summon multiple Slimes, then make sure that they are never in the same block. (If it's not possible to keep them from being in the same block, having them be at least 1 block from each other ...
2
votes
1answer
43 views

How can I create a shop with currency in Minecraft, using the scoreboard command? [duplicate]

I previously knew how to make a shop using command blocks pre MC 1.13 before they changed a bunch of commands. I know the basics of /scoreboard and other commands but I'm really lost on this. I would ...
2
votes
1answer
22 views

No Scoreboard (how do I fix?)

I’m making a Kit PvP and I decide to add a scoreboard. A few minutes later, an admin joins and removes the scoreboard. I then kick the admin that removed the scoreboard and added the scoreboard back. ...
1
vote
1answer
896 views

How to program a command block to teleport if there is exactly one player nearby?

How can I program a command block (or a combination of blocks) to teleport nearby player only if there is exactly one player nearby? I.e. when button pressed, if there are more than one player within ...
2
votes
2answers
292 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.
1
vote
2answers
62 views

How to remove a block itself near another specific block

I want to know how to do this in Minecraft Bedrock Edition. For example: A player placed a chest near piston, is there any way to remove the chest itself near the piston?
4
votes
1answer
36 views

Why does this Minecraft Rotation Command not work?

I'm recreating the Donkey Kong arcade game in Minecraft, and I want Kong to be facing a certain way the whole time, so I put this command in a repeating command block: /execute as @e[name="Donkey ...
0
votes
1answer
252 views

How to execute a command block once taking hits?

So, I am doing a little Minecraft adventure map and the number one thing I keep getting stuck on is how to execute a command block once a zombie hits you three times. Thanks! :D
2
votes
1answer
42 views

How would I have a command block detect when a specific mob is hit?

I'm making a map, and I require that whenever certain animals are hit a string of events will occur. I tried looking around to see if I could synthesize some form of a working answer but it seems to ...
0
votes
1answer
158 views

Is there any way to change a non-player entity's data in Minecraft 1.7.10?

I need this rather old version for an experiment which likely doesn't work in newer versions. Unfortunately, the /entitydata command was added in 1.8 (and the /data being even newer. Is there any way ...
0
votes
1answer
47 views

How do I summon a command block as a falling block with commands inside?

I'm trying to learn how to spawn in multiple command blocks with lines in them using a single command block. Apparently it can be achieved via falling block entities and I have been successful in ...
2
votes
1answer
1k views

Player heads linked to player skin id

I know it is possible to give a player head with say ID of whatever skin you want but, I want to make it give the player head with the precise skin at the time the player is killed. I just don't want ...
0
votes
2answers
1k views

Finding a replacement for the scoreboard player test

I was trying to use the command /scoreboard players test @p Objective 1 in 1.14.2, but it seems like 1.14 has changed every command in Minecraft. I need help finding a replacement for this command. I ...
1
vote
2answers
93 views

How can I remove a specific amount of items from a player with commands, only when the player has equal or more than the requiered items?

I know how to do it, with specific quantity of items, such as 2 ender eyes, for example: /execute if data entity @p {Inventory:[{id:"minecraft:eye_of_ender",Count:2b}]} But it doesn't work ...
3
votes
3answers
7k views

Prevent Players From Stealing From Item Frames

How can I have item frames right in front of a player, and still keep them from stealing the items from the item frame(s)? [I don't want to have to use the /clear command to just clear the item from ...
2
votes
0answers
24 views

How do I make item frames unbreakable in Adventure Mode without locking the item inside?

I'm trying to make a map and the players in adventure mode can break item frames, so I'm trying to change that. I've searched it up and both the Invulnerable tag and the Fixed tag don't work for me, ...
11
votes
4answers
55k views

Can I have extra minecraft inventory?

Can I have extra Minecraft inventory in vanilla Minecraft? I have seen mods be able to do this but never in vanilla Minecraft. Is there some way for me to carry more. Maybe a command that allows ...
3
votes
0answers
31 views

How to make a scoreboard of how far someone has walked? (Minecraft Bedrock Edition)

I'm trying to make a leveling up system for an add-on I'm making for Bedrock Edition and I need to make a scoreboard of how much someone has walked/ran, I can't figure out a way to do this.
1
vote
2answers
59 views

How to prepend numbers with 0 if less than 10 in chat?

I am creating a timer system using the scoreboard. I would like the timer to display on the actionbar title in the format HH:MM:SS. Currently I already have command algorithms that will set the ...
0
votes
2answers
43 views

Say I want to mark a 30 blocks radius for spawn proofing, the I would need some kind of Indicator to show the 30 blocks radius,any suggestions?

I also want to point out that in Shulkercraft"s Witch farm,he somehow has a red circle Indicating the size of the spawn proofing to be done,I want a similar way,Link to his Video ...
19
votes
2answers
39k views

Is it possible to use NBT tags in commands in Minecraft: Bedrock Edition?

This question was split into different questions for each workaround. See these two meta posts for more information. Can you use NBT tags in commands? I’ve tried commands that normally work in Java ...
1
vote
1answer
92 views

I want to display scoreboard on a sign in minecraft 1.13 or above

I'm using this command to get a sign: /give @p minecraft:oak_sign{BlockEntityTag:{ Text1:'{"text":"","clickEvent":{"action":"run_command","value&...
3
votes
2answers
3k views

Is it possible to disable the 'Block Placed' message when using tellraw /setblock?

I want to make a /tellraw shop but to activate command blocks I want to use /setblock command when clicked on a text. Is it possible to disable "Block placed" text showing up?
1
vote
2answers
970 views

How to make a Potion Spawner in 1.12.2?

I am making a map but there's a problem, how to make a Potion Spawner in Minecraft 1.12.2? I am trying to make a command : /setblock ~0 ~1 ~0 mob_spawner 0 replace {SpawnData:{CustomPotionEffect:"...

1
2 3 4 5
89