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
21 views

How do I write a command block to detect if no online player has a specific score and execute a command?

execute unless score @p playerid = step10 time run say no players As the @p finds the nearest person, it doesn't check all players at once and therefore fails to not run when someone online has the ...
0
votes
1answer
1k views

Minecraft: Command block team selector

I'm trying to make a command for a hide and seek map but I'm having this problem. The following is the command I use: /effect @a[team=S] minecraft:slowness 20 10 The selector @a[team=S] doesn't work. ...
2
votes
1answer
470 views

Why won't “falling_block” work in minecraft bedrock?

summon falling_block ~ ~1 ~ {Block:stone,Time:1,Passengers... is a part of a command but this part won't work and I can't figure out why.
2
votes
1answer
22 views

Is there a way to detect if a cat is sleeping? 1.16

I've searched for cat nbt data and also checked in-game but no dice. It doesn't seem to have a "Sleeping" tag like that of a fox.
3
votes
1answer
143 views

How to detect when a player looks at a pig with name “173”

I tried this: /execute if entity @e[type=minecraft:player] facing entity @e[type=minecraft:pig,tag=173] feet run say hello But it didn't work.
0
votes
0answers
13 views

Trigger Pre-1.9 Dragon perch with commands

Is there any way to use commands in Minecraft 1.7.2 to trigger a charge from the Ender Dragon? (The dragon before 1.9 charges at you, rather than perching)
3
votes
1answer
757 views

Minecraft Windows 10 edition testfor command [duplicate]

In the Windows 10 edition, I'm trying to create a capture the flag (banner) map which detects if the flag has been dropped and replaces it back at that team's base but I can't manage to set up the ...
2
votes
2answers
33 views

Command to get items back

I fell into the void and I lost all of my netherite. Is there any possible solution to this. I have looked up different commands to use and none of them work. A lot of them say to load your backup ...
0
votes
1answer
18 views

Using custom enchanted books in an anvil (Minecraft)

I recently started building some things with command blocks for a Minecraft server a friend is hosting. Is it possible through commands or some other way to combine a tool with an enchanted book that ...
0
votes
0answers
16 views

Minecraft give effect when stand on a certain block in a 10 by 10 range

I'm trying to make a base that that when someone enters it they get glowing so that I can see them. I don't want the effect to be permanent and the effect should be given only when being on that block....
0
votes
0answers
37 views

Command Block working after breaking it

Recently I made a command block teleporting player to specific cords but i accidentaly turned it ON and I was stuck in a loop. I destroyed the command block with setblock but it still executed ...
4
votes
1answer
61 views

How do I use quotes in an extremely nested command?

Basically, I'm trying to make a "One command creation", which is, if you don't know, when you have an entire creation/project in one long command. My creation makes a box, and then puts ...
-2
votes
1answer
53 views

Why is this command to give with enchantments not working?

I'm trying to give myself a dead bush with OP enchants in 1.16.5, but it's not working. give @a minecraft:dead_bush{Enchantements:[{id:sharpness,lvl:3000},{id:knockback,lvl:3000},{id:sweeping_edge,lvl:...
1
vote
2answers
98 views

Get all players that aren't on two teams?

Right now, I'm trying @a[team=!admin,team=!checkpoint] but it doesn't seem to be working... Any suggestions? To clarify, I want all players that are not on the team 'admin' nor 'checkpoint'. I'm ...
2
votes
2answers
2k views

How do I execute multiple function within another function?

In Minecraft 1.13.2 Java Previous title of this question was : What is console command to fly in creative mode? supposing an issue with 'flying'. I want to execute multiple functions (from function ...
0
votes
0answers
20 views

Minecraft black screen shader when not on menu

I have already used minecraft shaders, the thing is that the shaders works only on menu when i press esc, but when I want to go back, normally, it turns black, anyone knows what might be the problem? ...
-3
votes
2answers
286 views

How can you make a infinity damage sword?

I found this command : /give @p netherite_sword{Unbreakable:1b,AttributeModifiers:[{AttributeName:"generic.attack_damage",Name:"generic.attack_damage",Amount:2147483647,Operation:0,...
0
votes
1answer
20 views

Data Modify Entity Problem 1.16.5

Im trying to clone the inventory of one named storage to another. I first tried finding a way to clone the inventory of a chest. e.g: execute as @e run data modify block[type=chest,name=input]... But ...
3
votes
3answers
79 views

How do I kill all mobs in a world without being in it?

I used a command block that was set to repeat with the command /summon slime and accidentally turned on a lever next to it. Now my screen is full of slimes, the world is lagging, and I can't turn off ...
0
votes
1answer
374 views

Area Effect Clouds: RadiusOnUse/DurationOnUse

In my testing the radius and duration of Area Effect Clouds can be altered when entities come into contact with them, but only if the Cloud has a potion effect to apply to the entity and the effect is ...
1
vote
1answer
280 views

What would be the easiest way to detect if a player breaks a block in Minecraft 1.16?

I want to add block breaking detection and right click detect to a datapack I’m working on. I want this to be multiplayer friendly and I need to know who broke the block. To add right click detection ...
1
vote
1answer
739 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 ...
2
votes
2answers
120 views

How do I /setblock a hanging soul lantern?

When I do the command: /setblock ~ ~ ~ lantern 1 the block in question is set to a hanging lantern, however, when I try /setblock ~ ~ ~ soul_lantern 1 the block is set to a normal soul lantern ...
0
votes
1answer
33 views

How do you teleport an item using a command block when the item is in a certain spot?

I am making a one block skyblock that is going very well except the items fall off the edge when they shouldn't because a command block should teleport the item to the infinity block, but they aren't. ...
4
votes
2answers
7k views

How can I paste commands on Minecraft Command Blocks?

So I have a mac computer but i plugged in a windows keyboard in my mac. I am still trying to figure out how to paste commands into a command block. So how can I paste a command?
2
votes
2answers
46 views

How do I make arrows despawn faster?

Here is some context: I've made some command block code to make lightning arrows. However, I want the arrows to instantaneously despawn after an arrow is shot. How do I do this? Here is the command ...
-4
votes
0answers
38 views

Why doesnt this work? [closed]

Im trying to make this command block contraption and it doesnt work? It has /enchant @p sharpness 1 and execute @p ^ ^ ^ particle minecraft:endrod ^ ^1.6 ^3, why wont it work?
2
votes
1answer
44 views

How do I make a tellraw command say someone's name?

I need help here, I am making a map called "The Firing". I want it to say: Welcome to The Firing, [USERNAME] What I had was /tellraw @a {"rawtext":[{"text":"Welcome ...
3
votes
1answer
15 views

Give a custom item_frame item a special ID I can later use to target with /data

G'Afternoon, So I'm trying to /minecraft:give myself an item_frame item that has some sort of special id/name that I can later use /data (or /execute then data) on in order to switch specifically ...
7
votes
1answer
8k views

How do I allow other players on my server to use commands like teleport, but not spawn in items?

I play on the DivineJourney modpack with a friend, but he wants to constantly spawn things in. Is there any way to allow him to be able to use the teleport command, but not be able to spawn in items? ...
0
votes
1answer
47 views
2
votes
2answers
36 views

Minecraft bedrock items quantity selector

I have an automatic dropper in Minecraft that drops diamond ores. These diamond ores will be teleported to a specific position when a player mines a diamond there. I made some experiments on it. I ...
2
votes
1answer
422 views

How do I make an item where when a player holds it, it runs a slash command or function in a Minecraft bedrock addon?

I am trying to make a paintbrush to assist me and my friends build a city. My idea for the paintbrush is when held, it uses raycasting to place blocks where the entity is looking. I can't use ...
0
votes
1answer
89 views

Execute summon item command issues

I need some help with the execute summon item command and here is a example I made from the same type I am using for my server but cannot seem to get it to work.. any chance anyone knows what I did ...
0
votes
1answer
203 views

Lobby Selector/Inventory Selector no longer works

I run Minecraft on a Macintosh using Yosemite (10.10.1). My friend told me to press F3 to display coordinates to find him. After doing what my friend said, I can no longer use Lobby Select or access ...
1
vote
1answer
46 views

How to make mobs not attack each other?

I'm making a custom boss battle where it spawns mobs to fight for it, but the skeletons attack each other. How can I prevent this from happening in Minecraft 1.16.5?
2
votes
2answers
65 views

How can I give points when someone is standing near an item using Minecraft commands?

I'm making a kit pvp and am using scoreboard as my points. How do I make it so when a player is standing near an item, it gives them 1 point then the item disappears?
0
votes
1answer
59 views

How would I have more than one enchantment at level 1000 in Minecraft

So I have the command for one enchantment right here: /give @p diamond_axe{Enchantments:[{id:unbreaking,lvl:32767}]} 1 But, does anyone know how to do more than one?
0
votes
2answers
836 views

Minecraft spawning items with inventories in them

I was wondering, is there a way to spawn a dispenser that is filled with snowballs using a command? Like, i want to be able to /fill over a row of dispensers with full dispensers... so how would I ...
0
votes
0answers
11 views

In Minecraft 1.16 I can’t figure out how to check if an entity isn’t in the air

This is the command I used which isn’t working: execute as @e[type=husk,tag=remake] run execute at @s unless block ~ ~-1 ~ air run tag @s add looted This command is adding a tag called looted to the ...
1
vote
1answer
75 views

Minecraft 1.16.5 - Teleport a player to a given location if on given coordinates

I already tried this link and many other, but it doesn't work. I think it's because I use a newer version and the commands are not the same. I want to teleport every player to 83 15 -177 if he is on ...
0
votes
1answer
73 views

How to make a sword that shoots particles that do damage?

I want to make this sword that, when you right/left click it, it summons particles that go in a straight line and deal damage to anything they touch. I have only basic knowledge on stuff like this, ...
0
votes
0answers
19 views

Minecraft villagers custom trades and custom items (1.16.5)

i am making rpg map and i have one big issue, i need custom villager trades with my custom items here (using just command blocks) and if i created custom trade with this command : /summon villager 73 ...
1
vote
0answers
22 views

Reduce scoreboard value instantly by the value of another score

So I have a scoreboard objective of damage resisted, and it instantly increases based on damage i take with the resistance eff active. In short, I need to reduce the value of the player's "h"...
0
votes
1answer
63 views

How can I summon a minecart and have the player automatically enter it when spawned in Minecraft Bedrock Edition?

I am making a rollercoaster and attempting to add a button that makes a command block summon the Minecart onto the tracks and has the player automatically enter it. I am using Minecraft Bedrock (...
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 ...
0
votes
2answers
1k views

Problems With /replaceitem Command

I'm working on the KitPVP part of my server again. I'm trashing the part about buying the kits. All of them will be free. I'm trying to use /replaceitem to get the players their kits, but I have a few ...
1
vote
1answer
38 views

Execute condition positioned doesnt work

I'm trying to test if an entity is positionned at a very specific coordinate to then and only then tag itself and others. Here's the command: execute as @e[type=minecraft:armor_stand,tag=pillar_first,...
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
2 3 4 5
87