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.

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

How do i spawn in a command block with a command in it on minecraft bedrock edition? [duplicate]

I have a friend on discord and I am making a function pack for him. He said we were screwed because we couldn't spawn in a command block with a command in it. Is there a way to do that?
0
votes
2answers
93 views

Talking in chat from other player's perspectives

I have been playing Minecraft 1.12.2 Java Edition on PC. One of my friends started to make me say stuff I wasn't saying in the chat. I don't know what command he was using but he basically made the ...
-2
votes
0answers
43 views

how do I make a command block shop that you will need a certain number of items to buy a item with enchantments [duplicate]

I've been struggling with this problem, I have continued to try and look up tutorials in bedrock edition but I couldn't so I need some help from someone.
2
votes
2answers
70 views

Select entities with a specific player as a passenger in a Minecraft command (1.15.1)

I need to use an entity selector in an /execute command to select all boats who have at least one player on board who is holding a specific item. However, because the id tag does not exist for players,...
0
votes
1answer
36 views

How do I set a custom head for a mob?

I am in the process of trying to replace a mob's head armor slot with a custom head. The /replaceitem command doesn't seem to be working. /replaceitem entity @e[name=Zombie] armor.head minecraft:...
-1
votes
1answer
27 views

How do I use commands to fill my floor for a parkour map?

I have tried many things as well as looking things up, including some suggestions from this site. I need to know how to use the command fill for Minecraft Education Edition 1.12.5.
0
votes
0answers
43 views

How to kill all Items except for ones that players drop [duplicate]

So to give you some background on what I'm trying to do, I've set up a safe-zone around world spawn where command blocks are used to kill entities that come within range. However, this generates a lot ...
0
votes
1answer
38 views

How can I remove items with custom tags from a players inventory in 1.14?

I have no problem giving a player an item with a custom tag, and I have no problem detecting that item with the specific tag, my issue is running the clear command for that specific item AFTER ...
0
votes
0answers
23 views

Using /clear to clear an item with a custom name [duplicate]

I am using Windows 10, version 1.14.1 to make an adventure map. I am trying to clear an item with a custom name from the inventory of a player when they push a button. I can clear generic items ...
0
votes
0answers
36 views

How can I shorten the time until a TNT explosion? [duplicate]

Can I actually shorten the time of the explosion? When a creeper comes close to the player, the creeper needs time to charge and then explode, the same goes with TNT - it needs time to charge and then ...
1
vote
1answer
54 views

Is there any way to make fireworks deal no damage in 1.15?

I'm working on a map that launches a specific firework at each checkpoint using commands. I'm aware that there is a way to craft fireworks so that they deal no damage. However, is there a tag for this ...
0
votes
0answers
23 views

Want to have text appear each time a player joins on my server [duplicate]

So first off, my goal is to have [Server] say something whenever a person joins my server. I was going to do this using the .mcfunction command, where you type /function .... in game, and it saves as ...
3
votes
1answer
48 views

How do I summon a mob with an item with custom durability?

I have tried and failed to summon a mob with a fixed durability item. Every time the entity is killed, it drops the item with a randomized durability, because such is the way. But is there a way to ...
-1
votes
1answer
43 views

How to bold, color, and remove italics on an item at the same time?

I just wanted to know whether there was a way to remove italics, color, and bold an item in Minecraft at the same time. I know how to do them individually, I'm just unsure how to put them together ...
0
votes
1answer
38 views

How to make custom advancements the only advancements in Minecraft?

I've recently added custom advancements to my Minecraft world, but I want to remove the original advancements from the world. How do I make my custom advancements the only visible ones?
1
vote
1answer
32 views

How do i detect when a player is in the nether or any other dimension to run a command?

Im new in making datapacks but, All im trying to do is make it detect when im in the minecraft:nether_1. So if im in the nether it will run the command "execute as @a at @s in minecraft:nether_2 run ...
0
votes
1answer
37 views

Is there any way to use /enchant on a book in Minecraft

I've been trying to /enchant a book, but it's not working. Is there any way to do this in v1.14 +? My command is /enchant @p mending and it is hooked up to a comparator to tell me when it works. ...
-1
votes
1answer
47 views

How can I teleport multiple players from one world/dimension to another but with same coordinates? [duplicate]

So basically, Im making a datapack and I want to send 2+ players from a certain place in a world but when i do a certain command it will tp them to a another world but same coordinates. Also when ...
0
votes
2answers
46 views

How can I determine that I am looking at the block I need?

I want to execute a command if I am looking at a specific block. A command should only be executed if it is targeted.
-1
votes
1answer
25 views

Get if player is at certain location, then set scoreboard (1.15)

I'm attempting to make a parkour map with checkpoints that set depending on stage number. In theory, this command in a repeating command block; execute as @a at @s if entity @s positioned as @s[x=-17,...
2
votes
1answer
39 views

How to `eval` a command instantly?

I'm looking for a way to have eval-like functionality, that is, dynamically run a command that is stored as a string somewhere. I have a working solution, however it cannot run synchronously within a ...
0
votes
1answer
44 views

How to make it dark inside water?

I am creating a map that simulates subnautica in minecraft, and i´m having problems because no matter how deep i build the water is not dark at night time, i tried using the blindness effect but it ...
2
votes
1answer
29 views

How to execute a command at a player head

I am using a repeat command to simulate water breathing with particles, but the particles don't look realistic when the player is swimming with crtl activated, when the player is in walk position it ...
0
votes
1answer
48 views

Print XYZ of nearest Villager (or other entity)

NOTE: Java edition 1.15.1 As an example, my villagers keep running off somewhere / getting stuck on the side of mountains - and it's not always easy to track them down by their sound. Rather than ...
0
votes
0answers
17 views

Divide scoreboard value by 20 - Minecraft [duplicate]

My friends and I are doing a maze minigame in which there are perks, so we made a cooldown, but how can we show the cooldown? The value is in ticks, so we wanted to divide the cooldown scoreboard ...
-1
votes
1answer
38 views

How to see the hearts in minecraft realms?

I would to know how to configure the minecraft realms to see the live about all members in game, because when i use tab i only see the status connection, like this...
0
votes
1answer
27 views

How to make a player look at the other player [duplicate]

I and my friends are doing a maze minigame and there's a killer, when the killer is 1 block of distance from the other player (a survivor) the survivor is going to look at the killer, but the only ...
0
votes
1answer
23 views

Change Block State using Command Blocks and Carrot on Stick

In creative, the debug stick can change the state of a fence block so that north, south, east, and west values are all set to false. This will prevent the fence block from connecting to adjacent ...
0
votes
0answers
27 views

How do I add a CanDestroy tag into an iron pickaxe that I'm placing on a dispenser? [duplicate]

So basically, I'm trying to make a puzzle map with custom recipes, and I'm trying to make it so when you place a stone pickaxe in the middle of a dispenser, and 3 iron ingots on top of it, it gives ...
-2
votes
1answer
27 views

How do I /give a NAMED Item that also can only be Placed on a Specific Block? [duplicate]

I know how to /give a Named Item & How to Only have it Placed on a Specific Block. but how/is there a way to Merge these 2 Commands? {display:{Name:"[\"ITEMNAME\"]"}} & {CanPlaceOn:["...
1
vote
1answer
57 views

How do you make a command block so that when you die it activates a title

I'm making a space map and I've made a fake entrance for intruders. I was wondering how to: create a title on a command block how to create it so that when you die, it is activated
0
votes
0answers
17 views

Data merge question [duplicate]

I'm trying to make an armorstand have the same rotation as the player. I've done this with storing the data Rotation[0], but you should be able to do it with data merge right? I tried /data modify ...
0
votes
0answers
38 views

Minecraft mana bar linked to scoreboard?

I created a mana bar as a bossbar on my screen. I linked this bossbar via command block to a scoreboard dummy also called mana I tried: /execute if score @p mana matches 0 run say hi as a test, but ...
0
votes
1answer
43 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.
1
vote
0answers
13 views

How to gave Count into some number or More for @a[nbt={SelectedItem:{id:“things id”,Count:Count}}] in java minecraft 1.14 [duplicate]

I was doing shop into java minecraft 1.14, but scoreboard didn't work on me. I get an idea to write command: /give @p[nbt={SelectedItem:{id:"minecraft:gold_ingot",Count:20b}}] diamond_pickaxe{...
-1
votes
1answer
202 views

Minecraft 1.15.1 scoreboard

Is there a way to track how many times a player breaks a block in a scoreboard. I know you can add every block individually but that would take a while and I thought you could track how many times a ...
2
votes
2answers
42 views

How can I track the coordinates of an ender pearl?

I am creating an ender pearl cannon and I'm trying to get the precise timings down. Only I can't really see where the ender pearl goes after it launches because I propel it with a lot of TNT and ...
0
votes
0answers
20 views

Is there anyway to use the setblock command to when I hold an item in my hand (torch) it places a torch on the ground (bedrock edition) [duplicate]

Trying to create a dynamic lighting command that when you hold a torch in your hand a torch is placed at the charcters feet and when the torch is not in hand then the torch is no longer at the players ...
1
vote
1answer
54 views

Mob mainhand and offhand item detection

Summoning a husk with an nbt of HandItems:[{id:"minecraft:stick"},{}] spawns a husk holding a stick in its mainhand but using it on an execute command to check the entity also works on a husk holding ...
0
votes
0answers
31 views

Is there any way to run the /execute as run command in Minecraft with a non built-in command?

I would like to run an mv tp command to the closest player using the command block, however multiverse doesn’t recognise @p or @a. I would like to find a way to use it from a command block on the ...
0
votes
2answers
52 views

How do I make permanent floating items?

I am making a (bad) adventure map, and I do want to display items like this. I need them to be floating and to not despawn or be able to be picked up. Edit: I forgot to mention, i'm playing version 1....
0
votes
1answer
255 views

How can I generate an entire world where every block is a lucky block in Minecraft?

Does anyone know how to generate a world like this one: Every single block is a lucky block.
-1
votes
1answer
36 views

Why won't this fill command work?

So I am trying to use the fill command to save time on a city build but it won't work... The command looks like this: /fill 45 3 -43 -45 3 -47 and of course the block. The block is black concrete and ...
-4
votes
2answers
30 views

This is what is written in the datapack function:

execute if entity @a[scores={InShopMenu=1,PlayerSlot=0}] run tp @a ~ ~ ~ -125 2.5 execute if entity @a[scores={InShopMenu=1,PlayerSlot=1}] run tp @a ~ ~ ~ -112 3 execute if entity @a[scores={...
1
vote
1answer
59 views

How to use commands to check for potions in 1.13+

For I minecraft map I'm making I want to test whether or not a player has a specific potion in their inventory. How would one do this in 1.13+?
-3
votes
1answer
23 views

Minecraft: question about loot tables

I want to make datapack that changes amount of items dropped from mined blocks and killed mobs by player, in range from 1 to 1024 for example, how can it be done? I know how to change dropped items to ...
1
vote
1answer
40 views

How to detect a player holding a certain block in Minecraft Bedrock

I'm making a "Spectator Machine" and I need help with detecting if a player is holding a redstone block to return back to their original spot, Im in Minecraft Bedrock and I still don't know if I ...
-2
votes
2answers
145 views

How can you make explosives snowballs in 1.15.1 java edition?

For a map my friend was making, I was trying to make grenades but they failed. I need a data tag that can make it so that as soon as it touches the ground it explodes.
1
vote
1answer
33 views

How to summon a mob with an item in headslot that has custom model data? [duplicate]

So I know how to summon a mob with an item in a slot: /summon minecraft:zombie ~ ~1 ~ { ArmorItems:[ {},{},{},{ id:"minecraft:carrot_on_a_stick", Count:1 }]...
2
votes
1answer
49 views

How to use an index with /execute with Vanilla Minecraft Commands

I am trying to create a way for players on my vanilla server to teleport to each other without giving them op. My current idea is to have a list of clickable player names that appear in the chat with ...

1 2 3 4 5 67