Skip to main content
MC COMMANDS logoMC COMMANDS
BUILDER'S MASTERCLASS

Minecraft Commands for Building.

Transform creative construction with instant world editing commands. Master 3D coordinate grids, mass block replacement with /fill, non-destructive structure duplication with /clone, and precision placement with /setblock.

FOUNDATION CONCEPT

Mastering Minecraft Coordinates: Absolute, Relative, and Local

Every block manipulation command requires coordinate targets. Understanding the three coordinate notations prevents misplaced structures and accidental chunk damage.

100 64 -200

Absolute Coordinates

Points to a fixed, exact world location independent of where you stand. Press F3 in Java or enable Show Coordinates in Bedrock settings to view your current world position.

Example: /setblock 120 70 -45 stone
~ ~1 ~

Relative Coordinates (Tilde ~)

Offsets positions relative to where the command executor is standing. ~ means your current axis, ~5 means 5 blocks East or Up, and ~-5 means 5 blocks in the negative direction.

~ ~-1 ~ = The block directly beneath your feet.
^ ^ ^5

Local Coordinates (Caret ^)

Offsets based on the player's viewing angle (crosshair). ^Left ^Up ^Forward. If you look upwards, ^ ^ ^5 places the block 5 blocks in front of your eyes in the sky.

^ ^ ^3 = 3 blocks directly in front of crosshair.
CORE COMMAND GUIDE

The /fill Command: Mass Construction & Land Clearing

Fill creates cuboid volumes up to 32,768 blocks in a single execution.

The syntax structure for /fill is:

/fill <from: x y z> <to: x y z> <block> [replace|outline|hollow|keep|destroy] [filterBlock]

Fill Keyword Modes Explained:

replace (Default)

Replaces every block inside the defined box. If a filter block is specified (e.g. replace water), only matching blocks are swapped, leaving surrounding terrain untouched.

hollow

Fills only the outer 1-block perimeter with the designated block and turns all inner blocks into air. Essential for generating instant rooms, houses, and underground bunkers.

outline

Builds only the outer perimeter walls, floor, and ceiling, but leaves all interior blocks intact without replacing them with air.

keep

Only places blocks into air spaces. Existing terrain, ores, and player-built blocks inside the coordinates are never overwritten.

Caution: Avoiding Extreme Item Drop Lag with "destroy"

Using /fill ... air destroy breaks every block as if mined by a player, dropping thousands of floating item entities. Filling large areas with destroy can crash low-spec servers or drop FPS to 1. To clear land smoothly, always use /fill ... air replace instead.

DUPLICATION & MIGRATION

The /clone Command: Copying & Relocating Structures

Duplicate buildings, towers, or redstone contraptions across coordinates without third-party external mods.

The syntax structure for /clone requires three 3D coordinate pairs:

/clone <begin: x1 y1 z1> <end: x2 y2 z2> <destination: x y z> [maskMode] [cloneMode]

The "Minimum Coordinate Anchor" Rule:

The most common mistake when using /clone is misunderstanding where the structure pastes. In Minecraft, the destination coordinate corresponds to the lowest X, lowest Y, and lowest Z coordinate of your source bounding box (the Northwest bottom corner). It does not paste relative to your current standing position unless specified with tildes.

Mask Modes vs Clone Modes

masked

Copies only solid and functional blocks. Air blocks inside the source box are ignored, allowing you to paste structures onto uneven terrain without erasing hills.

replace

The default mode. Copies every single block, overwriting target destination blocks with air wherever air existed in the source.

move

Performs a cut-and-paste. Clones the structure to the destination and replaces the original source coordinates with air.

force

Forces the clone operation even if the source and destination overlap (e.g. nudging a bridge 2 blocks to the left).

PRACTICAL RECIPES

Ready-to-Use Builder Command Recipes

Copy and paste these verified commands directly into Minecraft chat for instant construction.

1. Instant 20x5 Stone Wall

Relative
/fill ~ ~ ~ ~20 ~5 ~ stone

Constructs a solid stone wall extending 20 blocks East and 5 blocks high from where you are currently standing.

2. 21x21 Oak Floor Platform

Floor Level
/fill ~-10 ~-1 ~-10 ~10 ~-1 ~10 oak_planks

Creates a flat 21x21 wooden platform directly beneath your feet, centered exactly around your position.

3. Clear 30x10x30 Basement

Air Replace
/fill ~-15 ~-10 ~-15 ~15 ~-1 ~15 air

Excavates a massive underground room 10 blocks deep without dropping floating item entities.

4. Hollow 15x15 Glass Box

Hollow Mode
/fill ~-7 ~ ~-7 ~7 ~10 ~7 glass hollow

Creates a hollow glass enclosure 11 blocks high with all inner blocks cleared to air automatically.

REFERENCE GUIDE

Syntax and coordinates reference.

A quick reference cheat sheet explaining target selectors, absolute coordinate grids, relative offsets, and local direction-facing grids.

Target Selectors

Minecraft uses shorthand variables called "target selectors" to target specific players or entities without writing full usernames.

@p

Nearest Player

Targets the single player closest to where the command is executed.

@a

All Players

Targets every online player in the current dimension/world.

@r

Random Player

Targets one random player (commonly used in minigames/lobbies).

@e

All Entities

Targets all living things, including players, mobs, dropped items, and item frames.

@s

Self (Executor)

Targets the entity currently running the command (useful in command blocks and chat).

Coordinate systems

Minecraft locations use a 3D grid layout represented as X Y Z coordinates (East/West, Altitude, North/South).

X Y Z

Absolute Coordinates

Specifies an exact point on the world map. 100 64 -250 means block X=100 (East), Y=64 (Sea Level elevation), Z=-250 (North).

~ ~ ~

Relative Coordinates (Tilde)

Specifies block offsets relative to the execution origin. E.g., ~ ~5 ~ represents exactly 5 blocks directly above where the command runs.

^ ^ ^

Local Coordinates (Caret)

Specifies block offsets relative to where the executing entity is currently looking (Left/Right, Up/Down, Forward/Backward). E.g., ^ ^ ^5 is 5 blocks directly in front of the executor's face.

AxisPositive Value (+)Negative Value (-)
X AxisEastward displacementWestward displacement
Y AxisUpward altitude (Sky)Downward altitude (Void)
Z AxisSouthward displacementNorthward displacement
BUILDING COMMAND DIRECTORY

Filtered building codes list

COMMAND DIRECTORY

Search and filter commands.

Items & InventoryUniversalJava 1.21.x • Bedrock 1.21.x

Gives an item to one or more players, with optional counts, metadata, and components.

Java Edition/give <targets> <item>[<components>] [<count>]
Bedrock Edition/give <player> <itemName> [amount] [data] [components]
Player ManagementUniversalJava 1.21.x • Bedrock 1.21.x

Teleports entities (players, mobs, etc.) to a specific coordinate or destination entity.

/tp <targets> <destination> | /tp <targets> <x> <y> <z> [<yRot> <xRot>]
Player ManagementUniversalJava 1.21.x • Bedrock 1.21.x

Changes the game mode of a player (Survival, Creative, Adventure, or Spectator).

/gamemode <mode> [<target>]
Entities & SpawningUniversalJava 1.21.x • Bedrock 1.21.x

Spawns a specified entity (mob, projectile, item frame, etc.) at coordinates.

Java Edition/summon <entity> [<pos>] [<nbt>]
Bedrock Edition/summon <entityType> [<spawnPos>] [<spawnEvent>] [<nameTag>]
World & EnvironmentUniversalJava 1.21.x • Bedrock 1.21.x

Sets or checks game rules (e.g. keepInventory, mobGriefing, doDaylightCycle).

/gamerule <rule> [<value>]
Player ManagementUniversalJava 1.21.x • Bedrock 1.21.x

Applies or removes status effects (speed, strength, poison, etc.) on entities.

Java Edition/effect give <targets> <effect> [<seconds>] [<amplifier>] [<hideParticles>] | /effect clear <targets> [<effect>]
Bedrock Edition/effect <player> <effect> [seconds] [amplifier] [hideParticles: Boolean] | /effect <player> clear
Advanced & DeveloperUniversalJava 1.21.x • Bedrock 1.21.x

Executes another command on behalf of one or more entities with conditional filters.

Java Edition/execute <subcommands...> run <command>
Bedrock Edition/execute <subcommands...> run <command>
World & EnvironmentUniversalJava 1.21.x • Bedrock 1.21.x

Finds the nearest structure, biome, or point of interest (POI) and prints coordinates in chat.

Java Edition/locate structure <structureID> | /locate biome <biomeID> | /locate poi <poiID>
Bedrock Edition/locate structure <structureType> | /locate biome <biome>
World & EnvironmentUniversalJava 1.21.x • Bedrock 1.21.x

Fills all or parts of a specified region with a specific block type.

Java Edition/fill <from> <to> <block>[<states>] [destroy|hollow|keep|outline|replace] [<filter>]
Bedrock Edition/fill <from> <to> <tileName> [tileData|blockStates] [replace|destroy|hollow|keep|outline] [<replaceTileName>]
World & EnvironmentUniversalJava 1.21.x • Bedrock 1.21.x

Changes a single block at specified coordinates to a new block type, with optional block state properties and replacement modes.

Java Edition/setblock <pos> <block>[<states>] [destroy|keep|replace]
Bedrock Edition/setblock <position> <tileName> [tileData|blockStates] [replace|destroy|keep]
World & EnvironmentUniversalJava 1.21.x • Bedrock 1.21.x

Duplicates or moves all blocks from a source bounding box to a destination coordinate, supporting masking filters and overlap modes.

Java Edition/clone <begin> <end> <destination> [filtered|masked|replace] [force|move|normal] [<filter>]
Bedrock Edition/clone <begin> <end> <destination> [maskMode] [cloneMode] [tileName] [tileData]
Advanced & DeveloperJavaJava 1.21.x

Inspects, modifies, merges, or removes NBT data on block entities, non-player entities, and persistent command storage.

Java Edition/data get (block|entity|storage) ... | /data merge (block|entity|storage) ... | /data modify (block|entity|storage) ... | /data remove (block|entity|storage) ...
Advanced & DeveloperUniversalJava 1.21.x • Bedrock 1.21.x

Tracks, modifies, and displays custom objectives, player scores, timers, and statistics for game logic, economy, and leaderboard systems.

Java Edition/scoreboard objectives (add|remove|list|setdisplay|modify) ... | /scoreboard players (add|set|remove|reset|get|list|operation|enable) ...
Bedrock Edition/scoreboard objectives (add|remove|list|setdisplay) ... | /scoreboard players (add|set|remove|reset|list|operation|random) ...
Player ManagementBedrockBedrock 1.21.x

Applies a screen shaking effect to players, useful for cinematics or custom maps.

Bedrock Edition/camerashake add <players> [intensity] [seconds] [shakeType] | /camerashake stop [players]
World & EnvironmentBedrockBedrock 1.21.x

Creates, lists, or removes ticking areas, forcing the game to simulate chunks even when no players are nearby.

Bedrock Edition/tickingarea add <fromX> <fromY> <fromZ> <toX> <toY> <toZ> [name] | /tickingarea add circle <x> <y> <z> <radius> [name] | /tickingarea remove <name|pos>
World & EnvironmentJavaJava 1.21.x

Forces chunks to constantly load and simulate, even if no players are nearby. Equivalent to ticking areas.

Java Edition/forceload add <fromX> <fromZ> [<toX> <toZ>] | /forceload remove <fromX> <fromZ> [<toX> <toZ>] | /forceload query [<pos>]
World & EnvironmentJavaJava 1.21.x

Controls the boundaries and size of the world border.

Java Edition/worldborder set <size> [<time>] | /worldborder center <x> <z> | /worldborder damage <buffer|amount>
Player ManagementBedrockBedrock 1.21.x

Sets character abilities (like World Builder permissions, flying, or mute) on a player.

Bedrock Edition/ability <player> <ability> [value: Boolean]
Advanced & DeveloperBedrockBedrock 1.21.x

Triggers dialogue screens or forces an NPC to display a dialogue branch to players.

Bedrock Edition/dialogue open <npc> <player> [sceneName] | /dialogue change <npc> <sceneName> [targets]
Advanced & DeveloperJavaJava 1.21.x

Creates and customizes floating boss status bars at the top of the player screen.

Java Edition/bossbar add <id> <name> | /bossbar set <id> <option> <value> | /bossbar remove <id>
OP & God ItemsUniversalJava 1.21.x • Bedrock 1.21.x

Gives a player an overpowered Netherite Sword with level 255/10 enchantments.

Java Edition/give <targets> netherite_sword[enchantments={levels:{"minecraft:sharpness":255,"minecraft:fire_aspect":10,"minecraft:looting":10,"minecraft:unbreaking":255,"minecraft:mending":1,"minecraft:sweeping_edge":3,"minecraft:knockback":5}}] [<count>]
Bedrock Edition/give <player> netherite_sword [amount]
OP & God ItemsJavaJava 1.21.x

Gives a player a stick with Knockback level 10,000, sending targets flying into the distance.

Java Edition/give <targets> stick[enchantments={levels:{"minecraft:knockback":10000}}] [<count>]
OP & God ItemsUniversalJava 1.21.x • Bedrock 1.21.x

Gives a player a Netherite Chestplate with Protection level 255 and Thorns 10, rendering the wearer practically invincible.

Java Edition/give <targets> netherite_chestplate[enchantments={levels:{"minecraft:protection":255,"minecraft:unbreaking":255,"minecraft:mending":1,"minecraft:thorns":10}}] [<count>]
Bedrock Edition/give <player> netherite_chestplate [amount]
OP & God ItemsUniversalJava 1.21.x • Bedrock 1.21.x

Gives a player a Netherite Pickaxe with Efficiency level 255, breaking blocks instantly.

Java Edition/give <targets> netherite_pickaxe[enchantments={levels:{"minecraft:efficiency":255,"minecraft:fortune":10,"minecraft:unbreaking":255,"minecraft:mending":1}}] [<count>]
Bedrock Edition/give <player> netherite_pickaxe [amount]
OP & God ItemsUniversalJava 1.21.x • Bedrock 1.21.x

Gives a player a Bow with Power level 255, Punch level 10, Flame, and Infinity.

Java Edition/give <targets> bow[enchantments={levels:{"minecraft:power":255,"minecraft:punch":10,"minecraft:flame":1,"minecraft:infinity":1,"minecraft:unbreaking":255}}] [<count>]
Bedrock Edition/give <player> bow [amount]
OP & God ItemsJavaJava 1.21.x

Gives a player a stack of custom food items (cookies) that grant Strength level 255 and Resistance level 255 for one minute.

Java Edition/give <targets> cookie[food={nutrition:20,saturation:20,effects:[{effect:{id:"minecraft:strength",amplifier:255,duration:1200}},{effect:{id:"minecraft:resistance",amplifier:255,duration:1200}}]}] [<count>]
OP & God ItemsUniversalJava 1.21.x • Bedrock 1.21.x

Gives a player a Netherite Axe with Efficiency level 255, Sharpness level 255, Looting level 10, Unbreaking level 255, and Mending.

Java Edition/give <targets> netherite_axe[enchantments={levels:{"minecraft:efficiency":255,"minecraft:sharpness":255,"minecraft:looting":10,"minecraft:unbreaking":255,"minecraft:mending":1}}] [<count>]
Bedrock Edition/give <player> netherite_axe [amount]
OP & God ItemsUniversalJava 1.21.x • Bedrock 1.21.x

Gives a player a Netherite Helmet with Protection level 255, Respiration level 3, Aqua Affinity, and Unbreaking level 255.

Java Edition/give <targets> netherite_helmet[enchantments={levels:{"minecraft:protection":255,"minecraft:respiration":3,"minecraft:aqua_affinity":1,"minecraft:unbreaking":255,"minecraft:mending":1}}] [<count>]
Bedrock Edition/give <player> netherite_helmet [amount]
OP & God ItemsUniversalJava 1.21.x • Bedrock 1.21.x

Gives a player Netherite Leggings with Protection level 255, Swift Sneak level 3, Unbreaking level 255, and Mending.

Java Edition/give <targets> netherite_leggings[enchantments={levels:{"minecraft:protection":255,"minecraft:swift_sneak":3,"minecraft:unbreaking":255,"minecraft:mending":1}}] [<count>]
Bedrock Edition/give <player> netherite_leggings [amount]
OP & God ItemsUniversalJava 1.21.x • Bedrock 1.21.x

Gives a player Netherite Boots with Protection level 255, Feather Falling level 255, Depth Strider level 3, Soul Speed level 3, Unbreaking level 255, and Mending.

Java Edition/give <targets> netherite_boots[enchantments={levels:{"minecraft:protection":255,"minecraft:feather_falling":255,"minecraft:depth_strider":3,"minecraft:soul_speed":3,"minecraft:unbreaking":255,"minecraft:mending":1}}] [<count>]
Bedrock Edition/give <player> netherite_boots [amount]
OP & God ItemsUniversalJava 1.21.x • Bedrock 1.21.x

Gives a player a Trident with Impaling level 255, Loyalty level 10, Channeling, Unbreaking level 255, and Mending.

Java Edition/give <targets> trident[enchantments={levels:{"minecraft:impaling":255,"minecraft:loyalty":10,"minecraft:channeling":1,"minecraft:unbreaking":255,"minecraft:mending":1}}] [<count>]
Bedrock Edition/give <player> trident [amount]
OP & God ItemsUniversalJava 1.21.x • Bedrock 1.21.x

Gives a player an OP God Elixir potion that grants Strength 255, Resistance 255, Regeneration 255, Speed 10, Haste 10, and more for 10 minutes.

Java Edition/give <targets> potion[potion_contents={custom_effects:[{id:"minecraft:speed",amplifier:9,duration:12000},{id:"minecraft:haste",amplifier:9,duration:12000},{id:"minecraft:strength",amplifier:255,duration:12000},{id:"minecraft:regeneration",amplifier:255,duration:12000},{id:"minecraft:resistance",amplifier:255,duration:12000},{id:"minecraft:fire_resistance",duration:12000},{id:"minecraft:water_breathing",duration:12000},{id:"minecraft:night_vision",duration:12000}],custom_name:'{"text":"OP God Elixir","color":"gold","bold":true}'}] [<count>]
Bedrock Edition/give <player> potion [amount]
Server & UtilityUniversalJava 1.21.x • Bedrock 1.21.x

Manages the server player whitelist, allowing only approved players to join the server.

/whitelist <add|remove> <player> | /whitelist <on|off|list|reload>
Server & UtilityUniversalJava 1.21.x • Bedrock 1.21.x

Disconnects a specified player from the server immediately, optionally displaying a reason.

/kick <player> [reason]
Server & UtilityUniversalJava 1.21.x • Bedrock 1.21.x

Adds a player to the server's blacklist (ban list), preventing them from reconnecting.

/ban <player> [reason]
Server & UtilityUniversalJava 1.21.x • Bedrock 1.21.x

Removes a player from the server's ban list, permitting them to join the server again.

/pardon <player>
Advanced & DeveloperUniversalJava 1.21.x • Bedrock 1.21.x

Reloads all data packs, functions, advancements, and loot tables from disk.

/reload
Advanced & DeveloperJavaJava 1.21.x

Controls the server tick rate and flow, allowing developers to freeze, step, or sprint game execution for diagnostic testing.

Java Edition/tick rate <rate> | /tick freeze | /tick step <time> | /tick query
Advanced & DeveloperJavaJava 1.21.x

Starts or stops recording performance metrics, generating a diagnostic ZIP report in the server's debug folder.

Java Edition/perf start | /perf stop
Advanced & DeveloperJavaJava 1.21.x

Manages the server's loaded data packs, allowing creators to dynamically enable, disable, and order them.

Java Edition/datapack enable <name> [first|last|before|after] | /datapack disable <name> | /datapack list
Server & UtilityUniversalJava 1.21.x • Bedrock 1.21.x

Forces the server to save all pending chunks, player profiles, and world data to disk immediately.

/save-all [flush]
Advanced & DeveloperUniversalJava 1.21.x • Bedrock 1.21.x

Runs a function script file (.mcfunction) containing a sequence of commands in a single game tick.

/function <name>
OP & God ItemsUniversalJava 1.21.x • Bedrock 1.21.x

Generates overpowered 32k God weapons, armor, tools, and custom potion elixirs.

Java Edition/give <targets> <item>[enchantments={levels:{...}}] [<count>]
Bedrock Edition/give <player> <itemName> [amount]
Advertisement