your current location:首页 > news>Minecraft conditional subcommand entity introduction

Minecraft conditional subcommand entity introduction

2024-11-30 20:48:41|Myriagame |source:minecraft skins

Minecraft conditional subcommand entity many players want to know, Minecraft has a very high degree of freedom, various versions are also continuously updated, many players like this game. Let's take a look at the Minecraftexecute conditional subcommand entity introduction.

Minecraft conditional subcommand entity introduction
Minecraft conditional subcommand entity introduction
entity

Check whether one or more specific entities exist

Format: if/unless entity <target entity>

Explanation:

The entity parameter is equivalent to the testfor command before 1.13. It is usually not used alone, but with some specific tags. For example:

/execute if entity @e[name="Pineapple",distance=..3] run give @a minecraft:diamond 2

If the distance between "Pineapple" and the command executor is less than 3 squares when the command is executed, then give all players 2 diamonds.