Modding:Textures: Difference between revisions

From Vintage Story Wiki
Line 53: Line 53:
</syntaxhighlight>
</syntaxhighlight>


This is a useful method since both "metal" and "wood" can be assigned to multiple cubes within the shape JSON.  
This is a useful method since both "metal" and "wood" can be assigned to multiple cubes within the shape JSON.
 
If you decide for some reason you want a variant of an item to not be rendered using a JSON shape you can use the "voxelizeTexture property when defining a shape. Lets take a look at what the redmeat JSON does:
 
<syntaxhighlight lang="json">
shapebytype: {
  "redmeat-vintage": { base: "item/empty", voxelizeTexture: true },
  "*": { base: "item/food/meat/red" },
},
texturesbytype: {
  "redmeat-raw": {
    "meat": {base: "item/food/meat/raw" }
  },
  "redmeat-cooked":  {
    "meat": {base: "item/food/meat/cooked" }
  },
  "redmeat-cured":  {
    "meat": {base: "item/food/meat/cured" }
  },
  "redmeat-vintage": {
    "item/empty":  { base: "item/food/meat/vintage" }
  }
},
</syntaxhighlight>
 
We can see here that only the "vintage" variant will be rendered as a regular voxelized item texture, while the rest will use the redmeat shape and apply their texture to it.


== Texturing a Block ==
== Texturing a Block ==
219

edits