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], [minecraft-bedrock-edition], or [minecraft-education-edition] tag.

Filter by
Sorted by
Tagged with
0 votes
0 answers
27 views

How do I use the summon mechanic minecraft:add_biome_and_skin in Minecraft Bedrock?

I want to summon summon villagers from the different biomes on Minecraft Bedrock, specifically the mobile Android version. There is a summon mechanic called minecraft:add_biome_and_skin which I'm ...
user avatar
2 votes
0 answers
71 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.
user avatar
2 votes
1 answer
904 views

Check for moon phase with commands?

I want to check what phase the moon is in, on any given night. I know that every 7 in-game days is a full cycle and the fuller the moon is the higher the difficulty of mobs and such. I'm working on a ...
user avatar
0 votes
0 answers
63 views

How can I make an armor piece give an effect when worn in Bedrock?

The title says it all, I've been searching for tutorials and every single one of them is outdated and doesn't work in the current Bedrock version. How can I give a tag on an armor piece that when worn ...
user avatar
1 vote
0 answers
26 views

Can I print to a log file or chat when an event occours?

I am trying to troubleshoot a shulker farm design. This farm works flawlessly in vanilla, but on the server where I play, that uses paper, it breaks within minutes. I am planning to set up a paper ...
user avatar
  • 1,929
4 votes
1 answer
1k views

How to kill an Entity a Player is looking at?

Is there a command that would kill the entity that the player is looking at?
user avatar
-1 votes
1 answer
283 views

How to make zombies spawn faster and in larger groups in Minecraft?

How to make zombies spawn faster and in larger groups using a command block on the Switch?
user avatar
1 vote
0 answers
151 views

what is the lava rising command? [closed]

I want to know what is the command to make lava rise in my world. I don't want to use any mods, since last time I tried using a mod, I got a virus. I've tried a bunch of Youtube tutorials, but nothing ...
user avatar
1 vote
1 answer
92 views

Teleporter pad command Minecraft

I am new to command blocks, and was wondering if a block in the floor topped with a pressure plate and coded with this code would work as a teleporter between tower floors, where the player just walks ...
user avatar
1 vote
1 answer
38 views

Check for an amount of blocks of a certain type within a region

Is there any way I can check for how many blocks of a certain type are in a region?
user avatar
  • 11
0 votes
1 answer
478 views

How do I summon an item with a custom name? [duplicate]

I'm trying to summon a potion item with a custom name. I did use /summon minecraft:item ~ ~ ~ {Item:{id:"minecraft:potion",Count:1b},display:{Name:'{"text":"Teleporter",&...
user avatar
-1 votes
1 answer
183 views

How do I reset a DeathCount in java?

Full command, please. I've tried a lot, but nothing worked. Also, I've forgotten the command completely. Please help me as fast as possible. I'm opening a server on 21-1-2022 but I can't reset the ...
user avatar
0 votes
0 answers
20 views

How can I use replaceitem for enchanted items in mcpe? [duplicate]

I am making a map and I want a enchanted item in the 9th hotbar slot. Can anyone help me do this with no mods or a behavior pack?
user avatar
  • 1
1 vote
0 answers
31 views

Minecraft item blacklist

I'm trying to compare the items in a chest-minecart with a blacklist. I'm currently using /execute positioned -23 110 -274 as @e[type=minecraft:chest_minecart,distance=..1] unless data entity @s {...
user avatar
  • 11
0 votes
0 answers
59 views

How to move the contents of a chest to a Bundle using commands?

I'm currently trying to move the contents of a chest into a bundle (being held by a placeholder armor stand) but the most it would do is copy the last item in the chest (that is not minecraft:air) ...
user avatar
  • 1
0 votes
1 answer
245 views

How to create a command block with alarm sounds

I have a prison map I am building, but need a command block that sounds like an alarm. Problem is, the command block starts getting choppy after repeating continuosly. Anybody have suggestions for an ...
user avatar
  • 3
0 votes
2 answers
55 views

How do I summon a layer of entities efficiently?

I am making a system of commands where trapdoors are traps, so whenever someone holds the trap in their hand, the trap happens to everyone. I already made part of the command for the birch trapdoor: ...
user avatar
  • 330
2 votes
3 answers
296 views

On Minecraft Bedrock Edition, how do I make it so people can't build at spawn?

I know using barrier blocks makes it so people can't break stuff, but how can I make it so players cannot place stuff at spawn?
user avatar
0 votes
1 answer
116 views

Teleporting an entity behind a player?

I am trying to make a morph command with command blocks but whenever I try to use ^ the mob just moves up and down when I try to move my camera. I can't figure out how to get the head to move while I ...
user avatar
1 vote
1 answer
122 views

How would I make a door "stun" a player

I am playing Minecraft Education Edition, and I want to know if it is possible for the door to stun a player. For example if there are 5 players I want 1 of them to be able to be stunned by the door. ...
user avatar
  • 1,107
1 vote
1 answer
34 views

How to restore armor stands?

I was building a map with a lot of custom armor stands and I accidentally used the /kill @e command. Is there any way I can restore my armor stands?
user avatar
0 votes
1 answer
46 views

Is it possible to summon entities similar to how the fill command works? [duplicate]

So I wish to know if it is possible to summon entities in the same way you would use the /fill command in Minecraft for example summoning a layer of arrows above the player. I don't know if this is ...
user avatar
1 vote
1 answer
265 views

On Minecraft Servers, are you able to see an item's player history?

For example are you able to see the history of every player that handled a specific item? Either through console or through a plugin? If so, do items that are convertible from ingot to block, such as ...
user avatar
3 votes
2 answers
718 views

How to detect if a player is within a mob's line of sight, and can that be changed?

Is it possible to detect if a player is within a mob's line of sight? And if so, can that line of sight be changed to only see things in 1 axis? For example, only being able to see things in front of ...
user avatar
  • 103
1 vote
0 answers
31 views

So I'm trying to have it when you click a sign it makes it seem like your game is being hacked plz help me I'm on bedrock edition [closed]

ONLY using signs thxs! and only on BEDROCK edition not java
user avatar
0 votes
1 answer
53 views

How to Group undead mobs in a datapack?

I have this in my datapack, in a JSON file: { "values": [ "minecraft:drowned", "minecraft:husk", "minecraft:phantom", "minecraft:skeleton&...
user avatar
0 votes
1 answer
96 views

Is it possible to make a villager you cannot interact?

I am trying to make something like the morph mod, where you can become a mob, but with a villager, when I want to right click, I interact with the villager. How to make it so that I cannot interact ...
user avatar
0 votes
1 answer
214 views

How to teleport a villager with a pseudo NBT tag?

Pseudo NBTs are like NBTs that aren't real like these: So I tried doing something like this: But it says this: I don't want mods - I want to do this in vanilla Minecraft.
user avatar
0 votes
0 answers
61 views

How to double melee attack damage within same tick as projectile strike

In many Java Edition servers, there are plugins in which you can deal double damage by hitting someone with a projectile such as a snowball or a fishing rod and then your sword within a given time ...
user avatar
  • 535
1 vote
1 answer
9k views

Disable PVP in Minecraft with a command

Is there any way to disable PVP in Minecraft Java edition with a command, if I already have teams created that are needed? Things I've Considered/Tried Creating a team named all, giving it to ...
user avatar
1 vote
1 answer
117 views

How to make mobs spawn where the player is at random intervals?

Hello I'm trying to make a plugin/mod where mobs(1 - 31) randomly spawn at the players coords, but I'm very new to coding in Minecraft so any help will be appreciated. I'm playing on 1.18
user avatar
0 votes
1 answer
880 views

How to create a dust particle that deals damage in Minecraft?

I'm in 1.16.5, I have tried for weeks and I just can't get it. The most progress I have ever got is this: /execute as @e[type=item,nbt={Item:{tag:{ThornPounce:1b}}}] as 1_1COOKIE1_1 at 1_1COOKIE1_1 as ...
user avatar
1 vote
1 answer
116 views

How do I create a sign which can be clicked with a specific item to run a command?

I want to place a sign on a block with the text '1' on its first line, that also, when you click on the sign whilst holding a piece of paper with the name '1853914142' it runs a command. This is what ...
user avatar
0 votes
1 answer
63 views

How to summon a ravager with momentum

I want to summon a ravager with a certain momentum on a command block? I did summon minecraft:ravager but I don't know how to give it momentum.
user avatar
  • 111
0 votes
0 answers
43 views

How to spawn an NPC that already has commands?

I've got an NPC egg, fully customized it with commands and text, but I want to have it at multiple spots in my world. Is it possible to copy it or put it in a spawn egg or any other form of similar ...
user avatar
0 votes
0 answers
45 views

How can I turn off a repeating command block if I don't know its coordinates? [duplicate]

I've placed a command block and it is spawning mobs. I don't know its coordinates and without that I can't turn it off. That world is a huge build and if I can't break the command block I will lose ...
user avatar
  • 1
0 votes
1 answer
77 views

How to make a clock in Minecraft?

I want to create a clock that tells the player the current game time out of the 20 minutes in a day. I couldn't figure out any commands that did this, so I made a Redstone clock that activates every ...
user avatar
0 votes
1 answer
206 views

Minecraft scoreboard operation by number

In Minecraft Java 1.18.1 I want to operate two scoreboard with a number like: scoreboard players operation @p lives = (@p deaths - 3) But this command is not working, can anyone help me please?
user avatar
  • 1
0 votes
1 answer
79 views

How do I give myself blocks that can only be placed on red wool? [duplicate]

All wool blocks use the minecraft:wool tag. Does anyone know how a solution? So far I only have this: /give @a minecraft:stained_hardened_clay 5 9 {CanPlaceOn:["minecraft:wool"]}
user avatar
  • 1
0 votes
1 answer
114 views

How to make arrows to not bounce back but explode when they hit an entity?

I made arrows explode when they have the {inGround:1b} tag but the problem is that they won't explode when they hit entities, instead they bounce off them and hit the ground then explode. How do I ...
user avatar
  • 1,042
0 votes
1 answer
136 views

Check for named item in helmet slot not working

I am trying to make a SCP-035 mask in Minecraft with command blocks. (since I think it would be fun and people only make NPCs) I am trying to make the part where it checks when you put it on and then ...
user avatar
  • 1
3 votes
0 answers
54 views

Who is the Command Initiator?

I have been playing Minecraft for years and have an ok understanding of the command system inhabiting it. What troubles me the most recently revolves around the command initiator. As we all know @s ...
user avatar
  • 1,042
2 votes
1 answer
63 views

Undroppable Quest Items for Minecraft 1.12.2?

I've been creating a modded adventure map over the last three years and have finally decided to deal with an issue that I've been aware of for a long while. I'm trying to make it so certain items are ...
user avatar
1 vote
1 answer
107 views

How do I make an operator with specific permissions?

In Minecraft I want to make my friends operators but I don't want them to be able to run all the commands a operator can run. For example, say I make my friend an operator and now they can use / ...
user avatar
  • 1,107
1 vote
1 answer
45 views

Struggling with CanPlaceOn tags in MCPE [duplicate]

I'm trying to spawn an item that can only be placed on specific blocks, and I know this can be achieved by using: /give @s (item) 1 0 {CanPlaceOn:["block"]} I've tried this several times, ...
user avatar
0 votes
3 answers
260 views

Prevent people from mining specific blocks [duplicate]

I'm making a prison, and I want to prevent people from mining specific blocks. How do I prevent players from destroying cracked stone bricks, signs, and red carpet blocks?
user avatar
2 votes
1 answer
338 views

How to stop people from sprint jumping?

As part of a datapack-powered PvP map we want to apply slowness to players. Sadly we have run into the issue where slowness does not affect sprint-jumping speed, meaning even players with slowness 100 ...
user avatar
  • 448
0 votes
1 answer
250 views

Minecraft Schedule Command not working

I have a datapack in which a gun can be reloaded automatically when mag is emptied. There is a reload.mcfunction that would set the ammo value of the current player to full. What I want to do is, when ...
user avatar
  • 1,042
0 votes
2 answers
124 views

Can run command for only one if score statement

I am trying to make a voting system for difficulties in my Minecraft world. I have set up the command blocks that add the score for a fake player named #VoterDirector for each difficulty. To test if ...
user avatar
1 vote
1 answer
725 views

Is there a way in 1.18 to limit/kill mobs in forceloaded chunks (with a goal to minimize active entities and server lag)?

BACKGROUND: I have a minecart rail line that services a few farms which are good distance from spawn (1400 blocks), picking things up and returning them to my storage (sorter). I've done /forceload ...
user avatar

1 2 3
4
5
98