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
1
vote
1answer
62 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
114 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
93 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,...
-1
votes
0answers
23 views

How do i make an armor stand invisible and have arms

I need to make an invisible armour stand with arms so that I can put on a sword and shield aswell.
0
votes
1answer
56 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
0answers
47 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 ...
2
votes
1answer
53 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 ...
0
votes
0answers
14 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
209 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?
2
votes
0answers
42 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 ...
1
vote
0answers
37 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 ...
0
votes
0answers
17 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 ...
0
votes
0answers
17 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
34 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 ...
1
vote
0answers
39 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
52 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
30 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
36 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 ...
1
vote
1answer
38 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
21 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
26 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\"...
1
vote
2answers
36 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 ...
2
votes
0answers
30 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
20 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 ...
0
votes
0answers
34 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
16 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
25 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
56 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 ...
0
votes
1answer
30 views

How fast are command block chains?

I’m told a command block chain runs a command every tick meaning twenty commands per second, but I made a chain of 145 command blocks and it ran in under two seconds. Did I make an error? If not, how ...
0
votes
1answer
44 views

My command blocks are forgetting coordinates!

I built a set of command blocks on a single-player creative world to work out the kinks, and it worked correctly. It first uses /execute to find an instance of an item with a specific name and ...
-1
votes
0answers
15 views

Minecraft Skins

I bought java minecraft, and I downloaded a skin but It only shows up on multiplayer servers. The minecraft steve only shows up with singular player
-1
votes
0answers
41 views

Executing a single command out of 1000 every tick

I have over 1000 commands I would like to activate in a sequence with a delay of 1 tick between every command. People here say I can create delays using repeating command blocks linked to chains and ...
0
votes
0answers
27 views

How to use the /testfor command to Locate dyes in Inventory?

How to use the /testfor command to Locate dye in Inventory? I am in Minecraft Java 1.12.2. Using The scoreboard tags. I think this works but not sure. /testfor @a {Inventory:[{id:"minecraft:dye&...
-3
votes
1answer
45 views

MC Java Villager commands [duplicate]

I need help. Any Minecraft coders out here? Can you code a command for something like this? it is for, Minecraft Java 1.16.5 on Apex Hosting servers. Request: Code a summon command for a villager with ...
1
vote
1answer
60 views

Can I make custom recipes without an addon?

Related to How to make a crafting recipe for a custom spawn egg in minecraft bedrock edition. So I have heard about knowledge books in Minecraft and it can be used to make custom crafting recipes, ...
-3
votes
1answer
33 views

Why can't I see autofill commands?

When I type in something like /locatebiome desert, nothing comes up. I can see everything else but the autofill commands for some reason. How can I fix this?
0
votes
1answer
31 views

How to detect an item on ground?

I searched on internet including this site, people said that it worked for them. I wanna detect a paper laying on the ground and if there is a paper on the ground it runs an command. I tried this ...
0
votes
1answer
36 views

Summoning projectile with motion

I have been trying this for two days and cant get anything. I just want a trident to move. I used motion tags, direction tags, power tags, and it just spawns and falls down, this is what I have so far ...
1
vote
1answer
54 views

How to summon a mob with armor in Bedrock?

If we can summon mobs with armor via commands in Java, can we do the same thing in Bedrock Edition?
1
vote
1answer
200 views

Sound id for lightning bolt

I am trying to play the sound of a lightning bolt, but nobody seems to have asked this question before. if the version changes anything, the version im in is 1.12.2
4
votes
1answer
70 views

Prevent Villager from restocking in Vanilla game?

Is it possible to (and, if so, how do you) spawn in a villager which is incapable of restocking? I'm going to make a guided Skyblock-like map, with the villager's trades representing different ...
0
votes
1answer
37 views

How do I swap a crafted Item for another one (in bedrock edition)?

I am making an adventure map and am making it so that you craft a piece of tnt that should be placed on an observer. Though, when it is crafted it can't be placed on anything. I have tried several ...
1
vote
2answers
36 views

I want to summon a mob that has an item as passenger

I've seen the same question, with an example that said /summon zombie ~ ~1 ~ {Passengers:[{id:"Item",Item:{id:"minecraft:stone",Count:1b}}]}. But this doesn't work. Probably ...
-1
votes
0answers
32 views

How can I locate a hopper with a custom name with commands?

How can I use commands to locate a hopper with a specific name? I think the /testforblock command would help me do this but I’m not sure I’m in 1.12.2.
0
votes
1answer
37 views

How do I get some other entity to rotate as me?

execute at @p run tp @e[tag=entity] ~ ~ ~ ~ 0 rotates an entity but it teleports it to me. Is there any way to just rotate an entity to look in the same direction without teleporting them?
0
votes
1answer
34 views

Can I move armor stand legs up?

I'm trying to make an armor stand look like its flying with elytra, and I can't seem to get it right. The command I'm using is: /summon armor_stand ~ ~ ~ {NoBasePlate:1b,ShowArms:1b,Rotation:[53f],...
0
votes
0answers
23 views

How would I setblock multiple command blocks in a row that have commands in them? [duplicate]

I want to have a command block that uses the setblock command (or any command that will work, but I'm new to command blocks and setblock is what I know) to place another command block that will also ...
1
vote
1answer
46 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&...
0
votes
1answer
34 views

Can I add an enchanted apple cooldown?

Is there a way to add a cooldown for eating enchanted apples? I don't want the player to be able to eat a lot at once in my PVP game.
2
votes
1answer
45 views

How to make hostile mobs hostile to other mobs? [duplicate]

On our minecraft realm I am a necromancer. Using the /team command I control hostile mobs to attack other players. I was hoping to make a way to make my wither skeletons and vex attack other mobs. If ...

1
2
3 4 5
84