Questions tagged [minecraft-commands]

Anything related to the usage of commands or command blocks in the game Minecraft. If you're building a redstone device without commands, use the minecraft-redstone tag instead.

363 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8
votes
1answer
419 views

Minecraft running test

I am wondering if there is a better way to track, or test, how fast a player is going, then activate command off that. So far I have: /scoreboard objective add Sprint stat.WalkOneCm Then, every tick I ...
6
votes
0answers
236 views

minecraft command block problem “snowball”

I'm trying to execute this code: execute @a[score_HoldSnowball_min=1] ~ ~ ~ scoreboard players set @e[type=Snowball,rm=3,r=4] Snowball 1 but it doesn't execute the code and instead says: [13:59:43]...
5
votes
1answer
444 views

Summoning enderpearls on arrows with custom name shot by a player

I want to shoot an arrow named "GreenArrow" that constantly summons enderpearls named "GreenPearl". Those pearls should execute a command at armorstands within 1 block. That command is /setblock ~ ~-...
5
votes
3answers
1k views

How to detect for player with custom head

I'm working on an adventure map with quests etc, and need to testfor a player with a certain item in their inventory. The item in question is a custom head with a few attributes–here's the /give ...
4
votes
1answer
485 views

How to clear a minimum amount of items from a player's inventory in Minecraft Bedrock Edition

I've seen this answered before, but it was for Java and it utilized the /stats command, which is unavailable to Bedrock players. I'm creating a Skyblock map with a functioning shop, using /scoreboard ...
4
votes
2answers
467 views

Vertically stacked armor stands should have increasing scores, but don't

I'm trying to make a goalpost system for a custom map I'm designing. The idea is that a goalpost--consisting of a tall stack of iron bars--would have variable height, and at each block up and down the ...
4
votes
1answer
47 views

Is there a way to lock head rotation? 1.14.4

I was doing some stuff in my single player world and I wanted my head to always look down, but not making it choppy. You could do execute as @p at @s run tp @s ~ ~ ~ ~ 90 in a repeating command block,...
4
votes
1answer
223 views

Is there a way to display shrinking vanilla world border size in chat?

I would like to know if it is possible to have my auto message plugin display current world border size. It will shrink from a diameter of 20000 to 213 at a rate of 34 meters per hour. So occasionally ...
4
votes
1answer
142 views

How do I make this contraption multiplayer?

I made a grappling hook in Minecraft and put it into a structure. However, I want to use it in a multiplayer map where multiple people may be using it at one time. I believe the way it is currently ...
3
votes
0answers
37 views

Select Players with inventory open using Mincraft Commands

What I'm trying to do: Make sure players always have a particular guidebook/spellbook (a special command-generated one with clickable links and a special tag). If they lose their book, it should ...
3
votes
2answers
323 views

How do I create tools that only break certain blocks, and also have a colored name?

I'm trying to create an item that can break certain blocks, and also have a colored name in 1.13.2. Here's the command I'm using. /give iAugust minecraft:shears{display:{Name:"[{\"text\":\"Arcane ...
3
votes
1answer
692 views

Having problems with the 'distance=' command in Minecraft 1.13.2

I'm having some problems, a problem that seems simple, but seems to keep eluding me. The command I'm using as a test is this: /gamemode adventure @a[gamemode=creative,distance=..2] Above that, I ...
3
votes
2answers
240 views

How can I add one enchant level?

I want to with every command add one enchantment level like this: /replaceitem entity {player} slot.armor.head chainmail_helmet 1 0 {ench:[{id:0,lvl:+1}] Level: +1 Or If I have a helmet with ...
3
votes
1answer
490 views

Testfor a written book in 1.8 with custom name and writing

So I’m working on a map and need help with the Testfor command. I’ve looked around and tried out several different things and just messed around with the command without help, but I can’t get it to ...
3
votes
2answers
9k views

How do I copy and Paste a command to my command block Minecraft Xbox One?

Mojang recently released the Minecraft Better together update and I want to know if it is possible to copy and paste custom commands in Minecraft on Xbox One.
3
votes
3answers
821 views

Minecraft how to testfor if a mob is looking at the player

Is there a way I can testfor if a mob is looking at the player? I know there is a way to testfor a certain rotation, but is there a way to test if the mob is looking in the general location of the ...
2
votes
1answer
98 views

How to GET minecraft world spawn with commands?

I would like something opposite to /setworldspawn, a command that would return me current world spawn location. I tried getting SpawnX, SpawnY and SpawnZ nbt data from a non-existing player, but it ...
2
votes
1answer
109 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.
2
votes
1answer
347 views

How to teleport seamlessly?

So I'm trying to make one of those "infinite hallways" things, and when I teleport the player there is a short frame of something every time. I am teleporting relative the player shouldn't be able to ...
2
votes
0answers
135 views

(Java Minecraft 1.14) How to force entity to make use of Jump Boost in pathfinding?

I am making a 'vampire' mob for a datapack I'm writing. It is a husk where I've set the attributes and everything to make it faster, hit harder, and have more health, and tagged it so I could ...
2
votes
0answers
36 views

Minecraft armor attributed modifier

I have a custom server with attribute modified armor. They only thing I’m concerned about is that the armor modified never seems to get stronger after it adds up to 25. Can someone explain if there is ...
2
votes
1answer
535 views

Summoning an arrow aimed at a mob

I want to summon an arrow that is fired in the same direction as the player that it is summoned closest to, is this possible with just commands and as minimal command blocks as possible? (not one ...
2
votes
1answer
63 views

How to activate commands around a tagged entity with command blocks?

So I am trying to set the score of a person within two blocks of a tagged armor stand, but the commands I thought would work don't. I have tried execute at @e[tag=GFlag] run scoreboard players add @...
2
votes
1answer
75 views

How can you give yourself a block if you break that block using commands?

I'm trying to figure out how to get blocks by breaking them using commands. Say I'm breaking a diamond ore block and tile drops are turned off so other players can't steal your blocks. Is there a ...
2
votes
0answers
532 views

What's a good way to make a health bar using the bossbar command (For multiplayer pursposes)

I want to use the bossbar command to create a health bar for the players (each seeing ONLY their own health). So I came to the conclusion that there are two main ways to do so: This is the best but ...
2
votes
1answer
427 views

How to use TrustedUUID?

For a while, I have been experimenting with NBT Data on Minecraft. Recently, I wanted to make a fox that trusts both me and a friend of mine, and I know this is possible, as they have the tag ...
2
votes
0answers
859 views

(Java Minecraft 1.13) What is the max and min elytra glide speed with rockets?

I'm planning on creating an item which when held in the off hand while flying gives the player a constant velocity, like a rocket but passive. To know what I need to multiply the players Motion[], by, ...
2
votes
1answer
138 views

Objective minecraft.custom:minecraft.leave_game not working

I am working on a map, and in this map's function I have a system that gives players who rejoin the map a /title message (rejoining meaning leaving the world then coming back). At first it seemed to ...
2
votes
1answer
235 views

How would one go about placing a block and having command blocks place blocks relative to the initial block placed?

I figured it has something to do with using the /scoreboard command to create a scoreboard like this /scoreboard objectives add example minecraft.used:minecraft.id "example name" but from there I ...
2
votes
1answer
527 views

Making Arrows Fly Faster [1.12]

I'm making a sniper with 1.12 commands. It's working very well (except for the fact that bows don't shoot perfectly) but I have a problem: arrow speed. If you shoot an arrow at minimum speed, you can ...
2
votes
1answer
105 views

ArmorDropChances Data Tag below 0.1?

Im messing around with armor drop chances for a map im creating and I have yet to find out any information on the web explaining this: Does the minecraft binary recognize a value for armordropchances ...
2
votes
2answers
119 views

How do I compare a message in chat to another pre-made message?

You might be a bit concerned about this question, well, I'll explain it! I want a command block to be searching for anyone saying .clearchat and if it comes out true it will clear chat. Is it really ...
2
votes
1answer
343 views

Minecraft execute command gives error message “Could not execute ”detect“ as Creeel”

I am trying to make a puzzle map and I want a redstone block to be placed when a certain block is broken. I am putting this command into a Repeating, Always Active command block: execute @p ~ ~ ~ ...
2
votes
1answer
407 views

Minecraft spawneggs CanPlaceOn

I am trying to give myself a wolf spawn egg named Bradley (or a different name) that can be placed on grass. I have tried: /give @p minecraft:spawn_egg 1 0 {Entitytag:{id:"Wolf",CustomName:"Bradley"...
2
votes
0answers
1k views

Minecraft OnGround Tag Help

I'm trying to test for a gold block that is on the ground. I want to use the on ground tag because if I don't, it detects the item immediately after I throw it. The command that I'm using doesn't seem ...
2
votes
1answer
718 views

Player heads linked to player skin id

I know it is possible to give a player head with say ID of whatever skin you want but, I want to make it give the player head with the precise skin at the time the player is killed. I just don't want ...
2
votes
2answers
3k views

How can I summon an object in motion where a player is looking?

I have been trying to figure out throwing knives in Minecraft. Is there an easy way (besides a ton of command blocks) to summon an object where the player is with motion according to where the ...
2
votes
1answer
6k views

Having problems trying to add multiple objectives to sidebar using command blocks in minecraft

I have had the objective KillCount on the sidebar for some time now, but I recently discovered the possibility of several objectives. Therefore I have been trying to add the deathCount, killCount and ...
2
votes
1answer
143 views

How can I keep mobs from being too close together with /spreadplayers and /execute?

I want to summon multiple Slimes, then make sure that they are never in the same block. (If it's not possible to keep them from being in the same block, having them be at least 1 block from each other ...
2
votes
1answer
192 views

How to use item texture variants in Minecraft Java?

I remember, maybe two years ago now, that there was a new feature in Minecraft that allowed you to change the texture of an item in a resource pack depending on a certain NBT tag that was set for the ...
2
votes
1answer
549 views

How to enable spectator mode in a remote “nohup running” server?

We have a mono minecraft server running with the nohup command on Linux, we are using putty to execute commands on the server, but the only way that I could figure out is to kill the Minecraft server ...
2
votes
1answer
1k views

Help with command to teleport NPCs

/tp @e[name=Farmer,type=ArmorStand] @e[name=Farmer,type=Villager] Why doesn't it work? I've tried spacing things out, but it just refuses to work! Interestingly, if i just do /tp @e[type=ArmorStand] ...
2
votes
1answer
116 views

How to change entitydatas for this project?

I'm making an underwater city. When I will be finished I would like to have citizens and guards in it. Is there a way I can either make an entire new entity or just edit a Villager's skin and get rid ...
2
votes
1answer
437 views

How can I detect items without NBT Tags?

I'm working on a map where it clears normal droppers from your inventory and gives you ones with a tag. But it's detecting the droppers with tags as well.
2
votes
1answer
233 views

Multiple commands in a given sign doesn't execute correctly…?

Well, as you probably know, ArmorStand's with CustomName's are used to create holograms. I am trying to make a one command sign generator that creates a multiline hologram, multiple ArmorStand's under ...
2
votes
1answer
703 views

Minecraft command block teleport with Target selector arguments

I have a 1 tick clock, which leads to a command block with the command: testfor @p[-262,3,113,1] {SelectedItem:{id:minecraft:stick}} That works. It finds me under the right conditions. Then I have ...
2
votes
1answer
205 views

Can I check whether a player is behind a mob?

I am building a Adventure map and I want to include a Backstab-like feature, where when player is behind "Mob" he is given a diamond sword with sharpness 99999. If he is not, the sword is removed. (...
2
votes
2answers
127 views

My command for minecraft executing a command at an entity won't work

So I'm trying to make a pokeball system and I'm testing it on a chicken named TestCatch. I want the command to test if there is an item named pokeball near the chicken. I have this command: ...
2
votes
1answer
748 views

How to get minecraft's accurate 'x' and 'y' rotations?

I'm attempting to recreate this concept using an 16 'x' compass rose and 25 'y' axis degree. My first attempt I already had the rotations for N, S, E, and, W as well the NE, NW, SE, and SW. ...
2
votes
2answers
329 views

Command Block /execute at all UNnamed mobs of same type

I have various named Zombies. I want to do something with all OTHER Zombies. /execute @e[name=Zombie] ~ ~ ~ summon ArmorStand ~ ~ ~ Above does not seem to work. Any way to target Zombies that have ...