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
0answers
4 views

Java Command Block Entity [ Help ]

In Minecraft java edition @s stands for "current entity" and works only if you type in chat In command block @s doesn't work
-1
votes
0answers
9 views

Custom Villager Minecraft Java Edition 1.17

I want to make a custom villager: if I give him 1 emerald and he gives me 1 block of iron, but I want to be able to place the block of iron only on a block of Netherite. I did the custom villager but ...
0
votes
1answer
16 views

Fill block at Amethyst Bud position

I’m currently trying to make amethyst… infectious. What happens is that a budding block of amethyst grows a crystal, that then is replaced with another block of amethyst, like this: Note: this was ...
0
votes
1answer
14 views

Tnt modifications

I’m making an adventure mode map. I want tnt to be part of it to deal damage to mobs but I don’t want it to destroy terrain. How do I do this?
2
votes
1answer
80 views

How do I make a block able to be broken by fists?

I am trying to create a minecraft map at first I tried using an armor stand but then I learned there wasn't a way to summon a killable armor stand so I tried a block. I am using a cracked stone brick ...
0
votes
0answers
5 views

Is it possible to change a villagers profession using /event?

Im making a world that depends on certain villager professions to make it work best. Can you use the /event command to change a villagers profession?
0
votes
1answer
26 views

Why are my commands applying to everyone instead of just the person with the tag?

The commands are applying to everyone in the server (every entity on the first one) and not just the person with the tag, these are the commands in the tick.mcfunction file: execute as @e at @e if ...
0
votes
0answers
23 views

How do I make an item rare?

I need help, I am so excited that this map is getting good, I have been asking a whole lot of questions with command blocks, but this time I need a script. What do I need to change here to make an ...
-2
votes
0answers
19 views

Minecraft, How do I edit a villager butcher using /data without using /summon. PLEASE HELP [closed]

I said it in the title HELP PLEASE. asfjapodsf lasjdfho asdfjoasdjf asjf aojdsfasdlfj hasdojfhasdf jhasdlfjha hfhfhdj jdhfjsdks hdfjdfjsdkjdh.
0
votes
1answer
31 views

How do I ensure that a /give command gives to the player who activated it, who may not be the nearest player?

I'm almost done my map, but I'm having a problem with my /give commands. When you use @p to select the nearest player to give items to, it selects the nearest player to the command block. The problem ...
1
vote
1answer
50 views

How to make an if not statement?

I’m making a shop where you can buy something with emeralds. If you can afford it, it plays the mob.villager.yes sound. But if you can’t afford it, it plays the mob.villager.no sound. How do I script ...
0
votes
1answer
32 views

Minecraft Five Nights at Freddy's door/jumpscare system

I got a tip to break up my questions into parts so here it goes. Background Information I have created a "door" that is concrete powder and is pushed up and down by redstone, pistons, and a ...
0
votes
0answers
30 views

How to give myself a custom item in Minecraft Education Edition? [duplicate]

/give @p carrot_on_a_stick{display:{Name:'{"text":"Rod of Teleportation"}'},Unbreakable:0b,CustomModelData:123456,Rod of Teleportation:1b} 1 I know the syntax error is between ...
0
votes
0answers
9 views

How do I make kits in Minecraft for my minigame using command blocks? [closed]

I am trying to make a Plants vs. Zombies minigame and I'm having trouble making command block chains. I am just having a frustrating time because no Youtube video really goes over it that I have ...
0
votes
0answers
34 views

Five Nights a Freddy's in Minecraft. How to make a jumpscare, make a power system, and how to know if a door is closed [closed]

I am making a Five Nights at Freddy's minigame in Minecraft education edition, and I am stuck on three things. How to test if the door is closed if the door is closed nothing happens, but if it is ...
0
votes
1answer
53 views

How do I detect when a player triggers a raid?

I can't seem to figure out how to test if the player has started a raid with commands. I'm trying to make it so the bad omen status effect is not removed by milk as any other potion effect would be. ...
0
votes
2answers
52 views

I need help with a command block /execute command [duplicate]

I need help figuring out what this command is supposed to be written with the new execute command syntax in Minecraft 1.17.1. I presume the code is supposed to set a player's spawnpoint randomly to ...
0
votes
1answer
47 views

How to create a random spawnpoint off entities in Minecrat 1.17.1?

I have been trying to create random spawn points on my Minecraft server, for instance, if a player die, the player would respawn at designated spots on the server, where I have dropped some tagged ...
-2
votes
1answer
24 views

How to spawn mobs randomly using Minecraft commands?

I've downloaded a mod that lets me add the allay, copper golem and glare to Minecraft. They can be spawned using spawn eggs and commands. But they cannot spawn randomly naturally. I want these mobs to ...
0
votes
0answers
47 views

How to become a minecraft developer [closed]

I wanted to ask that how to be a minecraft developer and can we do that at the age of 10-12 years.
0
votes
0answers
39 views

How do I bind a command to an item?

I am trying to create a few modified weapons/items in Minecraft, so that when you hit something (left click) with the specific item, it executes a command. I have already found a few answers that make ...
1
vote
1answer
39 views

How to make blocks appear under your feet when you walk/jump?

Is there anyway to make blocks appear under your feet wherever you walk or jump? I there a way to make them disappear after like 20 seconds?
0
votes
1answer
24 views

How to make the saturation longer?

I am making a map and I wanted to make the saturation slower because we all know that Minecraft Bedrock Edition's saturation is rigged and depletes so quickly. So, any ideas to make it slower? Command ...
0
votes
1answer
31 views

How do I delete exiting structures on a structure block?

I am a map creator, and it's kinda hard to find structures when you have a lot saved on your laptop. So, I have a question and might need your help: How do I remove structures on a structure block? ...
0
votes
1answer
30 views

(java minecraft 1.17) tag snowball based on owner

I want to make a projectile "belong" to a team by adding a tag to it. the players throw snowballs that are supposed to only hurt the enemies. Is there anyway I can use the owner nbt data to ...
-1
votes
0answers
18 views

Minecraft 1.12.2 /entitydata help

I’m trying to make an entity that’s already spawned in invulnerable using this command /entitydata @e[distance=10] {Invulnerable:1b} But I keep getting an error that says something like “parsing ...
-1
votes
0answers
36 views

How to make a key-locked wall?

I am making an adventure game in Minecraft and I am currently making an ocean monument level. I want to make it so that when you go and get a key and click a block, a few holes open in a 3x3 wall, but ...
1
vote
2answers
47 views

How to apply potion effects only in a certain radius, without applying it to yourself?

I'm trying to apply potion effects to mobs in a certain radius of me without applying it to myself as well, is this possible to do with the current state of commands in Minecraft 1.17?
0
votes
1answer
41 views

How to make all dogs stand up in Minecraft? [duplicate]

I know that the command /execute as @e[type=wolf] run data merge entity @s {Sitting:1b} will make all dogs loaded in sit down, but is there a command to make them all stand up at once?
0
votes
1answer
55 views

Is there a way to send a message to someone/everyone in the server from the console?

In version 1.17, is there a way to send a message to someone/everyone in the server from the console?
0
votes
1answer
18 views

How do you scan an area for a certain block? (JAVA 1.17.1)

So I'm currently working on a Minecraft minigame where the goal is for Team A to collect all the torches and Team B's goal is to kill Team A (basically Pac-Man(or dark deception)) and I'm asking: How ...
-1
votes
0answers
22 views

How do I make one of those start buttons that all minigames have? (MINECRAFT JAVA 1.17.1)

So I'm currently making a minigame myself and so far I haven't found anyone asking the same question I am right now: How do you make a start button that counts down and you can cancel the start ...
1
vote
2answers
27 views

Is it possible to recharge a respawn anchor automatically?

I am trying to make a time bomb for a mini game map, involving a pillar of quartz, and a respawn anchor on the top. Gradually, the respawn anchor recharges, and once it has been fully charged (because ...
1
vote
0answers
18 views

Detecting who activated a command block and adding a tag to a player? (Bedrock) [closed]

I am making a Bedrock Edition Cops and Robbers map, and I was wondering if there was a way to add a role/tag to a player. For example, if one player presses a button to be a prisoner, they get a ...
0
votes
0answers
9 views

How do you detect a certain block placed in area and the placing player

I want to be able to detect if someone placed a certain block near my servers spawn point and remove the block while warning them to not do it again.
0
votes
1answer
45 views

How do I teleport someone who enters a specific tunnel on Minecraft 1.17.1?

I am making a map on Minecraft 1.17.1 and I'm tying to make a challenge where you need to go through the correct tunnel, if you go through the wrong one you'll get teleported to the start. I don't ...
2
votes
0answers
31 views

How do I make a "PocketPal" in Minecraft as a pet?

it's StickyChannel92 for another question. How can I make a custom pet in a custom shape that follows me around? I want to be creative with not only with armor stands, but programming them to do ...
0
votes
2answers
47 views

How do I detect a certain mob?

I am creating a map and I want to make it so that when to defeat a zombie boss, a lever appears that sends you to the next level. Right now, I am trying: /execute unless entity @e[type=zombie,distance=...
0
votes
1answer
34 views

How to tp the players to a defined place?

I'm trying to make a Skywars minigame, and I need to teleport the players to an island. I don't know what to do, I really want to make this minigame, I'm in 1.16.5 Minecraft Java Edition. I've tried: ...
0
votes
0answers
35 views

How to save teleport location

I want to be able to teleport a player to a set location, and then back to the spot they were at, sort of like a /back command? I want to teleport everyone to an event area in the Nether, and then ...
4
votes
0answers
184 views

How to change a shulker boxes texture based on its name

So, I have been trying for a bit to find a way to change a brown shulker boxes texture when its name is "Emergency Cookie Rations", sounds silly I know, but every technique I have tried has ...
0
votes
1answer
25 views

How do I keep an item upon death?

I'm trying to give myself an item that will keep in my inventory when I die. This is my current command that I got from a YouTube video: give InstantNuggets compass 1 0 {"keep_on_death"{}} ...
0
votes
0answers
21 views

How to make a repeating command that will give a player an enchantment when holding a specific item?

I know next to nothing about command blocks, but I've managed to make a command block give a player an effect when an item is held. The issue is I can't get it to work with my test item. I used this ...
0
votes
0answers
32 views

How to summon Fireballs in random places with commands?

I need to summon Fireballs in random places, but I can't figure out how. Any help?
-1
votes
1answer
27 views

How to /tell a Player an NBT property of a item on 1.12.2?

I'm trying to create a small basketball game on my server (from scratch to learn command blocks). To test that it's working, I'm trying to have the Basketball item tell me who threw it. However, ...
1
vote
1answer
26 views

Command Block Effectiveness Range

Can you be too far away for a command block to work? (ie. command does not execute) I am curious because I was making a super-flat world a void one by filling a 7x7x4 zone around the player with air ...
0
votes
0answers
20 views

How do I do the equivalent of /testfor in Minecraft Java Edition 1.17.1? [duplicate]

I can't put /testfor because I'm in 1.17.1, and I try my best to use /execute. execute if entity @p in minecraft:overworld positioned ~ ~2 ~ run title @p title "Welcome to the Lab!" When I ...
0
votes
1answer
25 views

Function command doesn't work

I'm trying to make a datapack and a I have a function and when I call it normally within code or Minecraft it works fine and if I run the command execute as @e[tag=robot] if block ~ ~-1 ~ air run ...
0
votes
1answer
24 views

im trying to use a command where a repeating command block teleports someone to a spot but my command doesnt work

I was looking for a command and I found this: /execute @a[x=a,y=b,z=c,r=d] ~ ~ ~ tp @p e f g Where: a, b, and c are the XYZ coordinates that you want to teleport players from. d is the radius in ...
1
vote
0answers
20 views

How To set up a Tag game in Minecraft Bedrock

new poster here,sorry if this is a bad question. I want to set up a Tag game in Minecraft BEDROCK, but I've run into some walls. Assume the tag game is played like this: someone has a nametag named ...

1
2 3 4 5
91