blockbench-vanilla-textures

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Blockbench Vanilla Textures

Blockbench 原版纹理

Use Mojang's own texture files instead of painting or generating an imitation. Source: Mojang/bedrock-samples (
resource_pack/textures/...
), served by jsDelivr:
https://cdn.jsdelivr.net/gh/Mojang/bedrock-samples@<ref>/resource_pack/textures/blocks/brick.png
<ref>
is
main
or a release tag such as
v1.26.50.4
. Pin a tag when results must be reproducible. The names are Bedrock names, but the pixel art matches Java Edition for almost every block, so the files also work for Java and generic models after renaming where needed.
Load blockbench-use before changing the project, and blockbench-texturing for UV details.
License: the files are © Mojang AB and covered by the Minecraft EULA. They are fine for Minecraft content, add-ons, resource packs and personal work. If the user plans to sell the model outside Minecraft or bundle the textures into a non-Minecraft asset pack, say so once and let them decide. Do not strip the attribution the manifest records.
使用 Mojang 自己的纹理文件,而不是绘制或生成仿制品。来源:Mojang/bedrock-samples (
resource_pack/textures/...
),由 jsDelivr 提供:
https://cdn.jsdelivr.net/gh/Mojang/bedrock-samples@<ref>/resource_pack/textures/blocks/brick.png
<ref>
是
main
或
v1.26.50.4
之类的 release tag。当结果必须可复现时,请固定 tag。这些名称是 Bedrock 名称,但几乎每个方块的像素画都与 Java Edition 相匹配,因此在必要时重命名后,文件也可用于 Java 和通用模型。
更改项目之前,先加载 blockbench-use,UV 细节参阅 blockbench-texturing。
许可: 这些文件 © Mojang AB,受 Minecraft EULA 约束。它们适用于 Minecraft 内容、add-on、资源包和个人作品。如果用户计划在 Minecraft 之外出售该模型,或将纹理打包进非 Minecraft 资产包,应提醒一次并让用户自行决定。不要删除 manifest 中记录的署名信息。

1. Map the Request to Vanilla Blocks

1. 将请求映射到原版方块

Translate the subject into block IDs: a brick wall becomes
brick_block
, a log cabin
oak_log
plus
oak_planks
, a castle
stone_bricks
plus
cobblestone
. Ask only when a name is genuinely ambiguous ("stone" or "wood") and the choice changes the look. Otherwise pick the obvious block and state it. Block IDs resolve per-face textures, including log tops, grass tops and crafting-table fronts. Java IDs mostly work; the exceptions (
bricks
→
brick_block
,
grass_block
→
grass
, …) are in names, tints and animation.
将主题转换为方块 ID:砖墙变为
brick_block
,原木小屋变为
oak_log
加
oak_planks
,城堡变为
stone_bricks
加
cobblestone
。仅当名称确实存在歧义(“stone”或“wood”)且选择会改变外观时才询问。否则,选择显而易见的方块并说明选择结果。方块 ID 可解析为逐面纹理,包括原木顶面、草地顶面和工作台正面。大多数 Java ID 都可用;例外(
bricks
→
brick_block
、
grass_block
→
grass
等)见 names, tints and animation。

2. Fetch

2. 获取

Run the bundled resolver (Node 18+ or Bun, no dependencies). Script paths are relative to this skill folder.
bash
node scripts/vanilla_texture.mjs search brick                                   # find IDs/keys
node scripts/vanilla_texture.mjs fetch brick_block oak_log grass --out <workspace>/textures/vanilla
node scripts/vanilla_texture.mjs fetch grass oak_leaves --carried --out <dir>   # pre-tinted inventory art
node scripts/vanilla_texture.mjs fetch brick_block --pbr --out <dir>            # + texture_set.json, MERS, normal
node scripts/vanilla_texture.mjs fetch entity/pig/pig --out <dir>               # any path under textures/
node scripts/vanilla_texture.mjs search zombie --tree --out <dir>               # entities/UI: one GitHub API call, cached
It prints and saves
<out>/vanilla_manifest.json
. Use these fields:
  • requests[].faces
    : Blockbench face → atlas key.
  • requests[].atlas_keys[key].path
    : the file for each key.
  • textures[]
    : the local
    file
    (absolute path),
    width
    /
    height
    ,
    format
    (
    png
    or
    tga
    ),
    frames
    ,
    ticks_per_frame
    ,
    tint
    ,
    variants
    , and
    texture_set
    layers.
Read the manifest instead of guessing file names.
A single known file needs no script:
bash
curl -fsSLo brick.png https://cdn.jsdelivr.net/gh/Mojang/bedrock-samples@main/resource_pack/textures/blocks/brick.png
powershell
iwr https://cdn.jsdelivr.net/gh/Mojang/bedrock-samples@main/resource_pack/textures/blocks/brick.png -OutFile brick.png
Some colour textures exist only as
.tga
, including leaves,
grass_side
, cactus and ferns. A 404 on
.png
means you should try
.tga
, which the script does automatically. The jsDelivr package-listing API rejects this repository as too large, so discovery goes through
blocks.json
,
terrain_texture.json
,
item_texture.json
, or the GitHub tree (
--tree
).
Where to save: put files the model will keep in the user's asset workspace, for example
textures/vanilla/
, not in a temp folder. Blockbench remembers an imported file's path and can write the texture back to it when the project is saved. Never modify a downloaded file in place after importing it; write edits such as tints and tiles to new file names.
运行随附的 resolver(Node 18+ 或 Bun,无依赖)。脚本路径相对于此 skill 文件夹。
bash
node scripts/vanilla_texture.mjs search brick                                   # find IDs/keys
node scripts/vanilla_texture.mjs fetch brick_block oak_log grass --out <workspace>/textures/vanilla
node scripts/vanilla_texture.mjs fetch grass oak_leaves --carried --out <dir>   # pre-tinted inventory art
node scripts/vanilla_texture.mjs fetch brick_block --pbr --out <dir>            # + texture_set.json, MERS, normal
node scripts/vanilla_texture.mjs fetch entity/pig/pig --out <dir>               # any path under textures/
node scripts/vanilla_texture.mjs search zombie --tree --out <dir>               # entities/UI: one GitHub API call, cached
它会打印并保存
<out>/vanilla_manifest.json
。使用以下字段:
  • requests[].faces
    :Blockbench 面 → atlas key。
  • requests[].atlas_keys[key].path
    :每个 key 对应的文件。
  • textures[]
    :本地
    file
    (绝对路径)、
    width
    /
    height
    、
    format
    (
    png
    或
    tga
    )、
    frames
    、
    ticks_per_frame
    、
    tint
    、
    variants
    和
    texture_set
    图层。
读取 manifest,不要猜测文件名。
对于单个已知文件,无需使用脚本:
bash
curl -fsSLo brick.png https://cdn.jsdelivr.net/gh/Mojang/bedrock-samples@main/resource_pack/textures/blocks/brick.png
powershell
iwr https://cdn.jsdelivr.net/gh/Mojang/bedrock-samples@main/resource_pack/textures/blocks/brick.png -OutFile brick.png
有些彩色纹理仅提供
.tga
格式,包括树叶、
grass_side
、仙人掌和蕨类。对
.png
请求返回 404 时应尝试
.tga
,脚本会自动处理。jsDelivr 的 package-listing API 会因仓库过大而拒绝该仓库,因此发现资源需通过
blocks.json
、
terrain_texture.json
、
item_texture.json
或 GitHub tree(
--tree
)进行。
保存位置: 将模型需要保留的文件放在用户的资产工作区中,例如
textures/vanilla/
,不要放在临时目录中。Blockbench 会记住导入文件的路径,并可在保存项目时将纹理写回该路径。导入后切勿就地修改下载的文件;应将 tint、tile 等编辑结果写入新的文件名。

3. Prepare: Tint, Tile, Animate

3. 准备:Tint、Tile 与动画

Check each manifest entry before importing:
  • tint
    is set:
    the art is grayscale and Minecraft colors it by biome (grass top, leaves, vines, water). Either fetch with
    --carried
    for pre-tinted versions, or run
    python scripts/tint_texture.py <in> <out> --color "#91BD59"
    . Use
    --colormap <colormap/grass.png> --temperature T --downfall D
    to match a biome. Pillow is required.
  • grass_side.tga
    's alpha is a tint mask, not transparency.
    Its dirt pixels have alpha 0. Import
    blocks/grass_side_carried
    instead, or run
    tint_texture.py ... --overlay
    .
  • Large faces: vanilla scale is 16 px per block, which is 1 px per Blockbench unit. Do not stretch one 16×16 tile across a 48-unit face; it produces giant bricks. Either use one 16-unit element per block, or pre-tile the texture:
    tint_texture.py brick.png brick_3x2.png --tile 3x2
    gives 48×32 px for a 48×32-unit face. Pre-tiling suits generic, Bedrock entity and glTF targets. Java block and item models need square 16×16 textures (a taller image is treated as a flipbook), so use one element per block there and keep the original file.
  • frames
    > 1
    means a vertical flipbook, such as water, lava or sea lantern. Map UVs to one frame and follow flipbook textures for playback and export metadata.
Tint colors, biome parameters and the full flipbook list are in names, tints and animation.
导入前检查每个 manifest 条目:
  • tint
    已设置:
    图像为灰度,Minecraft 会根据 biome 为其着色(草地顶面、树叶、藤蔓、水)。可以使用
    --carried
    获取预先 tint 的版本,也可以运行
    python scripts/tint_texture.py <in> <out> --color "#91BD59"
    。要匹配某个 biome,请使用
    --colormap <colormap/grass.png> --temperature T --downfall D
    。需要安装 Pillow。
  • grass_side.tga
    的 alpha 是 tint 蒙版,而非透明度。
    其泥土像素的 alpha 为 0。改用
    blocks/grass_side_carried
    ,或运行
    tint_texture.py ... --overlay
    。
  • 大尺寸面: 原版缩放为每个方块 16 px,也就是每个 Blockbench 单位 1 px。不要将单个 16×16 tile 拉伸覆盖 48-unit 的面;这会产生巨大的砖块。可以为每个方块使用一个 16-unit 元素,也可以预先平铺纹理:
    tint_texture.py brick.png brick_3x2.png --tile 3x2
    会生成适合 48×32-unit 面的 48×32 px 图像。预平铺适合通用模型、Bedrock entity 和 glTF target。Java block 和 item model 需要 16×16 的正方形纹理(更高的图像会被视为 flipbook),因此应在这类模型中使用每个方块一个元素,并保留原始文件。
  • frames
    > 1
    表示纵向 flipbook,例如水、岩浆或海晶灯。将 UV 映射到单帧,并按照 flipbook textures 处理播放和导出元数据。
Tint 颜色、biome 参数和完整 flipbook 列表见 names, tints and animation。

4. Import and Assign

4. 导入并分配

  1. Import each file with
    create_texture: name="brick", data="<absolute file path>"
    . File paths require Blockbench desktop and load PNG and TGA. On Blockbench web, or when the file cannot be reached, pass a
    data:image/png;base64,...
    URL instead. Data URLs must be browser-decodable, so convert TGA to PNG first, for example with Pillow. Importing a path that is already loaded is refused; reuse that texture instead. For formats with
    per_texture_uv_size
    , pass
    uv_width
    /
    uv_height
    equal to the pixel size so UV coordinates are pixels.
  2. One texture for a whole element: use
    apply_texture: id=<element>, texture=<name>, applyTo="all"
    .
  3. Different textures per face (logs, grass, furnace, crafting table): use
    set_cube_uv
    with
    faces: { up: { uv: [0,0,16,16], texture: "log_oak_top" }, north: { …, texture: "log_oak" }, … }
    , following
    requests[].faces
    . Use
    set_mesh_uv
    for meshes.
    blocks.json
    names the south face as the front for furnaces, pumpkins and similar blocks; rotate the element or swap faces so the front faces the viewer.
  4. Box-UV formats (Bedrock entity, Java entity) put one texture per cube in a box layout, so separate 16×16 block tiles do not fit them directly. Switch the element to per-face UV where the format allows it, or pack the tiles into an atlas and map the faces to their rectangles.
  5. Transparent textures (glass, leaves, doors) need the target's cutout or blend settings. See the texturing skill.
Fetching inside Blockbench. jsDelivr sends
Access-Control-Allow-Origin: *
, so Blockbench can download a PNG itself when the agent has no shell, or its shell cannot reach Blockbench's file system.
risky_eval
awaits an expression, so wrap the code in an async IIFE that returns a data URL, then pass that URL to
create_texture
. Follow the repository's authorization rules for
risky_eval
.
js
(async () => {
  const response = await fetch("https://cdn.jsdelivr.net/gh/Mojang/bedrock-samples@main/resource_pack/textures/blocks/brick.png");
  if (!response.ok) throw new Error(`HTTP ${response.status}`);
  const blob = await response.blob();
  return await new Promise(resolve => { const reader = new FileReader(); reader.onload = () => resolve(reader.result); reader.readAsDataURL(blob); });
})()
Vanilla block textures are a few hundred bytes, so the returned data URL is small. Prefer the file-path route for large entity sheets and for TGA files.
  1. 导入每个文件,使用
    create_texture: name="brick", data="<absolute file path>"
    。文件路径方式需要使用 Blockbench Desktop,且支持加载 PNG 和 TGA。在 Blockbench Web 中,或无法访问文件时,改为传入
    data:image/png;base64,...
    URL。Data URL 必须可由浏览器解码,因此先将 TGA 转换为 PNG,例如使用 Pillow。若导入的路径已经加载,导入会被拒绝;应改为复用该纹理。对于带
    per_texture_uv_size
    的格式,请传入与像素尺寸相等的
    uv_width
    /
    uv_height
    ,使 UV 坐标以像素为单位。
  2. 整个元素使用一种纹理: 使用
    apply_texture: id=<element>, texture=<name>, applyTo="all"
    。
  3. 各个面使用不同纹理(原木、草地、熔炉、工作台):使用
    set_cube_uv
    ,例如
    faces: { up: { uv: [0,0,16,16], texture: "log_oak_top" }, north: { …, texture: "log_oak" }, … }
    ,并按照
    requests[].faces
    操作。对 mesh 使用
    set_mesh_uv
    。对于熔炉、南瓜等方块,
    blocks.json
    将 south 面命名为 front;请旋转 element 或交换各面,使 front 朝向观察者。
  4. Box-UV 格式(Bedrock entity、Java entity)在 box layout 中为每个 cube 放置一张纹理,因此无法直接容纳独立的 16×16 block tile。如果格式允许,请将 element 切换为 per-face UV,或将 tile 打包成 atlas,再将各个面映射到相应矩形。
  5. 透明纹理(玻璃、树叶、门)需要目标格式的 cutout 或 blend 设置。请参阅 texturing skill。
在 Blockbench 内获取。 jsDelivr 会发送
Access-Control-Allow-Origin: *
,因此当 Agent 没有 shell,或其 shell 无法访问 Blockbench 文件系统时,Blockbench 可以自行下载 PNG。
risky_eval
会等待表达式完成求值,因此请将代码包装在 async IIFE 中并返回 data URL,再将该 URL 传给
create_texture
。遵循仓库关于
risky_eval
的授权规则。
js
(async () => {
  const response = await fetch("https://cdn.jsdelivr.net/gh/Mojang/bedrock-samples@main/resource_pack/textures/blocks/brick.png");
  if (!response.ok) throw new Error(`HTTP ${response.status}`);
  const blob = await response.blob();
  return await new Promise(resolve => { const reader = new FileReader(); reader.onload = () => resolve(reader.result); reader.readAsDataURL(blob); });
})()
原版方块纹理只有几百字节,因此返回的 data URL 很小。对于大型 entity sheet 和 TGA 文件,优先使用文件路径方式。

5. PBR (Optional)

5. PBR(可选)

Every vanilla block ships
<name>.texture_set.json
with
<name>_mers.tga
(metalness, emissive, roughness, subsurface), and some also ship
_normal.tga
or
_heightmap.tga
. Fetch with
--pbr
, keep the files together in the same folder, then call
import_texture_set: path="<out>/blocks/brick.texture_set.json"
on desktop. Follow PBR materials for assignment and export. Tinted color maps still need tinting; tint the color file and repoint the material's color channel to it.
每个原版方块都包含
<name>.texture_set.json
和
<name>_mers.tga
(metalness、emissive、roughness、subsurface),有些还包含
_normal.tga
或
_heightmap.tga
。使用
--pbr
获取文件,将它们放在同一文件夹中,然后在 Desktop 上调用
import_texture_set: path="<out>/blocks/brick.texture_set.json"
。按照 PBR materials 完成分配和导出。即使使用已着色的 color map,也仍需执行 tint;请为 color 文件着色,然后将材质的 color channel 指向该文件。

6. Deliver for the Target Edition

6. 针对目标版本交付

TargetWhat to do
BedrockKeep Bedrock names and paths, for example
textures/blocks/brick
. For custom blocks, the vanilla texture can be referenced by its terrain key instead of shipping a copy; see material instances
JavaRename to the Java file name (
brick.png
→
bricks.png
,
planks_oak
→
oak_planks
) under
assets/minecraft/textures/block/
, or reference
minecraft:block/bricks
in the model JSON so the game's own texture is used. Add
.png.mcmeta
for flipbooks
Generic / glTFKeep the pixel size and use nearest-neighbour filtering. Bake tints and tiling into the image, because no runtime will apply them
目标操作
Bedrock保留 Bedrock 名称和路径,例如
textures/blocks/brick
。对于自定义方块,可以通过 terrain key 引用原版纹理,而无需附带副本;见 material instances
Java在
assets/minecraft/textures/block/
下重命名为 Java 文件名(
brick.png
→
bricks.png
,
planks_oak
→
oak_planks
),或在 model JSON 中引用
minecraft:block/bricks
,以使用游戏自带的纹理。为 flipbook 添加
.png.mcmeta
通用 / glTF保留像素尺寸并使用 nearest-neighbour filtering。将 tint 和 tiling 烘焙到图像中,因为运行时不会应用它们

7. Verify

7. 验证

  • Run
    list_textures
    and confirm each texture's size and UV size.
  • Run
    get_cube_uv
    or
    get_mesh_info
    and confirm every face shows
    texture_status: "resolved"
    with the intended texture.
  • Capture a screenshot. Check brick or plank scale against a 16-unit reference, confirm tinted textures are not gray, check that transparency shows only where intended, and check that log tops sit on the ends.
  • 运行
    list_textures
    ,确认每个纹理的尺寸和 UV 尺寸。
  • 运行
    get_cube_uv
    或
    get_mesh_info
    ,确认每个面均显示
    texture_status: "resolved"
    ,且使用预期纹理。
  • 截取屏幕截图。对照 16-unit 参考检查砖块或木板缩放,确认 tint 后的纹理不是灰色,检查透明区域只出现在预期位置,并确认原木顶面位于端部。

Worked Example: Brick Wall

实例:砖墙

"Model a brick wall" (Generic Model; a 3×2-block wall, 4 units thick):
  1. Run
    node scripts/vanilla_texture.mjs fetch brick_block --out ./textures/vanilla
    . The manifest shows
    blocks/brick.png
    , 16×16, no tint.
  2. Run
    python scripts/tint_texture.py ./textures/vanilla/blocks/brick.png ./textures/vanilla/brick_wall_3x2.png --tile 3x2
    to produce a 48×32 image.
  3. Import it:
    create_texture name="brick_wall_3x2" data="<abs>/textures/vanilla/brick_wall_3x2.png"
    . Add
    uv_width=48, uv_height=32
    when the format uses per-texture UV size.
  4. Place the cube:
    from [0,0,0]
    ,
    to [48,32,4]
    .
  5. Map every face 1 px per unit with
    set_cube_uv
    , all using
    brick_wall_3x2
    :
    • north
      and
      south
      :
      [0,0,48,32]
      .
    • up
      and
      down
      :
      [0,0,48,4]
      .
    • east
      and
      west
      :
      [0,0,4,32]
      .
  6. Run
    get_cube_uv
    and confirm every face resolves. Capture a screenshot and check that one brick course matches a vanilla 16-unit block.
For a Java block model, build the same wall from six 16×16×4 elements. Map each one with the untouched
brick
texture:
[0,0,16,16]
on the large faces and
[0,0,16,4]
/
[0,0,4,16]
on the edges.
“建模一堵砖墙”(通用模型;一堵 3×2 方块、4 单位厚的墙):
  1. 运行
    node scripts/vanilla_texture.mjs fetch brick_block --out ./textures/vanilla
    。Manifest 显示
    blocks/brick.png
    、16×16,无 tint。
  2. 运行
    python scripts/tint_texture.py ./textures/vanilla/blocks/brick.png ./textures/vanilla/brick_wall_3x2.png --tile 3x2
    ,生成 48×32 图像。
  3. 导入:
    create_texture name="brick_wall_3x2" data="<abs>/textures/vanilla/brick_wall_3x2.png"
    。如果格式使用 per-texture UV size,请添加
    uv_width=48, uv_height=32
    。
  4. 放置 cube:
    from [0,0,0]
    ,
    to [48,32,4]
    。
  5. 使用
    brick_wall_3x2
    ,将每个面按每个单位 1 px 进行映射:
    • north
      和
      south
      :
      [0,0,48,32]
      。
    • up
      和
      down
      :
      [0,0,48,4]
      。
    • east
      和
      west
      :
      [0,0,4,32]
      。
  6. 运行
    get_cube_uv
    并确认每个面均可解析。截取屏幕截图,检查一层砖是否与原版 16-unit 方块一致。
对于 Java block model,使用六个 16×16×4 element 构建同一堵墙。每个 element 都使用未经修改的
brick
纹理进行映射:大面使用
[0,0,16,16]
,边缘使用
[0,0,16,4]
/
[0,0,4,16]
。