New answers tagged

0

You can in Java. The command for Java would be summon phantom ~ ~1 ~ {Passengers:[{id:"minecraft:minecart",Invulnerable:1b}]} This principle is to spawn the phantom with a minecart as its passenger, this way it always stick to the phantom and would not fall off unless the phantom died, which you can fix by killing the minecart entities if phantom ...


0

Remixing different sounds in Minecraft really comes down to experience and trial & Error. Here is what I use for alarm. playsound block.anvil.land ambient @a ^ ^1 ^1 1 2 The choppy issue is nothing to do with commands and the game itself. I would suggest for you to use a datapack instead, so that you could limit the frequency of the sound with ...


2

sorry for the late answer but I have found the ultimate trivial method to do what you want. To start off, it involves passenger entities and raycasting. The code is really short but you will still need a datapack for the raycasting function. The only downside to this method is that the subject entities that can detect your presence must be unique and ...


-1

I just commented something about using ^^^ and I almost forgot armour stand exists. what you can do with this is you can make the armour stand into a ray and use it for ray casting just like one of the comments said. you can make it go forward for a few times using tp execute at @e[type=minecraft:zombie, tag=...] if @e[r=10, type=minecraft:armour_stand, tag=....


0

You could use 2 repeating command blocks. One that sets all nearby players' gamemode to Adventure then one that sets players outside of that nearby radius to Survival. Make sure they're near one another. Command block 1: gamemode a @a[r=<your radius>] Command block 2: gamemode s @a[rm=<your radius>] After checking the wiki there seems to be some ...


0

VERSION 1.16+ execute at @a[distance=10000] if block ~ ~-1 ~ [block] run effect give @p [effect] [seconds] [amplifier] true


1

You can use rotated ~ 0 to essentially ignore the pitch of the player when teleporting the entity ^ ^ ^-1 (1 block behind, or any desired offset) the player so that it does not move up or down whenever the player looks up or down. Here's an example: execute at <player> rotated ~ 0 run tp @e[tag = clone] ^ ^ ^-1 If you still want the entity to look up ...


1

I think /data merge entity @e[type=boat,limit=1] {Pos:[-6d,60d,22d]} will randomly choose a boat in the world. So, it should be /data merge entity @e[type=boat,sort=nearest,limit=1] {Pos:[-6d,60d,22d]} It will choose the nearest boat to teleport with you.


4

You cannot undo any commands in Minecraft. /kill @e is a command therefore it cannot be undone.


1

No you can't. You have to define a function that records all relative positions you want the arrows to spawn. This could be done easily with code generators if you know actual programming languages. Example: Generate a layer of arrow matrix (5x5) below the player. The function should look something like this. execute positioned ~-2 ~-1 ~-2 run summon arrow ...


0

You can use item modifiers for this. This one removes all enchantments from an item: { "function": "minecraft:set_nbt", "tag": "{Enchantments:[]}" } If you save this as a file named 'remove_enchants.json' in an item_modifiers folder in your datapack. You can remove the enchantments of an item being hold by a ...


1

Not in vanilla. While yes logs are kept of some things in vanilla, they are not so detailed as to allow you to track an items complete history. There are some plugins like CoreProtect which do have extensive logging features. It may also be possible with datapacks, however I do not know of any which do this. Either way these are not the best way to prevent ...


0

This once happened to me, while having a pressure plate on glass and it is having the Redstone (or energy) passing to the command block. What was strange was that it gave "-". What I tried (And for some reason worked) was to directly put the pressure plate on the command block. So, my idea is that it needs a direct source of energy (or Redstone).


0

You can use Psuedo Random, it is not entirely random but it's fast enough to be "random". To do Pseudo Random you can add a dummy scoreboard to yourself /scoreboard objectives add psuedoRandom dummy Then you can create a repeating command block that increments it or changes it to a random one /scoreboard players add @s psuedoRandom 1 Then add a ...


1

I did /spawnpoint @a then, /setworldspawn and then, /gamerule spawnRadius I did everything together because I needed it to work.


1

There's a bug in the game where follow range only changes the distance at which the mob will follow you once seen. Follow range does not apply to the generic seeing distance, which is 16 for most mobs and 40 for zombies and I think pillagers, so setting a higher follow range will not enable mobs to see you and attack you from farther away.


1

You missed a hashtag: execute at @s run effect give @e[distance=0.5..4,type=#undead] instant_health 1 1


0

Set up a dummy objective called count. Insert this before your tp command. "'scoreboard players remove @s count 1"'. Replace your '''tp ~~~1''' with "'execute positioned ~~~1 run function namespace:make_circle'''. In tick function, write this --- "'execute as @a[scores={count=1..}] at @s run function namespace:make_circle''' Now that you ...


1

There is. It is a villager that has a profession of "nitwit" it doesn't have any jobs, and it does nothing, also it is spawnable on survival. to spawn a nitwit villager with commands, just do: /summon villager ~ ~ ~ {Profession:5,Career:1} (from Is there a command to specify which type of Villager to spawn?)


7

First of all, those are called "pseudo tags". Secondly, there is an easy way to accomplish this - tags. By tags I don't mean NBT tags, but the tags you add on to an entity with the /tag command. Simply tag the villager with something and teleport entities of that specific tag. E.g. /tag @e[type=villager,sort=nearest,limit=1] foo /tp @e[tag=foo] to ...


0

So for you to sense if someone is in a certain area , you can use volume selectors, dx, dy, and dz. The selected volume would be the space from x, y, and z to x+dx, y+dy, and z+dz. For example: /give @a[x=1, y=2, z=3, dx=2, dy=2, dz=2] cake This give anyone between 1 2 3 and 3 4 5 a cake For the score selector, you almost did it, but not quite. The only ...


2

The only way to achieve this in vanilla Minecraft would be to use a texture pack that replaces the .ogg sound files of the noises you want to silence with empty sound files so that you cannot hear them.


1

Unfortunately, as of now, this is not possible in Minecraft Education Edition. You could perhaps create some custom items such as splash potions with name tags and through the use of command blocks and the execute command build command "items" which could then be given to users.


1

You can use the weakness effect which when having a high strength does not allow the player to deal any damage. /effect give @a weakness 9999 255 true will give weakness 255 to all players until you clear it and also hide the bubbles to make sure they don't annoy anyone. Note for Bedrock Edition players: There is a gamerule command /gamerule pvp false which ...


0

so I believe the problem with your command is that CanPlaceOn (and CanDestroy) is for Minecraft Java Edition, and is not usable in Minecraft BE. However, as stated in "How can I use CanPlaceOn and CanDestroy in Bedrock Edition?", there is a Bedrock Edition equivalent, minecraft:can_place_on and minecraft:can_destroy. The differences from CanPlaceOn ...


3

I don't know what the first part of your command does: /execute as @e[type=item,nbt={Item:{tag:{ThornPounce:1b}}}] as 1_1COOKIE1_1 at 1_1COOKIE1_1 as @e[type=item,nbt={Item:{tag:{ThornPounce:1b}}}] run ... Since your question states that you are just trying to summon an area_effect_cloud, I'm going to ignore it. Issues with your command Your ...


0

So you have a lot of nesting here. You have JSON inside of NBT inside of a command inside of JSON inside of NBT inside of a command. Let's look at each component separately (outermost to innermost): setblock -8 42 189 minecraft:birch_wall_sign[facing=east]{Text1:'…'} {"text":"1","color":"black","clickEvent":{&...


0

You could make a resource pack with a big 3d model replacing a hat making 3rd person a blackscreen essentially. (However I am not sure this will work for both back and front 3rd person). Note: I suggest using Blockbench for this as it's going to make the whole process a lot easier.


0

I believe that I have found a perfect solution after numerous attempts on creating a perfect projectile. The solution is rather simple, it involves the use of marker entities. Brief Introduction Marker entities are added into the java-edition of Minecraft in the 1.17 update. They are intended to satisfy all basic properties of entities but have the minimum ...


0

A simpler solution would be to prevent any player from ever having two "unique" pickaxes in their inventory. Give the pickaxe You can give it a unique identifier with a custom NBT tag: give @p stone_pickaxe{unique:1b} 1 Optionally, you can give it some lore so the player knows it is a unique pickaxe: give @p stone_pickaxe{display:{Lore:['{"...


0

You could summon an armour stand with summon armour_stand dirt_location. Then use the spread players command to randomise its location with spreadplayers ~ ~ 10 11 @e[name=dirt_location]. Then use execute @e[name=dirt_location] ~ ~ ~ setblock ~ ~ ~ dirt and finally kill @e[name=dirt_location]. You will want all those commands chained together with chain ...


2

If you want to know the exact ingame time and show it somewhere, the /time and /execute store are your friend. First we create a scoreboard to store the time and set some constants. Do the following in chat. /scoreboard objectives add time dummy /scoreboard players set $TickToHour time 1000 (This is so we divide the result of /time query daytime to get ...


0

Try using /tickingarea, it will continue to load the selected chunk as longs as you are online but if you are using a realm or server it will be working with nobody online.


0

You need to add as <player> For example: execute as <player> run setblock ~ ~-1 ~ minecraft:oak_planks You also should not need the at <player> when it is being ran by as <player> the cords at set block (~ ~ ~) should do that


0

You can try this: give @a[name=!YOURNAME, r=4] dirt 1 Replace YOURNAME with your Minecraft username and when you run it, it should give everyone within 4 blocks (except from the username entered) a dirt block.


0

You can display it on their screen with /title @a title <text>


0

You can spawn a wither and rename it with a nametag and a anvil, it should work. I also suggest you do it under ground in a bedrock box.


0

You can try holding a sword (Swords don't break stuff in creative if i remember right.)


0

You can try slowness 255 by /effect give <player> slowness 255 255 true If they can still just also make another command block with /execute as <player> at <player> run setblock ~ ~1 ~ minecraft:glass keep


0

scoreboard players operation @p lives -= @p 3c You need an extra objective which is a constant to do this because scoreboard operations only support scoreboard objectives, in other words, you can't utilize integers in subtraction. scoreboard objectives add 3c dummy scoreboard players set @a 3c 3 Hope this helps.


0

I play in 1.18.1, and this is the following command that works: /kill @e[type=item,nbt={Item:{id:"minecraft:gold_ingot"}}] Right now, the latest version is 1.18.1, so Idk if it works in later versions.


3

Here is the command you need to write. /give @a minecraft:stained_hardened_clay 5 9 {CanPlaceOn:["minecraft:red_wool"]} Or writing it in 1.13+ looks like: /give @a stained_hardened_clay{CanPlaceOn:["minecraft:red_wool"]} I saw a comment that said you needed to write it like 59 with no space, that is incorrect you need the space, so when ...


0

It does not have anything to do with the vanilla chunk loading. An active redstone current that is carried out of the player's render distance (into unloaded chunks), will cause the chunk that it is in, to load. Anyways, you said it stops working further than 32 blocks. The minimum render distance is 2 chunks for java and simulation, 4. The command blocks ...


0

The source of problem originates probably from the name of your mask given to yourself and the name criteria written in the nbt check. There may exists discrepancies between these two which makes the tag unsuitable for nbt checks. What I would recommend for you to do is to use the {CustomModelData:int} tag. execute as @a[nbt={Inventory:[{Slot:103b,tag:{...


0

Ginkgo's answer works perfectly, just make sure to execute the last command as the entity you are targeting. Set up the scoreboard by entering this once: scoreboard objectives add health dummy Then put the following 2 commands into repeating command blocks: execute as @e[] run execute store result score @s health run data get entity @s Health execute as @e[...


2

Target a player who died only once they've respawned by using the @e target selector instead of @a or @p and specifying [type = player] along with any other selector arguments you're using to pick the correct player (probably a tag or scoreboard value). This works because @a targets any player while @e only targets alive entities as of 1.18.1 Java Edition. ...


-1

I believe your problem is that there is newer syntax, and commands no longer require a "data" variable. So the command would be: /give @s cake 1 {CanPlaceOn:["red_nether_brick_stairs"]} compared to your command: /give @s cake 1 0 {CanPlaceOn:["red_nether_brick_stairs"]}


-1

There is a way to copy entities in minecraft using the structure block and when u want to load that specific block and entitie u can use a jigsaw block


3

I have figured out a way to counterbalance the effect of jumping but will involve predicates which could only be done with datapacks. Edit: Just saw you are already using datapacks, nevermind First create a scoreboard /scoreboard objectives add Jump custom:jump Now create a predicate JSON called "is_sprinting" with the following code: { "...


0

As far as I know, there is no way to "stop" players from mining a breakable block unless they are in adventure mode. I am not sure what you want. Are you making a prison escape game? Or that you simply need to trap people in a cell such that there is no escape at all? If it is the latter case, put a repeating command block under each cell (probably ...


Top 50 recent answers are included