We’re rewarding the question askers & reputations are being recalculated! Read more.
7

It's a but unfortunate, but Minecraft actually sees "100" as a valid username. Where you wrote it, you need a name, which can also be a dummy player. You need to assign that dummy player or entity the value 100 in some scoreboard and then you can use that for operations.


6

As far as I know, there is no way to directly generate a random number using commands, and there definitely isn't any way to then plug that random number into another command block. However, the spreadplayers command will do what you're after here. spreadplayers is designed to place groups of, or individual players, in random spots around the map. The ...


3

It's saved in NBT. Quote from the Minecraft wiki (archive): Dimension: The dimension the player is in. -1 is the Nether, 0 is the Overworld, 1 is the End. Alternatively, you could still use /execute in, but also check for a radius of 0 or more (which sounds useless, but can be used as a dimension check: /execute in the_nether if entity @a[distance=0..] ...


3

Your commmands avoid replacing and placing items in the armorstand inventory (Removing shouldn't work but it does for some odd reason). All you should change is the Disable slot number to 2039583 This link sends you to a great armorstand generator. Edit2: I got this one working for some odd reason. /summon armor_stand ~ ~ ~ {NoGravity:1b,ShowArms:1,...


3

It is possible for you to turn on /gamerule keepInventory true in the Nether, you must go there first before entering the command and it should, in theory, only apply that gamerule to the Nether, similarly with the End. If you're working with Vanilla, there is no basic solution to having mob griefing off in a specific area. You can try looking for some ...


3

You can detect if it's raining or clear by using armorstands. However, there is no way to precisly check if a storm is happening. The closest i've seen is using redstone in which it won't detect in a certain time of the day. Either way, the way you want to detect it is to ,firstly, create a scoreboard, in this case, called rain: /scoreboard objectives add ...


2

The Age tag represents how many ticks the mob has until it grows up (if it's a baby) or how many ticks until it can breed (if it's an adult). Therefore, baby foxes can have any less than 0, not just -1. As you cannot directly check if an NBT tag is greater/less than a value, you need to store the Age in a scoreboard first: /scoreboard objectives add age ...


2

You can make mobs drop no drops when getting killed by doing: /gamerule doMobLoot false That way mobs don't drop anything when getting killed but your players can't get any mobdrops either. Hopefully this is what you want.


2

The only thing you are missing is the positioned part. It will work from a certain position and it can be an entity, coordinate or relative coordinate. Thus, it will look like this: /execute positioned ~ ~ ~ run execute as @a[team=Player01,distance=..1] run [Rest of the command here] Simply change "~ ~ ~" to your desired relative coordinates. Altough, it ...


2

The first command doesn't always work because it's selecting a box that extends 300 blocks in the x, y, and z directions from your current location. If there's no villager in that box, they're not going to be teleported. You shouldn't be using the dx, dy, and dz selector arguments without the z, y, and z selectors in most cases anyway. This kind of ...


2

/give @p chest{BlockEntityTag:{LootTable:"custom_namespace:loot_table.json"}} or /setblock ~ ~ ~ chest{LootTable:"custom_namespace:loot_table.json"} .minecraft/saves/nameOfWorld/datapacks/datapack_name/data/custom_namespace/loot_tables Loot Table Generator for Minecraft You need to create a custom namespace for your loot table (the above assumes its ...


2

I have found a way to detect thunderstorms. But it has to depend on a block, the daylight detector, and it only works if the power level of the daylight detector is above two. It only works between sunrise to sunset Start by creating a scoreboard called time and thunder: /scoreboard objectives add time dummy /scoreboard objectives add thunder dummy ...


1

First, create a scorebaord called "y". /scoreboard objectives add y dummy Then, the following commands are: /execute as @e[tag=test1,type=!player] store result score @s y run data get entity @s Pos[1] /kill @e[scores={y=65}] The first one will give the score to the Potions acording to their Y axis and the second one will kill every entity that has their ...


1

First, add a tag to the teams' players: tag player add tag Then, target other players within the enemies' base: effect @a[tag=!tag,dx=10,dy=10,dz=10,x=0,y=0,z=0] minecraft:mining_fatigue 1 225 Should theoretically work (the values 10 and 0 in the dx, dy, dz, x, y and z values are example coords of the enemies' base corner coordinates)


1

There are multiple solutions, the easiest is to check if no player does not fulfill the condition: /execute unless entity @a[scores={avance=1..}] unless entity @a[scores={avance=..-1}] You can also add limit=1 to both of these selectors to improve performance. Thanks to vdvman1 for this tip.


1

You're putting everyone from one team into another team and then from that other team back into the first team. The result is that everyone ends up in the first team. You need to put everyone from team A into a temporary team C, then everyone from team B Into team A, then everyone from team C into team B.


1

Use this command: /give @s fox_spawn_egg{tag:{EntityTag:{Type:snow}}}


1

This is taken from this post (archive). You can store all the player's y-level in a scoreboard: /scorebaord objectives add dummy y Then set the scoreboard values to the players' y-level (put this in a repeating command block): execute as @a store result score @s y run data get entity @s Pos[1] Finally, put this in another repeating command block to ...


1

The Id tag is for the UUID of the player: Id: UUID of owner. Optional. Used to update the other tags when the chunk loads or the holder logs in, in case the owner's name has changed. from the wiki What you want is Name: Name: Username of owner. If missing or empty, the head appears as a Steve head. Otherwise, used to store or retrieve the downloaded ...


1

You can solve this problem using scoreboards. In an impulse command block put this command: /scoreboard objectives add playercount dummy "playercounter" Then connect 4 chain command blocks set to always active, in the first one put this command: /execute as @a run scoreboard players add x playercount 1 ...


1

This is a known bug that has existed for a long time. It is fixed in the current snapshots, so if you are already playing 1.13.x or 1.14.x, I recommend you to update to the snapshots, they are generally better than the "stable" versions before them.


Only top voted, non community-wiki answers of a minimum length are eligible