Skip to main content

Questions tagged [minecraft-commands]

Anything related to the usage of commands, command blocks, and functions in the Minecraft game series. Always use this tag together with the [minecraft-java-edition], [minecraft-bedrock-edition], or [minecraft-education-edition] tag. Include details about the issue you're having (e.g. commands, error messages, screenshots, etc) and what you've tried so far to solve it. If you're building a redstone device without commands, use [minecraft-redstone] instead.

191 questions with no answers
Filter by
Sorted by
Tagged with
5 votes
0 answers
422 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]...
guest's user avatar
  • 95
4 votes
0 answers
63 views

How do I modify the item count of an unstackable item?

I need to change the count of an unstackable item entity (e.g., a shulker box). This used to work in pre-1.20.5, but with the changes in stacking, it does not work now. I am trying to regain the same ...
aidancomi's user avatar
4 votes
0 answers
43 views

In Minecraft, is it better for performance to run one function with an @e selector, or run a function as @e?

I'm writing a Minecraft Datapack that adds "Abilities", each of which has its own function that's run once per tick. I have a scoreboard objective for each Ability, that determines whether ...
Harth's user avatar
  • 169
4 votes
0 answers
50 views

Can villager trades ignore additional NBT tags and order of NBT tags?

I have a villager with trades involving tattered written books. The reason I'm using them is that they're unclonable, ensuring their scarcity. To obtain the written books, players can trade in regular ...
404 Name Not Found's user avatar
4 votes
0 answers
5k 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 ...
Gorm's user avatar
  • 91
3 votes
0 answers
73 views

Find every generated mending book in 1000x1000 world

By generated mending book I mean chests and chest minecarts that generate in structures. Is there an external tool that would allow this? The /data command works only in loaded chunks, but more ...
Nathalie Kitty's user avatar
3 votes
0 answers
73 views

Why is my command block's /music command not playing my custom music?

I’m a little confused and been at this for 2 days. I’m trying to make custom music I’ve uploaded. (Already did that part and works good) But whenever I place a command block down and put in the ...
Renegade's user avatar
3 votes
0 answers
82 views

Select nearest entity which isn't the owner of a projectile

I'm working on creating a homing missile which targets any flying object. However, the main limitation is that the missile can only be launched from the ground because it tends to track whoever shot ...
WarpPrime's user avatar
  • 1,777
3 votes
0 answers
870 views

How would I execute a command at the position of every block of a certain type?

I am trying to summon a beam of particles in replacement of a beacon beam. I have tried making a new model and texture but there seems to be no information on how to change a model that doesn't appear ...
Lillie's user avatar
  • 31
3 votes
0 answers
45 views

Accessibility within video settings to reduce chances of seizures?

I've been playing Minecraft (Java) for a while now, survival and creative, but sometimes the visuals that occur within the game as a glitch causes me to get a migraine. The visuals I'm talking about ...
leguchi's user avatar
  • 201
3 votes
0 answers
153 views

How to add a blank line onto a scoreboard in Minecraft

Recently I am working on a RPG custom map. I wonder if there are any ways to insert a blank line (in singleplayer) onto the scoreboard to make it more fancier and more organized, just like this ...
Tsain's user avatar
  • 43
3 votes
0 answers
79 views

Can I use NBT tag values ​as command input?

I am trying to use commands to detect when a player's bed is broken using the SpawnX, SpawnY, and SpawnZ NBT tags. It would look something like this: /execute as @a unless block [SpawnX] [SpawnY] [...
Oak10's user avatar
  • 63
3 votes
0 answers
133 views

Using command blocks, how can I automatically place mined blocks into the inventory of the player who mined them?

Is it possible to make it so that each time you mine a block, you get the block, using command blocks in MCPE? It doesn't matter what tool you use, or just your fist, it just appears in your inventory....
lowerllama's user avatar
3 votes
0 answers
121 views

Best way to dynamically call function

For my project, I have callable objects (arbitrary NBT dict that is theoretically capable of calling an mcfunction) stored on an NBT array (the Stack). At an arbitrary time in execution I want to be ...
Jam's user avatar
  • 525
3 votes
0 answers
135 views

Testing the age of a certain item in ticks?

I'm developing a Minecraft server which incorporates realism using a command block network in the center of the map. I'm trying to simulate food spoiling via testing for the age of an item (i.e. if a ...
WarpPrime's user avatar
  • 1,777
3 votes
0 answers
165 views

How would I test if my custom dimension exists?

I'm making a datapack that relies on a custom dimension. If the dimension hasn't loaded in, it will break things. When you add the datapack to a pre-existing world, then the dimension won't load until ...
ThePhantomPig791's user avatar
3 votes
0 answers
70 views

Spawn Mobs With Specific Items Equipped

Hi All, In MCPE 1.16.2, I want to create a way in which when I eat a specific item (call that ‘alpha’), it spawns 4 mobs with a helmet equipped. And also would it be possible to make the mobs work for ...
Dean's user avatar
  • 65
3 votes
0 answers
106 views

Test For A Specific Item In Head Slot & Then Activate Something Else

Hi All, I’m trying to create an addon in MCPE 1.16.2 but I’m struggling to do one thing. I want to be able to detect a player with an item on his head and then follow on with another command like ...
Dean's user avatar
  • 65
2 votes
0 answers
33 views

How to detect the use of a particular item in Minecraft Bedrock?

I'm trying to make a thirst command block setup, but I can't find how to detect use of an item. I've tried /testfor, but the closest I got was: /testfor @a[hasitem={item=potion,location=slot.weapon....
Aiden L's user avatar
  • 135
2 votes
0 answers
40 views

How to delete custom symbols on maps?

I came across a question a long time ago that was about custom icons on maps. I can now create custom icons on maps, but I can't figure out how to delete them because I can't even find them in a world'...
Its2Izzi's user avatar
2 votes
0 answers
65 views

How to give a item that cannot be dropped on death

So I know for a fact that there is a way to /give players an item that cannot be crafted with, or dropped on death. I have seen things on how to do this but they are hard to understand. Can someone ...
Carl papa's user avatar
  • 139
2 votes
0 answers
169 views

Minecraft scoreboard calculations with offline players

I am trying to build a ranking system for teams on my server using only vanilla commands (i.e. /team, /scoreboard, etc). I have multiple mini games that will have a scoreboard objective to track the ...
Jacob Kelley's user avatar
2 votes
0 answers
58 views

How can I use selectors when getting data from a storage?

How can I get use a selector when using /data get or /execute store success ...? My storage looks like this: { 0: [ {"Player1": 0}, {"Player2": 1} ], 1: [ {&...
Dany's user avatar
  • 21
2 votes
0 answers
140 views

Can you make an item inflict a status effect in vanilla Bedrock Edition?

I looked around and found how to make an item (in this case a sword) inflict a potion/status effect when it hits a mob, but all of them are in Java edition. Is there any way to do this in vanilla ...
Dragon's user avatar
  • 21
2 votes
0 answers
51 views

Minecraft - Branching Dialogue using Tellraw and Triggers

I am trying to set up a system of branching dialogue using command blocks, tellraw, and triggers. Players are presented with a series of questions and answers. In this case, the sentence says, "...
Megan's user avatar
  • 127
2 votes
0 answers
48 views

How to make slimes attack other entities

I know there is a way to make mobs attack each other by summoning an arrow with the target mob UUID on top of the mob you want to attack it, but it does not seem to work with slimes for some reason, ...
D3T0NA's user avatar
  • 371
2 votes
0 answers
313 views

How do we link an items nbt numbers to a scoreboard number?

I'm working with my datapack but got stuck with this problem. We're basically connecting nbt numbers into a players scoreboard number. I'm trying to link an item's nbt to a scoreboard. For example, ...
Athryn's user avatar
  • 61
2 votes
0 answers
351 views

How to use Minecraft bedrock command block output as a variable?

I am very familiar with Minecraft bedrock's command code, and I've used it for a long time. Although, I can't seem to figure out how to store the output from a command block into some kind of variable....
ChristianB's user avatar
2 votes
0 answers
477 views

Testing for if an item entity has an ID matching a list of item names

I am making a datapack that uses copper as a fuel, however part of that means that I need to be able to test an item when it is on the ground to see if it is one of the 37 copper items. I have already ...
Accorwolf's user avatar
  • 111
2 votes
0 answers
58 views

Using signs to record new joiners to realm

The idea is to automatically place sign with name of a new player to the realm. When a new player joins command blocks give a new player starter kit and add him a tag "Started" to close the ...
BubaaCZek's user avatar
2 votes
0 answers
165 views

How to detect if a player has touched a block with hand?

I know you can make a scoreboard to detect if a player mined a block, But I don't know how to make something to detect if a player touches a block(not break the block). I'm on java edition 1.18.
Arian_Commandy's user avatar
2 votes
0 answers
230 views

Check Minecraft Java scoreboard Leaderboards

For various purposes, I need a way to check scoreboard objectives rather than just checking a player's scores. Is there a command I can run that can find the largest score in a scoreboard and who has ...
Meowl's user avatar
  • 369
2 votes
0 answers
642 views

Summoning a ring/sphere of arrows around an arrow which had just struck the ground

I've been messing around with bows and arrows and summoning stuff when the arrow hits the ground, like lightning, but I've got an idea I do not really know where to start at. So here's the plan, I ...
AlexJaynMF's user avatar
2 votes
0 answers
44 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 ...
StickyChannel 92's user avatar
2 votes
0 answers
75 views

How to make a scoreboard of how far someone has walked? (Minecraft Bedrock Edition)

I'm trying to make a leveling up system for an add-on I'm making for Bedrock Edition and I need to make a scoreboard of how much someone has walked/ran, I can't figure out a way to do this.
Ahkid's user avatar
  • 41
2 votes
0 answers
1k views

How to make colorful "flash" particles in minecraft

When i use the command /particle minecraft:flash ~ ~ ~ 0 0 0 0 3, it creates a white explosion, but firework explosions give the colorful version of the same particle. How do i colour it? Is it some ...
QmegaMax's user avatar
  • 165
2 votes
0 answers
38 views

How can I make a command block say a formatted player's inventory?

I'm trying to make a command block say a player's inventory items. I tried /say data get entity @p Inventory But it didn't work. Also, is there a way I can format the output so it will be like: [64] ...
PSYX's user avatar
  • 21
2 votes
0 answers
126 views

Make Minecraft commands take priority over plugin commands

I'm running EssentialsX on my Minecraft server and I don't like the EssentialsX versions of the Minecraft commands they add. To allow me to use the Minecraft ones like I would traditionally, I ...
Jacob N's user avatar
  • 21
2 votes
0 answers
125 views

How to teleport every player to a different location?

I’m working on a Minecraft map. My plan is to teleport everybody (at the "event") to a different location. So the problem is that I cannot do: /minecraft:tp @a[team=event] ~ ~ ~ because it ...
CookieStorm's user avatar
2 votes
0 answers
105 views

How to spawn a mob that takes extra knockback regardless the weapon used?

I am planning to do a manhunt with lots of things as twists (Video title would be:"Minecraft Manhunt but Buttons, Pressure plates, and Trapdoors are OP) so if you hold a blackstone button, it ...
Korogue's user avatar
  • 392
2 votes
0 answers
56 views

How can you detect when a player hits a block in Adventure Mode [version 1.16.5] in Minecraft?

In Minecraft, I am trying to make a map in Adventure Mode where you sell/buy trees. I want to be able to detect whenever a player has punched an oak log in Adventure Mode, and then it would ...
Lawrziepan's user avatar
2 votes
0 answers
452 views

How can I make a smithing table recipe that yields a named item?

I am trying to make a datapack where you can combine a turtle shell and a netherite ingot in a smithing table to get a turtle shell with knockback resistance and armor toughness. I have figured out ...
papayasaurstoast's user avatar
2 votes
0 answers
289 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 ...
Gorm's user avatar
  • 91
2 votes
0 answers
73 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 ...
J Doe's user avatar
  • 71
2 votes
0 answers
1k 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.
Toby's user avatar
  • 21
2 votes
0 answers
55 views

Commands still run from killed armor stand

I have the following commands run by an armor stand in a function say Hello. I'm here! kill @s execute as @s run say Still here When I run it on an armor stand I get [Armor Stand] Hello. I'm here! [...
Jack's user avatar
  • 212
2 votes
0 answers
391 views

Detecting if a player is using the spyglass

I am playing in the latest java snapshot (20w46a) and was trying to create costum enchantments for the spyglass; I tried using the scoreboard command, but for some reason it doesn't seem to work; is ...
The Shish's user avatar
2 votes
0 answers
152 views

How to detect an entity with same name as player?

I want to make a map where you can morph into entities and fight other players with that, and for this map I need a way to teleport an entity that has the same name as a player to said player. How can ...
Shady28br's user avatar
2 votes
0 answers
265 views

How can I use [Motion] to make an entity follow a path based on the player?

I get the way the question is formatted, it may sound as if this question has been asked before, and if it has, I'd love to see where I can find it. What I'm struggling with is being able to summon an ...
ExecuteAndStore's user avatar
2 votes
0 answers
53 views

How can I join multiple teams with different rules?

I want an Iron Golem, Zombie A, and Zombie B to be on a same team so they wouldn't attack each other but I want Zombie B to have a no collision rule. If I let Zombie B join another team with a ...
Robomike's user avatar
  • 349