Skip to content

Not Parsing The New Block Model Format #75

@SpaceshipCaptain

Description

@SpaceshipCaptain

26.1-snapshot-6 and before defined the various stained glass models like this:

{
  "parent": "minecraft:block/cube_all",
  "textures": {
    "all": "minecraft:block/black_stained_glass"
  }
}

but as of 26.1-snapshot-7 and later the model now is defined like this:

{
  "parent": "minecraft:block/cube_all",
  "textures": {
    "all": {
      "force_translucent": true,
      "sprite": "minecraft:block/black_stained_glass"
    }
  }
}

The changelog:

Block Model Format

  • Any block model can now support cutout or translucent (partially transparent pixels) textures
    • Whether a quad is rendered in the cutout or translucent render pass is determined by the contents of its assigned sprite
      • Any sprite with translucent (partially transparent) pixels will be assigned to the "translucent" pass
      • Any sprite with fully transparent pixels will be assigned to the "cutout" pass
      • All other sprites are assigned to the "solid" pass
    • Note: the assigned render pass also implies rendering order: all solid geometry is rendered before all cutout geometry, which is rendered before all translucent geometry
  • The format of the textures map has been updated:
    • Non-string entries will now be rejected, instead of interpreted as strings
    • Alongside the previous inline sprite ID form, entries can now be defined as an object with fields:
      • sprite - the sprite ID
      • force_translucent - optional boolean, true if any geometry with this texture should be forced into the "translucent" pass
        • This is useful for example for blocks that don't have any translucent pixels, but use the mean mipmap strategy
        • Default: false

source

Right now deepslate is always expecting the texture property to be a string but now it can also be an object and the texture is in the sprite property of that object.

Possible fix on this branch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions