Json:block:texture: Difference between revisions

From Vintage Story Wiki
(Link to Modding:CompositeTexture)
(Change formatting)
 
Line 9: Line 9:


There are a few aliases that set multiple textures at the same time:
There are a few aliases that set multiple textures at the same time:
; all
* '''all''' - sets all textures for tessellators that support the alias
: Sets all textures for tessellators that support the alias
* '''sides''' - "west", "east", "north", "south", "up", and "down"
; sides
* '''horizontals''' - "west", "east", "north", and "south"
: "west", "east", "north", "south", "up", and "down"
* '''verticals''' - "up" and "down"
; horizontals
* '''westeast''' - "west" and "east"
: "west", "east", "north", and "south"
* '''northsouth''' - "north" and "south"
; verticals
: "up" and "down"
; westeast
: "west" and "east"
; northsouth
: "north" and "south"


For example, hay block uses two aliases:
For example, hay block uses two aliases:

Latest revision as of 07:23, 4 November 2023

The dictionary contains multiple named textures. Different tessellators expect different texture names. Most tessellators accept the special "all" alias to set all textures at once.

Default example (glass):

textures: {
		all: { base: "block/glass" },
	}

Using variantgroups (rock):

textures: {
		all: {base: "block/stone/rock/{rock}" },
	}

There are a few aliases that set multiple textures at the same time:

  • all - sets all textures for tessellators that support the alias
  • sides - "west", "east", "north", "south", "up", and "down"
  • horizontals - "west", "east", "north", and "south"
  • verticals - "up" and "down"
  • westeast - "west" and "east"
  • northsouth - "north" and "south"

For example, hay block uses two aliases:

textures: {
		horizontals: { base: "block/hay/{type}-side" },
		verticals: { base: "block/hay/{type}-top" },
	},

There are many options to rotate textures, combine them, and randomize the textures by block location.