Json:block:texture: Difference between revisions
From Vintage Story Wiki
CreativeMD (talk | contribs) (Created page with "Default example (glass): <syntaxhighlight lang='json'>textures: { all: { base: "glass" }, }</syntaxhighlight> Using variantgroups (rock):<syntaxhighlight lang='json'>textur...") |
(Change formatting) |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
The dictionary contains multiple named textures. Different [[Modding:Block_Tessellator|tessellators]] expect different texture names. Most tessellators accept the special "all" alias to set all textures at once. | |||
Default example (glass): <syntaxhighlight lang='json'>textures: { | Default example (glass): <syntaxhighlight lang='json'>textures: { | ||
all: { base: "glass" }, | all: { base: "block/glass" }, | ||
}</syntaxhighlight> | }</syntaxhighlight> | ||
Using variantgroups (rock):<syntaxhighlight lang='json'>textures: { | Using variantgroups (rock):<syntaxhighlight lang='json'>textures: { | ||
all: {base: "stone/rock/{rock}" }, | all: {base: "block/stone/rock/{rock}" }, | ||
}</syntaxhighlight> | }</syntaxhighlight> | ||
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: | |||
<syntaxhighlight lang='json'>textures: { | <syntaxhighlight lang='json'>textures: { | ||
horizontals: { base: "hay/{type}-side" }, | horizontals: { base: "block/hay/{type}-side" }, | ||
verticals: { base: "hay/{type}-top" }, | verticals: { base: "block/hay/{type}-top" }, | ||
},</syntaxhighlight> | },</syntaxhighlight> | ||
There are many [[Modding:CompositeTexture|options]] to rotate textures, combine them, and randomize the textures by block location. | |||
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.