Trong thế giới vô tận của Minecraft, nơi sự sáng tạo không có giới hạn, việc nắm vững lệnh của Minecraft (Informational) là chìa khóa vàng để mở ra những trải nghiệm chơi game vượt trội, từ việc quản trị server chuyên nghiệp, tạo map adventure phức tạp, đến đơn giản là “hack” thời tiết, truyền tống hay thay đổi chế độ chơi chỉ trong tích tắc. Bài viết này được thiết kế như một bộ百科 toàn thư (encyclopedia) chi tiết, đi sâu vào từng nhóm lệnh, cú pháp, đối số (arguments) và các mẹo thực chiến, giúp bạn biến mình từ một người chơi bình thường thành một “Command Master” thực thụ.
Phần 1: Nền Tảng Kiến Thức – Hiểu Về Hệ Thống Lệnh (Command System)
Trước khi liệt kê hàng trăm lệnh, bạn cần hiểu cơ chế hoạt động của chúng. Kiến thức nền tảng này giúp bạn tự sửa lỗi (debug) và sáng tạo lệnh mới mà không cần tra Google liên tục.
1.1. Cách Mở Console Chat Và Gõ Lệnh
- Singleplayer (Đơn người): Mở Chat (phím mặc định
Thoặc/). Gõ/theo sau là tên lệnh. Lưu ý: Cheats phải được bật (Allow Cheats: ON) khi tạo thế giới hoặc mở LAN -> Allow Cheats. - Multiplayer (Server/Realm): Chỉ người có quyền Operator (OP) hoặc quyền hạn cụ thể (Permission nodes) mới dùng được hầu hết các lệnh quản trị.
- Command Block: Dùng để tự động hóa. Cần OP để đặt và chỉnh sửa (
/give @p command_block).
1.2. Cấu Trúc Cú Pháp Chuẩn (Syntax)
Minecraft sử dụng cấu trúc: /<tên_lệnh> <đối_số_1> <đối_số_2> ...
Tham số bắt buộc (Required): Nằm trong ngoặc nhọn < >. Thiếu sẽ báo lỗi syntax.
Tham số tùy chọn (Optional): Nằm trong ngoặc vuông . Có thể bỏ qua.
Ký hiệu |: Có nghĩa là “HOẶC”. Ví dụ: <survival|creative|adventure|spectator> nghĩa là chọn 1 trong 4.
1.3. Bộ Chọn Mục Tiêu (Target Selectors) – Trái Tim Của Lệnh
Đây là phần quan trọng nhất phân biệt người chơi mới và cao cấp. Thay vì gõ tên người chơi cụ thể, bạn dùng các biến:
@p – Nearest Player: Người chơi gần nhất (thường dùng cho Command Block).
@a – All Players: Tất cả người chơi trên server/thế giới.
@r – Random Player: Ngẫu nhiên một người chơi.
@e – All Entities: Tất cả thực thể (Player, Mob, Item drop, Arrow, Armor Stand, Minecart, v.v.). Rất mạnh khi kết hợp filter.
@s – Self (Entity executing): Thực thể đang thực thi lệnh (dùng trong function/loop/command block chuỗi).
1.3.1. Bộ Lọc Nâng Cao (Target Selector Arguments) – key=value
Đặt ngay sau selector trong ngoặc vuông. Ví dụ: @etype=zombie,distance=..10,name="Boss"
type=<entity_id>: Loại thực thể (minecraft:zombie, minecraft:diamond_sword, minecraft:armor_stand). Dùng ! để loại trừ: type=!player.
distance=<range>: Khoảng cách từ người thực thi.
..10 = ≤ 10 block.
5.. = ≥ 5 block.
5..10 = từ 5 đến 10 block.
name="<tên>": Tên hiển thị (Custom Name). Hỗ trợ wildcard .
tag=<tag_name>: Tag dữ liệu (Data Tag). Cực kỳ quan trọng để phân biệt entity mà không cần tên. Ví dụ: tag=boss_minion.
scores={<objective>=<range>}: Lọc theo điểm số (Scoreboard).
nbt={...}: Lọc theo dữ liệu NBT phức tạp (Chỉ Java Edition).
limit=<số lượng>: Giới hạn số lượng kết quả (mặc định @p=1, @a/@e=unlimited). @elimit=1,sort=nearest tương đương @p.
sort=<nearest|furthest|random|arbitrary>: Sắp xếp thứ tự chọn.
1.4. Hệ Thống Tọa Độ (Coordinate System)

Có thể bạn quan tâm: Hướng Dẫn Chi Tiết Lệnh Command Block Xây Nhà Minecraft Pe: Tự Động Hóa Quá Trình Xây Dựng Từ A-z
- Tuyệt đối (Absolute):
100 64 -200. Vị trí cố định trên thế giới. - Tương đối (Relative):
~ ~ ~. Dấu~nghĩa là “vị trí hiện tại của người thực thi”.~10 ~ ~-5: X+10, Y không đổi, Z-5 so với vị trí hiện tại.
- Tương đối cục bộ (Local Relative):
^ ^ ^. Dựa trên hướng nhìn của thực thể.^ ^ ^5: 5 block phía trước mặt (dù bạn xoay người).^ ^1.62 ^: Vị trí mắt người chơi (chiều cao chuẩn).
Phần 2: Danh Sách Lệnh Cốt Lõi (Core Commands) – Phân Loại Chức Năng
Chúng ta sẽ đi qua các nhóm lệnh thiết yếu, kèm ví dụ thực tế.
Nhóm 1: Lệnh Thông Tin & Trợ Giúp (Informational & Help) – Trung tâm từ khóa “Informational”
Đây là nhóm lệnh giúp bạn tra cứu kiến thức trong game mà không cần alt-tab ra wiki.
/help <command>
- Chức năng: Hiển thị danh sách lệnh hoặc cú pháp chi tiết của một lệnh.
- Ví dụ:
/help give-> Hiển thị cú pháp đầy đủ của/give. - Mẹo: Gõ
/rồi nhấnTabđể autocomplete, nhanh hơn/help.
/seed
- Chức năng: Hiển thị Seed (hạt giống) của thế giới hiện tại.
- Yêu cầu: Cần quyền OP level 2 (Singleplayer cần bật Cheats).
- Ứng dụng: Chia sẻ seed cho bạn bè, tạo lại thế giới y hệt, tìm cấu trúc (Structure) qua công cụ như Chunkbase.
/list <uuid>
- Chức năng: Liệt kê người chơi đang online.
- Tham số
uuid: Hiển thị thêm UUID (Universally Unique Identifier) – định danh duy nhất không đổi dù đổi tên.
/scoreboard objectives list / /scoreboard players list
- Chức năng: Xem danh sách các Objective (mục tiêu) và người chơi có điểm trên Scoreboard. Rất quan trọng để debug hệ thống điểm số/map adventure.
/data get <block|entity|storage> <target> <path> scale
- Chức năng (Chỉ Java Edition): Công cụ “Informational” mạnh nhất cho Map Maker/Dev. Cho phép đọc dữ liệu NBT thô của Block, Entity hoặc Storage.
- Ví dụ:
/data get block ~ ~-1 ~-> Xem dữ liệu block dưới chân (Chest, Hopper, Command Block…)./data get entity @s Inventory-> Xem toàn bộ túi đồ của bạn (kể cả slot offhand, armor, ender chest)./data get entity @etype=villager,limit=1,sort=nearest VillagerData-> Xem nghề nghiệp, level trade của Villager gần nhất.
- Ứng dụng: Debug tại sao hopper không hút item, villager không trade, kiểm tra attribute (máu, sát thương, tốc độ) của mob custom.
/debug report
- Tạo file báo cáo hiệu năng (lag report) tại thư mục
debugcủa thế giới. Dùng cho admin server tìm nguyên nhân lag.
/datapack list <enabled|disabled|available>
- Kiểm tra datapack nào đang load, bị disable hoặc có sẵn. Cần thiết khi cài nhiều datapack xung đột.
Nhóm 2: Lệnh Quản Trị & Gameplay Cơ Bản (Administration & Gameplay)
/gamemode <mode> targets
- Mode:
survival(0),creative(1),adventure(2),spectator(3). - Ví dụ:
/gamemode creative @atag=builder-> Chuyển tất cả builder sang Creative.
/difficulty <level>
peaceful,easy,normal,hard. Thay đổi độ khó toàn server/thế giới ngay lập tức.
/time <set|add|query> <value>
set day/set night/set noon/set midnight/set <number>(ticks, 24000 ticks = 1 ngày).add 1000-> Tăng thời gian.query daytime/query gametime/query day-> Informational: Xem thời gian hiện tại (ticks, ngày).
/weather <clear|rain|thunder> duration
- Điều khiển thời tiết.
durationtính bằng giây (mặc định random).
/gamerule <rule> <value>
- Cực kỳ quan trọng: Thay đổi quy tắc cốt lõi của game mà không cần mod.
- Các rule “Informational”/Hay dùng:
keepInventory true/false: Giữ đồ khi chết.doMobSpawning true/false: Tắt/bật spawn mob tự nhiên (tốt cho map adventure/server minigame).doFireTick true/false: Lửa có lan không.doMobLoot true/false: Mob có drop loot không.doTileDrops true/false: Block có drop item khi phá không.commandBlockOutput true/false: Có hiển thị output lệnh trong chat cho OP không (tắt để giảm lag chat).sendCommandFeedback true/false: Tương tự nhưng cho người thực thi.logAdminCommands true/false: Ghi log lệnh admin ra file server.log.maxCommandChainLength <int>: Giới hạn chuỗi command block (mặc định 65536).randomTickSpeed <int>: Tốc độ random tick (mặc định 3 Java / 1 Bedrock). Tăng lên -> cây lớn nhanh, lửa lan nhanh, nhưng gây lag.
/spawnpoint <targets> <pos> angle
- Đặt điểm hồi sinh. Dùng
/setworldspawncho điểm spawn toàn server.
/effect <give|clear> <targets> <effect> seconds amplifier hideParticles
- Cho/hủy hiệu ứng status effect.
- Effect IDs:
minecraft:speed,strength,invisibility,night_vision,health_boost,absorption,levitation,slow_falling,conduit_power,darkness(1.19+),trial_omen/raid_omen(1.21+). hideParticles true: Ẩn hiệu ứng bong bóng (dùng cho map adventure/custom item).
/enchant <targets> <enchantment> level
- Chăm đồ trực tiếp cho item đang cầm tay. Vượt qua giới hạn level vanilla (vd: Sharpness 1000) nhưng có thể gây lag/crash nếu quá cao.
/experience <add|query|set> <targets> <amount> levels|points
- Quản lý XP.
levels= cấp độ (xanh lá),points= tiến độ trong cấp độ hiện tại.
Nhóm 3: Lệnh Vật Phẩm & Kho Đồ (Items & Inventory) – “Kho Báu Vô Tận”
/give <targets> <item> count nbt
- Lệnh nổi tiếng nhất. Cú pháp NBT (Java Edition) cho phép tạo Custom Item siêu thực.
- Cấu trúc NBT cơ bản:
{display:{Name:'{"text":"Tên Item","color":"gold","italic":false}',Lore:'{"text":"Dòng mô tả 1","color":"gray"}','{"text":"Dòng 2","color":"red"}'},Enchantments:{id:"minecraft:sharpness",lvl:10s},{id:"minecraft:unbreaking",lvl:3s},AttributeModifiers:{AttributeName:"generic.attack_damage",Name:"generic.attack_damage",Amount:20,Operation:0,UUID:I;1,2,3,4,Slot:"mainhand"},Damage:0,CustomModelData:12345} - Giải thích nâng cao:
display.Name: Tên hiển thị (JSON Text Component).display.Lore: Chú thích (mảng string JSON).Enchantments: Mảng enchant.lvldùngs(short) hoặc không chữ số.AttributeModifiers: Thay đổi chỉ số người chơi khi cầm/trang bị. Operation: 0=Add, 1=Multiply Base, 2=Multiply Total. UUID phải duy nhất (dùng generator online). Slot:mainhand,offhand,feet,legs,chest,head.CustomModelData: Quan trọng cho Resource Pack. Cho phép model/item texture tùy chỉnh dựa trên số này.Damage: Độ bền đã hao mòn.CanPlaceOn,CanDestroy: Dùng cho Adventure mode (mảng string block ID).
- Ví dụ thực chiến (Kiếm One-Hit Kill):
/give @p netherite_sword{display:{Name:'{"text":"§cThần Kiếm §r§lVô Địch","italic":false}'},Enchantments:{id:"minecraft:sharpness",lvl:1000s},{id:"minecraft:fire_aspect",lvl:2s},{id:"minecraft:looting",lvl:3s},{id:"minecraft:unbreaking",lvl:10s},{id:"minecraft:mending",lvl:1s},AttributeModifiers:{AttributeName:"generic.attack_damage",Name:"generic.attack_damage",Amount:1000,Operation:0,UUID:I;1,1,1,1,Slot:"mainhand"},{AttributeName:"generic.attack_speed",Name:"generic.attack_speed",Amount:10,Operation:0,UUID:I;2,2,2,2,Slot:"mainhand"},Unbreakable:1b,CustomModelData:1001} 1
/clear <targets> item maxCount
- Xóa item khỏi túi đồ. Rất hay dùng để xóa item cấm (hacked item) hoặc dọn rác.
/clear @a minecraft:diamond-> Xóa tất cả kim cương của mọi người.
/replaceitem <block|entity> <target> <slot> <item> count nbt
- Thay đổi item trong slot cụ thể (túi đồ, rương, hopper, slot trang bị).
- Slot IDs:
container.0->container.53(túi đồ + crafting),hotbar.0->hotbar.8,weapon.mainhand,weapon.offhand,armor.feet,armor.legs,armor.chest,armor.head,horse.saddle,horse.chest,villager.0->villager.7. - Ví dụ:
/replaceitem entity @p weapon.mainhand minecraft:shield-> Cho khiên vào tay trái ngay lập tức.
/item replace ... (Phiên bản 1.17+ Java, thay thế replaceitem)
- Cú pháp mới nhất, thống nhất cho block/entity.
/item replace entity @p weapon.mainhand with minecraft:diamond_sword.
Nhóm 4: Lệnh Teleport & Di Chuyển (Teleportation & Movement)
/tp <destination> hoặc /tp <targets> <destination> hoặc /tp <targets> <location> facing <facingLocation/entity>
- Teleport cơ bản:
/tp @p 100 64 100. - Teleport người khác đến mình:
/tp @atag=target @s. - Teleport xoay hướng (Facing):
/tp @p ~ ~ ~ facing 100 64 200-> Nhìn về tọa độ./tp @p ~ ~ ~ facing entity @etype=ender_dragon,limit=1 eyes-> Nhìn thẳng vào mắt Ender Dragon.
- Teleport giữa chiều (Dimension – Java 1.13+):
/execute in minecraft:the_nether run tp @p 0 100 0-> Dùng/execute in <dimension>để chuyển chiều an toàn.
/spreadplayers <center> <spreadDistance> <maxRange> <respectTeams> <targets>
- Rải ngẫu nhiên người chơi trong bán kính. Dùng cho minigame (Hunger Games, UHC).
respectTeams true: Giữ team ở gần nhau.
Nhóm 5: Lệnh Thay Đổi Thế Giới & Cấu Trúc (World Editing & Structures) – “Bàn Tay Thần”
Đây là nơi Command Block/Function thể hiện sức mạnh nhất, thay thế WorldEdit mod ở mức độ cơ bản.
/setblock <pos> <block> destroy|keep|replace nbt
- Đặt 1 block duy nhất.
destroy: Phá block cũ drop item (như survival).keep: Chỉ đặt nếu block cũ là air.replace(mặc định): Thay thế block cũ, không drop item.- Ví dụ NBT:
/setblock ~ ~ ~ chest{facing:north,Items:{id:"minecraft:diamond",Count:64b,Slot:0b},Lock:"SecretKey"}-> Rương khóa, chỉ mở bằng item tên “SecretKey”, có sẵn kim cương.
/fill <from> <to> <block> destroy|keep|replace|hollow|outline filter
- Điền khối lượng lớn block.
hollow: Chỉ vỏ ngoài (bên trong thành air).outline: Chỉ viền (không có mặt trong).replace <block_to_replace>: Chỉ thay thế block cụ thể. Ví dụ:/fill ~-10 ~-5 ~-10 ~10 ~5 ~10 minecraft:air replace minecraft:stone-> Xóa toàn bộ stone trong vùng, giữ lại dirt, air, ore…- Lưu ý: Giới hạn 32,768 block/lệnh (Java). Vùng lớn hơn -> Chia nhỏ hoặc dùng Function/Structure Block.
/clone <begin> <end> <destination> masked|normal force|move
- Copy/paste cấu trúc.
masked: Không copy block air (giữ nguyên đích).move: Di chuyển (xóa nguồn sau khi copy).
/structure <save|load|delete> <name> pos size mirror rotation integrity seed
- Hệ thống Structure Block tích hợp (Java 1.10+ / Bedrock).
save: Lưu cấu trúc tại vị trí thành file.nbttrong thư mụcgenerated/minecraft/structurescủa world save.load: Tải cấu trúc đó ra vị trí mới. Hỗ trợmirror(left_right, front_back),rotation(none, 90, 180, 270),integrity(0.0 – 1.0, % block giữ lại),seed(random seed cho integrity).- Ứng dụng: Tạo dungeon ngẫu nhiên, spawn boss arena, generate village custom.
/fillbiome <from> <to> <biome> (1.20+)
- Thay đổi biome (vực sinh thái) trong vùng. Ảnh hưởng đến mob spawn, màu cỏ/nước, thời tiết, âm thanh.
Nhóm 6: Lệnh Thực Thể & Mob (Entity & Mob Manipulation)
/summon <entity_type> <pos> <nbt>
- Spawn mob/entity với dữ liệu tùy chỉnh (Custom Mob).
- Ví dụ Zombie “Boss” đầy đủ:
mcfunction /summon zombie ~ ~1 ~ { CustomName:'{"text":"§c§lZombie King","italic":false}', CustomNameVisible:1b, Health:200.0f, MaxHealth:200.0f, Attributes: {Name:"generic.max_health",Base:200}, {Name:"generic.attack_damage",Base:15}, {Name:"generic.knockback_resistance",Base:1.0}, {Name:"generic.movement_speed",Base:0.3}, {Name:"generic.armor",Base:10}, {Name:"generic.armor_toughness",Base:5} , HandItems: {id:"minecraft:netherite_sword",Count:1b,tag:{Enchantments:{id:"minecraft:sharpness",lvl:5s},{id:"minecraft:fire_aspect",lvl:2s}}}, {id:"minecraft:shield",Count:1b} , ArmorItems: {id:"minecraft:netherite_boots",Count:1b,tag:{Enchantments:{id:"minecraft:protection",lvl:4s},{id:"minecraft:feather_falling",lvl:4s}}}, {id:"minecraft:netherite_leggings",Count:1b,tag:{Enchantments:{id:"minecraft:protection",lvl:4s}}}, {id:"minecraft:netherite_chestplate",Count:1b,tag:{Enchantments:{id:"minecraft:protection",lvl:4s}}}, {id:"minecraft:netherite_helmet",Count:1b,tag:{Enchantments:{id:"minecraft:protection",lvl:4s},{id:"minecraft:respiration",lvl:3s}}} , ActiveEffects: {Id:10b,Amplifier:1,Duration:999999,ShowParticles:0b}, // Speed 2 {Id:11b,Amplifier:0,Duration:999999,ShowParticles:0b}, // Strength 1 {Id:23b,Amplifier:0,Duration:999999,ShowParticles:0b} // Fire Resistance , Tags:"boss","zombie_king", PersistenceRequired:1b, // Không despawn CanPickUpLoot:0b } - Giải thích NBT quan trọng:
Attributes: Ghi đè chỉ số cơ bản (máu, sát thương, tốc độ, giáp, knockback resistance).HandItems/ArmorItems: Mảng 2 phần tử (Mainhand, Offhand) và 4 phần tử (Boots, Leggings, Chest, Helmet). Tag NBT bên trong item áp dụng enchant/durability.ActiveEffects: Hiệu ứng vĩnh viễn (Duration lớn, ShowParticles:0b).Tags: QUAN TRỌNG NHẤT. Dùng để@etag=bosschọn chính xác con này sau này để kill, tp, effect…PersistenceRequired: Không bị xóa khi player đi xa (giống Name Tag).
/kill <targets>
- Giết entity.
/kill @etype=itemdọn item rơi (giảm lag)./kill @etag=bossgiết boss cụ thể.
/ride <target> mount <vehicle> / /ride <target> dismount (1.19.4+)
- Cho entity cưỡi entity khác. Tạo spider jockey, chicken jockey custom, hoặc xe tăng (player cưỡi minecart cưỡi pig…).
/damage <target> <amount> <damage_type> at <location>
- Gây sát thương thuần túy, bỏ qua giáp (tùy damage_type).
damage_type:minecraft:magic,minecraft:fire,minecraft:explosion,minecraft:player_attack… (Xem registrydamage_type).- Dùng cho custom skill, trap map adventure.
/attribute <target> <attribute> <get|base_set|modifier_add|modifier_remove> ...
- Thay đổi thuộc tính (Attribute) realtime mà không cần summon lại.
- Ví dụ:
/attribute @p generic.max_health base_set 40-> Set máu tối đa 20 tim. /attribute @p generic.attack_damage modifier add UUID "Tên Modifier" 10 add-> Tăng 10 sát thương.
Nhóm 7: Lệnh Nâng Cao – /execute (Trái Tim Của Automation)
Nếu chỉ học 1 lệnh nâng cao, hãy học /execute. Nó cho phép: Thay đổi người thực thi, vị trí, chiều, điều kiện, lưu kết quả, chạy lệnh khác.

Có thể bạn quan tâm: Hướng Dẫn Toàn Diện Về Lệnh Command Block Trong Minecraft: Từ Cơ Bản Đến Nâng Cao
Cấu trúc: /execute <subcommand1> <args> <subcommand2> <args> ... run <command>
Các Subcommand phổ biến:
as <targets>: Thay đổi “ai” thực thi lệnh (@strở thành targets này). Không thay đổi vị trí.at <targets>: Thay đổi “vị trí, chiều, góc xoay” thực thi thành của targets.@skhông đổi.positioned <pos>/positioned as <targets>: Đặt vị trí thực thi.rotated <yRot> <xRot>/rotated as <targets>: Đặt góc xoay.in <dimension>: Thay đổi chiều thực thi (overworld, the_nether, the_end).anchored <eyes|feet>: Neo vị trí tại mắt hay chân (quan trọng cho^ ^ ^).if <condition>/unless <condition>: ĐIỀU KIỆN (IF/ELSE). Chỉ chạyrun ...nếu điều kiện đúng/sai.block <pos> <block_id>: Kiểm tra block.blocks <start> <end> <destination> masked|all: So sánh 2 vùng block.entity <targets>: Kiểm tra entity tồn tại.score <target> <objective> <range>/matches <range>: Kiểm tra scoreboard.data <block|entity|storage> <target> <path> <value>: Kiểm tra NBT.predicate <predicate_id>: Kiểm tra predicate (file json trong datapack).
store result|success <target> <path> <type> <scale>: LƯU KẾT QUẢ.result: Lưu giá trị return của lệnh cuối (vd: số item, tọa độ).success: Lưu 0 hoặc 1 (thành công/thất bại).- Lưu vào:
block <pos> <nbt_path>,entity <targets> <nbt_path>,score <target> <objective>,storage <storage_id> <nbt_path>.
run <command>: Lệnh sẽ được chạy sau tất cả subcommand trên.
Ví dụ “Thần Thoại” Của /execute:
1. Tự động ném TNT khi ném Diamond (Simple Physics):
/execute as @etype=item,nbt={Item:{id:"minecraft:diamond"}} at @s if block ~ ~-1 ~ minecraft:tnt run summon tnt ~ ~ ~ {Fuse:0s}
Giải thích: Với mỗi item diamond trên đất (as), tại vị trí nó (at), nếu block dưới chân là TNT (if block), thì summon TNT nổ ngay (run).
2. Detect Player Cầm Cụ Thể Cụ Thể -> Cho Effect (Custom Weapon Mechanic):
/execute as @a store result score @s HeldItem run data get entity @s SelectedItem.id
/execute as @a if score @s HeldItem matches 1001..1001 run effect give @s minecraft:strength 1 1 true
Cách hiện đại hơn (1.20.5+): Dùng components hoặc predicate. Cách cũ dùng SelectedItem.id trả về số ID (numeric ID) – đã deprecated, nên dùng components hoặc check NBT tag CustomModelData.
Cách check CustomModelData chuẩn (1.20.5+):
/execute as @a if entity @snbt={SelectedItem:{components:{"minecraft:custom_model_data":1001}}} run effect give @s minecraft:strength 1 1 true
Hoặc dùng Predicate (Best Practice cho Datapack).
3. Particle Theo Đuôi Tên Lửa (Trailing Particle):
/execute as @etype=arrow,nbt={inGround:0b} at @s anchored eyes run particle minecraft:flame ^ ^ ^1 0 0 0 0.01 10 force
Chạy particle ở vị trí mũi tên (anchored eyes + ^ ^ ^1) cho tất cả tên lửa đang bay.
4. Lưu Số Lượng Mob Sống Vào Scoreboard (Đếm Mob):
/execute store result score ZombieCount Global run execute if entity @etype=zombie,tag=spawned run data get entity @etype=zombie,tag=spawned,limit=1 UUID
Cách tốt hơn: /execute store result score ZombieCount Global run execute as @etype=zombie,tag=spawned run scoreboard players add @s dummy 1 (Cần setup scoreboard dummy trước). Hoặc đơn giản:
/execute store result score ZombieCount Global run data get entity @etype=zombie,tag=spawned UUID 1 -> Không chính xác.
Cách chuẩn: Setup /scoreboard objectives add ZombieCount dummy. Sau đó loop: /execute as @etype=zombie,tag=spawned run scoreboard players add Global ZombieCount 1. Reset trước khi loop.
Nhóm 8: Hệ Thống Điểm Số (Scoreboard) – “Bộ Não” Của Map/Minigame
Scoreboard cho phép lưu trữ trạng thái, logic toán học, timer, leaderboard.
/scoreboard objectives add <name> <criteria> displayName
- Criteria quan trọng:
dummy: Chỉ thay đổi bằng lệnh (dùng cho timer, state, custom counter).trigger: Cho phép người chơi KHÔNG OP thay đổi điểm của chính họ (/trigger <name> add|set <value>). CỰC KỲ QUAN TRỌNG cho GUI/Menu player.deathCount,playerKillCount,totalKillCount: Tự động tăng.minecraft.custom:minecraft.<action>: Thống kê vanilla (vd:minecraft.custom:minecraft.walk_one_cm,minecraft.broken:minecraft.diamond_ore,minecraft.killed:minecraft.zombie).minecraft.used:minecraft.diamond_sword: Số lần dùng item.
/scoreboard objectives setdisplay <slot> <objective> ascending|descending
sidebar,sidebar.team.<color>,belowName,list(tab player list).
/scoreboard players <get|set|add|remove|reset|enable|operation> <targets> <objective> value
operation <target> <op> <source> <source_obj>: Toán học trên Scoreboard.+=,-=,=,/=,%=,=,<,>,swap.- Ví dụ:
scoreboard players operation @p Money += @p Income-> Cộng thu nhập vào tiền.
/trigger <objective> <add|set> <value>
- Lệnh DUY NHẤT non-OP có thể dùng để tương tác với Scoreboard.
- Yêu cầu: Objective phải là
triggervà player phải/scoreboard players enable @s <objective>(thường làm trong functionloadhoặc tick).
Nhóm 9: Lệnh Phát Triển & Debug (Development & Debugging) – Dành Cho Map Maker/Dev
/function <name> (if|unless) <condition> with as <targets> at <targets> anchored <eyes|feet> positioned <pos> rotated <rot> in <dimension>
- Chạy một file
.mcfunction(trong datapack). with: Giữ context (execution context) của lệnh gọi function (position, rotation, anchor, dimension, @s).- Best Practice: Luôn viết logic phức tạp vào
.mcfunctionfiles trong Datapack (data/<namespace>/functions/). Dùng/reloadđể nạp lại thay đổi code mà không cần restart server/game.
/schedule function <name> <time> append|replace
- Lên lịch chạy function sau
<time>(tickst, secondss, daysd). append: Thêm vào hàng đợi (chạy nhiều lần nếu gọi nhiều lần).replace: Ghi đè lịch cũ (chỉ chạy 1 lần cuối cùng).
/reload
- Nạp lại datapack, resource pack, function, tag, recipe, advancement, predicate, loot table… Không cần thoát thế giới.
/debug start / /debug stop / /debug report
- Profiling hiệu năng (Tick time, CPU usage).
/tick <rate|sprint|step|unfreeze|freeze> value (1.21+ / Snapshots)
- Kiểm soát game loop tick rate.
freezedừng hoàn toàn game logic (chỉ render),stepchạy 1 tick.
/datapack <enable|disable> <name> / /datapack list
- Quản lý datapack runtime.
Phần 3: Kiến Thức Chuyên Sâu – NBT, JSON Text Component, Raw JSON
Để thành thạo lệnh của Minecraft Informational ở trình độ cao, bạn bắt buộc hiểu 2 định dạng dữ liệu này.
3.1. NBT (Named Binary Tag) – Ngôn Ngữ Dữ Liệu Của Minecraft
Mọi thứ trong game (Entity, Block Entity, Item Stack) đều là cây NBT.
Compound {}: Object (Key: Value). VD: {id:"minecraft:diamond",Count:1b}.
List : Mảng. VD: Enchantments:{id:"...",lvl:1s},{id:"...",lvl:2s}.
Kiểu dữ liệu (Type Suffixes – BẮT BUỘC trong lệnh):
b / B: Byte (1 byte). VD: Count:1b, ShowParticles:1b.
s / S: Short (2 bytes). VD: lvl:5s, Damage:100s.
i / I: Int (4 bytes) – Mặc định nếu không có hậu tố. VD: Age:100.
l / L: Long (8 bytes). VD: UUIDMost:12345L, UUIDLeast:67890L.
f / F: Float (4 bytes). VD: Health:20.0f, Pos:0.0f, 64.0f, 0.0f.
d / D: Double (8 bytes). VD: Pos:0.0, 64.0, 0.0 (Entity Pos dùng Double).
String: "text" hoặc 'text'. Nên dùng " cho JSON, ' cho NBT string thông thường.
Mẹo Debug NBT: Dùng /data get entity @s hoặc /data get block ~ ~ ~ để xem cấu trúc thực tế, sau đó copy/paste/sửa đổi cho /summon hoặc /give.

Có thể bạn quan tâm: Hướng Dẫn Toàn Diện Về Lệnh Command Block Trong Minecraft Pc (java Edition): Từ Cơ Bản Đến Nâng Cao
3.2. JSON Text Component – Định Dạng Văn Bản Hiện Đại
Dùng cho: CustomName, Lore, tellraw, title, book, sign, team prefix/suffix.
Cấu trúc cơ bản: {"text":"Nội dung", "color":"red", "bold":true, "italic":false, "underlined":true, "strikethrough":true, "obfuscated":true, "font":"minecraft:alt", "hoverEvent":{...}, "clickEvent":{...}, "extra":...}
color:black,dark_blue,dark_green,dark_aqua,dark_red,dark_purple,gold,gray,dark_gray,blue,green,aqua,red,light_purple,yellow,white,reset. Hoặc hex#FF5555.hoverEvent: Hiện tooltip khi chuột trỏ vào.{"action":"show_text","contents":"Text hiện ra"}.{"action":"show_item","contents":{"id":"minecraft:diamond",Count:1b,tag:{...}}}-> Hiện item tooltip thật!{"action":"show_entity","contents":{"name":"Ten","type":"minecraft:zombie","uuid":I;1,2,3,4}}.
clickEvent: Xử lý khi click chuột.{"action":"run_command","value":"/say Hello"}-> Chạy lệnh (cần quyền OP hoặc trigger).{"action":"suggest_command","value":"/home"}-> Gợi ý vào chat.{"action":"open_url","value":"https://google.com"}-> Mở web (cần confirm).{"action":"change_page","value":1}-> Dùng cho sách.{"action":"copy_to_clipboard","value":"Text copy"}.
extra: Mảng các component con (ghép nối văn bản).selector: Thay vìtext, dùng{"selector":"@p","color":"green"}-> Hiển thị tên người chơi gần nhất (clickable).
Ví dụ Tellraw Pro (GUI Menu Text):
/tellraw @a "",{"text":"","color":"dark_gray"},{"text":"Server","color":"gold","bold":true},{"text":" ","color":"dark_gray"},{"text":"Click ","color":"gray"},{"text":"HERE","color":"aqua","bold":true,"underlined":true,"clickEvent":{"action":"run_command","value":"/trigger Menu set 1"},"hoverEvent":{"action":"show_text","contents":"§bMở Menu Chính"}},{"text":" để nhận quà!","color":"gray"}
Phần 4: Datapack & Function – Kiến Trúc Hệ Thống Chuyên Nghiệp
Viết lệnh đơn lẻ trong Command Block đã lỗi thời cho các project lớn. Datapack là chuẩn mực.
4.1. Cấu Trúc Thư Mục Datapack
MyDatapack/
├── pack.mcmeta (Metadata: pack_format, description)
└── data/ ├── minecraft/ (Ghi đè vanilla: tags, recipes, advancements, predicates, loot_tables) └── my_namespace/ (Namespace của bạn - tên riêng, không dấu, không space) ├── functions/ (Chứa file .mcfunction) │ ├── load.mcfunction (Chạy 1 lần khi load/reload) │ ├── tick.mcfunction (Chạy MỖI TICK - 20 lần/giây) │ ├── main.mcfunction │ └── utils/ ├── tags/ (Tags cho block, item, entity, function) │ ├── functions/ │ │ ├── load.json # {"values":"my_namespace:load"} │ │ └── tick.json # {"values":"my_namespace:tick"} │ └── items/ │ └── swords.json # {"values":"minecraft:diamond_sword", "minecraft:netherite_sword"} ├── predicates/ (Điều kiện phức tạp dùng cho execute if predicate) ├── advancements/(Tiến độ custom) ├── loot_tables/ (Loot table custom cho chest/mob) ├── recipes/ (Công thức craft/smelt custom) └── dimensions/ (Chiều custom - 1.16+)
4.2. Tags Function: load và tick
- Tạo file
data/minecraft/tags/functions/load.json:
json { "values": "my_namespace:load", "my_namespace:setup_scoreboards" } - Tạo file
data/minecraft/tags/functions/tick.json:
json { "values": "my_namespace:main_loop", "my_namespace:player_detection" } - Minecraft sẽ tự động chạy các function trong đây ở thời điểm chính xác (Load: 1 lần; Tick: 20 lần/giây). Không cần Command Block Redstone Clock nữa!
4.3. Predicate (Predicate File) – Tách Logic Ra Khỏi Lệnh
Thay vì viết execute if entity @pnbt={...} run ... dài dòng, hãy tạo file data/my_namespace/predicates/has_diamond_sword.json:
{ "condition": "minecraft:entity_properties", "entity": "this", "predicate": { "equipment": { "mainhand": { "items": "minecraft:diamond_sword" } } }
}
Sau đó trong lệnh/function: /execute as @a if predicate my_namespace:has_diamond_sword run effect give @s strength 1 1 true.
Lợi ích: Dễ đọc, dễ sửa, tái sử dụng được, performance tốt hơn NBT check phức tạp.
4.4. Storage (Lưu Trữ Dữ Liệu Toàn Cục)
Thay thế Scoreboard cho dữ liệu phức tạp (List, Compound, String).
/data modify storage my_namespace:data KeyName set value "Hello World"
/data get storage my_namespace:data KeyName
/execute store result storage my_namespace:data Pos run data get entity @s Pos
Dùng trong function để lưu config, state machine, database item…
Phần 5: Sự Khác Biệt Quan Trọng: Java Edition vs Bedrock Edition

Có thể bạn quan tâm: Toàn Tập Hướng Dẫn Lệnh Bay Trong Minecraft: Từ Cơ Bản Đến Nâng Cao, Tất Cả Những Gì Bạn Cần Biết
Nếu bạn chơi Bedrock (PE, Win10, Console), hệ thống lệnh khác biệt lớn:
- Không có NBT trong lệnh
/give,/summon,/data. Bedrock dùng Component System (Molang/Script API) hoặc/replaceitem+/enchant+/effectriêng lẻ. Không thể tạo “God Sword” 1 lệnh như Java. - Selector Arguments: Bedrock không hỗ trợ
nbt=,scores=,tag=(dùnghas_tag/tagkhác),advancements=. Hỗ trợname,type,distance,rm(radius min),r(radius max),c(count),x,y,z(origin). /executeCú Pháp Cũ: Bedrock vẫn dùng cú pháp cũ:/execute <target> <x> <y> <z> <command>. Không có subcommandas,at,if,store,runtách biệt như Java (1.13+). Đang được cập nhật dần trong preview nhưng chưa bằng Java./structure//fillbiome: Bedrock có/structurenhưng/fillbiomechỉ mới có gần đây (1.20+).- Script API / Addon: Bedrock mạnh ở Addon (Behavior/Resource Pack) dùng JSON + JavaScript (Script API) để custom logic, entity, UI, dimension. Java dùng Datapack (Function/JSON) + Mod (Java/Kotlin/Fabric/Forge/NeoForge).
- Raw JSON Text: Bedrock hỗ trợ
tellraw,title,signJSON text nhưng cấu trúchoverEvent/clickEventhơi khác (ví dụrun_commandtrong Bedrock thường chạy với quyền player, cầnneeds_op: false trong manifest addon mới chạy được lệnh OP).
Phần 6: Ứng Dụng Thực Chiến – Xây Dựng Hệ Thống “Informational” Thực Tế
Hãy áp dụng kiến thức trên để xây dựng một hệ thống Thông Tin Người Chơi (Player Info System) – đáp ứng trực tiếp từ khóa “Informational”.
Yêu cầu:
- Hiển thị Tên, Máu, Cấp độ, Tọa độ, Biome, Chiều, Ping (nếu server) lên Action Bar / Title / Bossbar.
- Cập nhật realtime (mỗi tick hoặc 1 giây).
- Có lệnh
/infođể bật/tắt. - Tương thích Multiplayer.
Triển Bước 1: Setup Scoreboard & Storage (File load.mcfunction)
# Tạo objectives
scoreboard objectives add Info_System dummy "Hệ Thống Info"
scoreboard objectives add Info_Toggle trigger "Bật/Tắt Info"
scoreboard objectives add Coord_X dummy "X"
scoreboard objectives add Coord_Y dummy "Y"
scoreboard objectives add Coord_Z dummy "Z"
scoreboard objectives add Health_Value dummy "Máu (x10)"
scoreboard objectives add Level_Value dummy "Level"
scoreboard objectives add Ping_Value dummy "Ping (ms)" # Enable trigger cho tất cả player (chạy 1 lần khi join - cần advancement trigger hoặc function tick check tag)
# Cách đơn giản: Trong tick.mcfunction check tag "info_init"
Triển Bước 2: Function Cập Nhật Thông Tin (File update_info.mcfunction)
# Chạy cho player nào đang bật info (score Info_Toggle = 1) và có tag info_init
execute as @ascores={Info_Toggle=1},tag=info_init store result score @s Coord_X run data get entity @s Pos0 100
execute as @ascores={Info_Toggle=1},tag=info_init store result score @s Coord_Y run data get entity @s Pos1 100
execute as @ascores={Info_Toggle=1},tag=info_init store result score @s Coord_Z run data get entity @s Pos2 100 # Máu (Health là float, nhân 10 để thành int cho scoreboard)
execute as @ascores={Info_Toggle=1},tag=info_init store result score @s Health_Value run attribute @s generic.max_health get
# Hoặc đơn giản: execute store result score @s Health_Value run data get entity @s Health 10
# Cách tốt nhất dùng attribute:
execute as @ascores={Info_Toggle=1},tag=info_init store result score @s Health_Value run attribute @s generic.health get
# Scoreboard chỉ lưu int, attribute trả về float -> Mất phần thập phân. # Fix: Dùng storage hoặc làm tròn trong hiển thị. # Level XP
execute as @ascores={Info_Toggle=1},tag=info_init store result score @s Level_Value run xp query @s levels # Ping (Chỉ Server Paper/Spigot/Fabric có attribute/custom, Vanilla không có Ping attribute).
# Cần mod/plugin phía server. Vanilla client không biết ping server.
# Giả lập: Random hoặc để trống.
Triển Bước 3: Function Hiển Thị (File display_info.mcfunction) – Sử Dụng title / bossbar / tellraw
Cách 1: Action Bar (Phù hợp nhất – ít gây lag chat)
execute as @ascores={Info_Toggle=1},tag=info_init run title @s actionbar {"text":"§e❤ ","color":"yellow"}, {"score":{"name":"","objective":"Health_Value"},"color":"red"}, {"text":" §f| §bXP: ","color":"white"}, {"score":{"name":"","objective":"Level_Value"},"color":"green"}, {"text":" §f| §6XYZ: ","color":"gold"}, {"score":{"name":"","objective":"Coord_X"},"color":"aqua"}, {"text":", ","color":"gold"}, {"score":{"name":"","objective":"Coord_Y"},"color":"aqua"}, {"text":", ","color":"gold"}, {"score":{"name":"","objective":"Coord_Z"},"color":"aqua"}, {"text":" §f| §dBiome: ","color":"light_purple"}, # Biome khó lấy bằng command thuần (cần execute positioned biome check hoặc predicate biome) # Tạm thời bỏ qua hoặc dùng mod/datapack biome detection phức tạp. {"text":"Plains","color":"green"} # Placeholder
Lưu ý: {"score":{"name":"","objective":"..."}} trong JSON text component sẽ tự động lấy score của người nhận (player đang xem title). Rất tối ưu!
Cách 2: Bossbar (Luôn hiển thị, không bị che bởi chat/inventory)
# Setup 1 lần (load.mcfunction)
bossbar add info_bar "Player Info"
bossbar set info_bar color blue
bossbar set info_bar style notched_20 # Hoặc progress
bossbar set info_bar max 100
bossbar set info_bar visible true # Cập nhật (tick.mcfunction)
execute as @ascores={Info_Toggle=1},tag=info_init run bossbar set info_bar players @s
execute as @ascores={Info_Toggle=1},tag=info_init store result bossbar info_bar value run attribute @s generic.health get
# Bossbar value là float -> OK.
# Nhưng Bossbar chỉ hiển thị 1 giá trị số/%. Khó hiển thị text phức tạp như XYZ.
# -> Kết hợp: Bossbar cho Health, Actionbar cho XYZ/Level.
Triển Bước 4: Lệnh Bật/Tắt (File toggle_info.mcfunction hoặc gán vào /trigger)
Player gõ: /trigger Info_Toggle set 1 (Bật) hoặc /trigger Info_Toggle set 0 (Tắt).
Trong tick.mcfunction:
# Xử lý bật/tắt
execute as @ascores={Info_Toggle=1..},tag=!info_init run function my_namespace:init_player_info
execute as @ascores={Info_Toggle=0},tag=info_init run function my_namespace:remove_player_info # Reset trigger để dùng lại lần sau
scoreboard players set @ascores={Info_Toggle=1..} Info_Toggle 0
Triển Bước 5: Init/Remove Player (File init_player_info.mcfunction)
tag @s add info_init
scoreboard players enable @s Info_Toggle
title @s actionbar {"text":"§a§l+ Hệ thống Info đã BẬT","color":"green"}
# Gửi tin nhắn hướng dẫn
tellraw @s {"text":"§7Gõ §b/trigger Info_Toggle set 0 §7để tắt."}
Triển Bước 6: Tick Loop (File tick.mcfunction)

# 1. Xử lý bật/tắt (xem trên)
function my_namespace:init_player_info
function my_namespace:remove_player_info # 2. Cập nhật dữ liệu (Scoreboard/Storage)
function my_namespace:update_info # 3. Hiển thị (Action Bar / Bossbar)
function my_namespace:display_info
Triển Bước 7: Tag Function Tick
File data/minecraft/tags/functions/tick.json:
{ "values": "my_namespace:tick" }
Phần 7: Tối Ưu Hiệu Năng (Performance Optimization) – “Đừng Làm Lag Server”
Viết lệnh chạy được là chưa đủ, phải viết lệnh chạy mượt.
- Giảm Tần Suất: Không phải lệnh nào cũng cần chạy 20 tick/giây.
- Cập nhật Scoreboard/Display: 1 giây (20 ticks) hoặc 5 ticks đủ.
- Dùng
/schedule function ... 1s appendhoặc counter trong scoreboard (scoreboard players add @s Timer 1,execute if score @s Timer matches 20.. run ...).
- Thu Hẹp Selector (
@e): Luôn thêmtype=,distance=..,limit=,tag=.- Sai:
@enbt={...}-> Quét toàn bộ entity thế giới (lag chết người). - Đúng:
@etype=zombie,tag=boss,distance=..50,limit=1,nbt={...}.
- Sai:
- Tránh
/execute as @a ... run ...lồng nhau sâu. Gộp logic vào 1 function chạy tuần tự. - Dùng
execute store result score ...thay vì/data get+ parse chat log./data getoutput ra chat log gây lag I/O disk. - Block State vs NBT: Dùng
/setblock ...property=value(Block State) thay vì NBT{BlockState:{...}}cho block đặt nhanh hơn. - Function > Command Block Chain: Function parse 1 lần khi load/reload. Command Block parse mỗi tick. Function cho phép comment, indent, version control (Git).
- Predicate > NBT Check: Predicate được cache và tối ưu hóa bởi engine game.
- Storage > Scoreboard cho Data Phức Thức: Scoreboard chỉ lưu
int. Storage lưuList,Compound,String,Double… Truy cập nhanh hơn NBT entity/block.
Phần 8: Tài Nguyên Học Tập & Công Cụ Hỗ Trợ (Resources & Tools)
Để tiếp tục thâm nhập, bạn cần “vũ khí” đắc lực:
- Minecraft Wiki (Official):
- Commands:
minecraft.wiki/w/Commands(Cú pháp chuẩn xác nhất). - NBT Format:
minecraft.wiki/w/NBT_format(Tra cứu tag ID của entity/item/block). - Data Components (1.20.5+):
minecraft.wiki/w/Data_component(Thay thế NBT cho item).
- Commands:
- Minecraft Tools Websites:
- MCStacker (mcstacker.net): Generate lệnh
/give,/summon,/setblock,/tellraw,/titlegiao diện kéo thả. Cực kỳ khuyến khích cho người mới. - Misode (misode.github.io): Generator Datapack chuyên nghiệp (Function, Predicate, Loot Table, Recipe, Worldgen, Item Modifier…). Chuẩn JSON, hỗ trợ 1.20.5+ Data Components.
- CommandCreator (commandcreator.com): Tương tự MCStacker.
- NBT Viewer (web nbt viewer): Paste NBT string vào để xem cấu trúc cây đẹp mắt.
- MCStacker (mcstacker.net): Generate lệnh
- IDE & Editor:
- VS Code + Extension “Minecraft Development” (by SPGoding) / “Datapack Utilities”: Intellisense (gợi ý code), highlight syntax, validate error, tạo project datapack tự động, debug function. BẮT BUỘC cho dev nghiêm túc.
- Notepad++: Nhẹ, dùng cho sửa nhanh file
.mcfunctionđơn lẻ.
- Cộng Đồng & Tham Khảo:
- Reddit: r/MinecraftCommands, r/TechnicalMinecraft, r/DataPacks.
- Discord: “Minecraft Commands”, “Datapack Development”, “Technical Minecraft”.
- YouTube: Slicedlime (Technical deep dive), Gnembon (Farm/Technical), IanXofour (Datapack tutorial), Minecraft Wiki (Official tutorials), KillerRabbit (Command block tutorial).
- Versioning: Luôn chú ý Phiên bản Minecraft (Version). Cú pháp lệnh thay đổi lớn tại 1.13 (The Flattening), 1.17 (Caves & Cliffs), 1.20.5 (Data Components/Argument changes). Code 1.12 không chạy được 1.21.
Phần 9: Các Chủ Đề Nâng Cao Khác (Advanced Topics)
Nếu bạn đã chinh phục hết trên, hãy khám phá:
- Raycasting / Raytracing bằng Function: Dùng loop
execute positioned ^ ^ ^0.1 if block ...để bắn tia laser, skill bắn cung, detection line-of-sight. - Matrix Math / Vector Math trong Function: Tính toán vector, quay vector, dot product, cross product chỉ dùng scoreboard operation. Dùng cho custom projectile, camera system, rotation math.
- Custom Dimension / Worldgen (1.16+): Viết JSON
dimension_type,noise_settings,biome_sourceđể tạo chiều mới hoàn toàn (End floating islands, Nether cave, Overworld custom). - Item Modifiers & Loot Tables: Tùy chỉnh loot rơi từ mob, chest, fishing, block break mà không cần function phức tạp.
- Advancement & Trigger Tree: Tạo hệ thống quest, achievement, hướng dẫn player (GUI advancement).
- Resource Pack Integration:
CustomModelData+predicatetrongmodels/itemđể thay texture/model item tùy theo NBT/Component. Tạo item 3D, animation, GUI hud custom. - Modding (Fabric/NeoForge/Forge): Khi Command/Datapack không đáp ứng được (UI custom phức tạp, logic server-side phức tạp, performance critical, interaction với OS/network). Học Java/Kotlin + Mixin/Access Transformers.
Kết Luận: Hành Trình Trở Thành “Command Master”
Hành trình chinh phục lệnh của Minecraft (Informational) là một marathon, không phải sprint. Từ việc gõ /gamemode creative lần đầu, đến việc viết hàng nghìn dòng code .mcfunction trong Datapack, xây dựng hệ thống Scoreboard phức tạp, thao túng NBT/Component/Storage, tối ưu hóa tick rate server… mỗi bước đi đều mở ra một khả năng sáng tạo mới.
Tóm tắt lộ trình thành thạo:
1. Nắm vững cú pháp & Selector (@e, arguments).
2. Thành thạo /give, /summon với NBT/Data Components.
3. Hiểu và dùng fluently /execute (subcommands: as, at, if, store, run).
4. Xây dựng logic bằng Scoreboard & /trigger.
5. Chuyển sang Datapack/Function (Load/Tick tags, Predicate, Storage).
6. Tối ưu hóa hiệu năng (Performance).
7. Tích hợp Resource Pack (CustomModelData, Models).
8. Học Modding khi Command hết sức.
Minecraft không chỉ là một trò chơi, nó là một nền tảng lập trình (programming platform) tinh giản nhưng mạnh mẽ. Hãy bắt đầu hôm nay: Mở game, bật Cheats, gõ /give @p command_block, đặt xuống, và viết dòng lệnh đầu tiên của Datapack tương lai của bạn. Thế giới Minecraft đang chờ bạn định hình lại nó bằng những dòng lệnh.
Chúc bạn có những trải nghiệm “Informational” đầy thú vị và thành công!
