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

Run a command block once every day [duplicate]

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
vote
1answer
346 views

I can't type § in minecraft for some reason [duplicate]

So I try typing Alt+Numpad1Numpad2 (that's §) and nothing happens and it wont copy and paste it ether I'm trying to name a shulker box §2FOOD so it says FOOD in dark green, it already says 'Shulker ...
2
votes
2answers
42 views

Can place on /give is not working [duplicate]

I'm playing Minecraft in Windows 10 edition and I type /give @s gold_block 1 0 {CanPlaceOn:["minecraft:planks"]} in-game chat but I keep getting the response, Line 1, Column 2 missing '}' ...
3
votes
1answer
109 views

How can I make a tool unbreakable?

I have looked everywhere for a command that does the same thing as: /give @s netherite_sword{unbreakable:1} 1 but for Bedrock Edition instead of Java Edition. But I just can't seem to find an answer ...
1
vote
1answer
36 views

How to set a command block to set a command block [duplicate]

I want to setblock a command block to setblock a command block with a command inside. For example: /setblock ~ ~ ~ command_block{Command:"say hi"} works, but: /setblock ~ ~ ~ command_block{...
0
votes
1answer
119 views

World edit unable the change biome in a specific world

Im building on a skyblock map and i need to change the biome to different biomes on different islands! I have installed world edit and i tryied to use the //setbiome command and it doesnt work! But ...
1
vote
0answers
16 views

Stuck in a loop [duplicate]

I made a teleportation loop with a command block in my world and the command block is super far away. What do I do? (I'm not great with downloading things and I don't know the cords)
0
votes
1answer
38 views

Is there any way that I can track a villager trade and execute a command when an item is traded

I'm working on a minecraft map and basically what I want is to execute a command when a player trades an item with the villager. (This is a custom villager with custom items not a random villager). I ...
0
votes
1answer
46 views

Is there a way to teleport to a type of specific block in Minecraft in Windows 10 Edition? [duplicate]

I lost my house and buildings, and spawned very far away. Luckily, my house is rather gaudy, with an enchantment table, crying obsidian; the works. Many, many hours into this world and really don't ...
0
votes
0answers
31 views

Attempting too make things like 100 Sharpness swords in minecraft bedrock [duplicate]

So I have tried too make a sword with 100 sharpness using this command /give @s netherite_sword 1 0 {ench:[{id:16,lvl:5}]} I seem to be getting an error that says Line 1, Column 2, Missing '}' or ...
0
votes
2answers
79 views

How to make a command block work every 30 seconds? [duplicate]

So im trying to make a command block which activates every 30 seconds. The command in the command block is /kill @e[type=minecraft:arrow] so it kills all arrows on the ground every 30 seconds. How can ...
2
votes
1answer
32 views

Player Save State for Game Mode

On our server I'd like to switch people to adventure when they enter an area, but when they leave it should set them back to the game mode they were in before entering. So my question is, is it ...
1
vote
0answers
14 views

Minecraft — Advancement criteria that targets specific villager professions

I am trying to create an advancement criteria for 1.16+ where the advancement is granted after a player interacts with a specific villager. So far I have this: "criteria": { "test1&...
0
votes
1answer
65 views

I need to teleport someone with specific death count scoreboard. 1.16

My friends and I are playing a Hardcore style playthrough of Minecraft. We want instead of death being permanent, teleport the player to a challenge area that gets harder the more you die. The ...
0
votes
1answer
32 views

Targeting specific members of a team who have died [duplicate]

I'm trying to set bedwars up on my server using command blocks, which I'm a little new to. I want a command block that is Repeating, Always active to /execute when a member of Red team dies, for ...
1
vote
1answer
44 views

How to /execute from nearest gold block

I want to /execute a command from the nearest gold block to a command block within a certain range. Is this possible and how can I do it?
2
votes
0answers
41 views

Why won't my location predicate run?

I have followed several tutorials to the letter, and got the "player is_sprinting:true" predicate to work. So I know my fresh new datapack is working. There are no examples of location ...
2
votes
1answer
60 views

Spawning mobs on Right Click with commands? [duplicate]

Is it possible to spawn a mob such as a skeleton in front of the player when they right click with an item such as a carrot on a stick?
1
vote
1answer
77 views

Can you subtract time?

After seeing a few redstone tutorials for a time-travelling machine, I thought of trying to reverse the time instead. There's no such thing as a /time subtract or anything similar, and running /time ...
6
votes
1answer
144 views

How to make a glowing effect visible to 1-2 people

I am trying to make SCP-939 from SCP Secret Laboratory. but I searched everywhere, but I cant find a way to make a glowing effect visible to 1-2 people only.How do I do this? NOTE: I am on 1.12.2 and ...
-3
votes
2answers
304 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
67 views

How do you set durability AND add a enchant onto a item? [duplicate]

I wanted to make an overpowered one-time hit sword that deals knockback and blinds the player who was attacked. The command for adding enchants is : /give @p diamond_sword{Enchantments:[{id:"...
2
votes
1answer
88 views

What is the correct way of using /data merge on entity tags such as Passengers and Tags and Team?

I'm on 1.16 Java and I have successfully used /data merge before. This time I'm trying to "spawn" wolves (merge passenger data) onto my villagers so I can set the AngryAt value of the wolves ...
3
votes
1answer
62 views

How do I kill players who don't fly throught hoops using elytra?

I have an elytra parkour, you must fly through hoops. I want to know how do I kill the player if they do not fly through the hoops. Specifically how you can focus that player, because knowing if the ...
1
vote
1answer
23 views

How to get a command block to say the name of a named mob

I'm making a horse racing track and I want the game to say "[name of horse] has finished the race!" when a horse crosses the finish line. I can get it to say the name of every horse in the ...
5
votes
1answer
230 views

Command to say player coords in chat?

Trying to get a command that tells a player's coords in chat. I have a working command: /data get entity @s Pos, but I assume I would need to combine this with /tellraw?
3
votes
0answers
85 views

Why is Player's generic.movementSpeed Attribute listed on Wiki as lower than ALL Mobs, yet you can clearly outrun all of them?

EDIT: Player's generic.movementSpeed SPRINTING Attribute is listed as 0.15, their WALK speed is listed as even slower (0.1) Original Post: A Player's generic.movementSpeed Attribute is listed as 0.15 ...
2
votes
0answers
73 views

Nether Portal Doesn't Work With Small World Border

Context: I'm making one of those maps where you start with a world border of 1 and it expands each time you get an achievement to play with a couple of my friends. I was going to do a nether section ...
1
vote
0answers
22 views

Mob with custom follow range doesn't seem to work

In Minecraft Java Edition, I have made a custom mob (which is ridden by another invisible mob) using this generator: https://www.gamergeeks.nz/apps/minecraft/mob-generator , and in the Attributes tab ...
1
vote
0answers
29 views

World border set commands in datapack not working

In the datapack (in load.mcfunction) my execute at @s run worldborder center ~ ~ command will work but not my execute as @a at @s run worldborder set 1 10 for some reason. It even works when I enter ...
1
vote
1answer
50 views

How to /setblock a powered repeater?

Trying to /setblock a powered repeater, my questions are: How do I setblock a powered repeater? If I setblock a powered repeater, will it take 1 tick to power the block in front of it or will it ...
2
votes
0answers
46 views

Executing 1 million commands

I have 6 million setblock/fill commands in store (mostly for setting command blocks/repeaters) that I would like to execute in my world, so as to cover 36 chunks. Mcfunctions are not very efficient as ...
0
votes
1answer
331 views

/give multiple items command

Is there a way to give a player multiple items at the same time? Or you can only do one at a time and type the same thing but only change the item?
1
vote
1answer
38 views

I want to transfer the data of a scoreboard to an entity

I have a value stored in a scoreboard objective, and I want to make that value the angle of rotation of an armor stand's arm. I used this command to store the value into the scoreboard: /execute as @e[...
2
votes
1answer
42 views

Can you create a tipped arrow that has several potion effects on it using commands?

I want to make a PVP minigame, and I want to be able to have a tipped arrow with both poison and regeneration at the same time so it staggers whoever is shot every second, and is a nuisance rather ...
2
votes
1answer
65 views

How to view the contents of another persons enderchest?

I am using 1.12. /data get entity @p EnderItems doesn't work as it isn't seen as a command.
0
votes
1answer
26 views

How do I detect when an item is on top of a specific block?

I've been all around Google trying to find this out. I am making a data pack with a custom crafter and I have the summon command all ready. I want to be able to throw a diamond block on top of a blast ...
0
votes
1answer
34 views

How do I use CanPlaceOn or other tags to make a block placeable only on 1 block type?

I was using the /give command in Minecraft 1.16.5 and wrote out /give @s minecraft:wither_rose{display:{Name:"{\"text\":\"Custom Name\",\"italic\":\"false\"...
2
votes
2answers
48 views

I'm trying to find a way to log the command block output on a Minecraft Bedrock Realm

I've been messing around with command blocks recently, and I need to be able to 'log' my command block output. I can see the last output it had 'Gave 1 diamond to JackOBoi04' (example) but I am ...
4
votes
0answers
58 views

Is it possible to move a boat with commands with a player in it?

I want to move a boat up/down while a player is in it with commands. I tried to teleport the boat and change the Motion NBT, both worked... while there was no player in it... Somehow, there being a ...
0
votes
1answer
25 views

Minecraft detecting if a player in a certain place has a certain item

I'm building a city themed parkour map and I'm trying to figure out how to detect if a player is in a certain place and has a certain item in his inventory. I've tried using a combination of these two ...
1
vote
0answers
105 views

How do I set custom model/texture data of equipped armor?

I've made an elytra that has custom model data, and the model shows up just fine in the inventory, there is no issue with the new textures as long as you don't equip the armor, but as soon as I equip ...
1
vote
0answers
18 views

Can i give a item with attributemodifiers, without removing the base ones?

I do: give @p diamond_sword{AttributeModifiers:[{Slot:"mainhand", AttributeName:"generic.attack_speed", Name:"generic.attack_speed", Amount:-2.2, Operation:0, UUID:[I;...
1
vote
1answer
34 views

How to remove specific NBT items from player inventory without data packs

I created a level-based minigame, and every level, it checks your inventory, and makes sure you don't have any forbidden items. I make items forbidden my adding a tag to them: discard:1b. Any items ...
0
votes
1answer
60 views

Is it possible to have random numbers in commands?

So we already know I have an anarchy world and I want to "troll" some players with a command block with a simple goal. "One the button is pressed, you will be teleported in a random ...

1
3 4
5
6 7
87