Appearance
Namespaced ids
You'll learn: how blocks, items and entity types are named. You'll need this when: you add or refer to any content.
Status: Built.
Ids are Minecraft-style: namespace:name.
| Id | Whose |
|---|---|
inventery:stone, inventery:glass | the base game (the inventery namespace) |
bedwars:bed | the package whose namespace is bedwars |
furniture:oak_table | another package |
You add content with the local name; the host adds your namespace:
tsconst BED = blocks.add("bed", { hardness: 1 }); // "bedwars:bed"You refer to anything with the full id. A base block may drop the
inventery:prefix when you look it up:tsconst STONE = world.blockId("stone"); // "inventery:stone" recipes.add({ ingredients: ["inventery:obsidian", "furniture:oak_table"], result: { item: "bedwars:bed", count: 1 } });inventeryandminecraftare reserved. Two packages in one plot can't share a namespace.On the wire, ids are small numbers with a per-scope palette; your code never sees that. A
BlockIdis a number for the life of the plot's code; look it up again after a restart (top-level code does this for you).
The base set is the engine's. Base block names are the engine's real list (
plot/runtime/base-blocks.json):grass_block,red_wool,oak_leaves,bedandbed_headwith their_south,_westand_eastfacings, and the rest. A few older names (grass,wool_red,leaves,end_stone) still resolve to the same blocks. Every base block is also an item (inventery:white_wool), beside the base items (inventery:iron_sword). An unknown name is refused with a hint. Base models for entities (inventery:villager) arrive withpack:base(Planned).