Json:block:texture: Difference between revisions

From Vintage Story Wiki
(Created page with "Default example (glass): <syntaxhighlight lang='json'>textures: { all: { base: "glass" }, }</syntaxhighlight> Using variantgroups (rock):<syntaxhighlight lang='json'>textur...")
 
No edit summary
Line 1: Line 1:
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>
Using directions (hay block):
Using directions (hay block):
<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>


Overlay and alternate textures combined (ore): <syntaxhighlight lang='json'>textures: {
Overlay and alternate textures combined (ore): <syntaxhighlight lang='json'>textures: {
all: {
all: {
base: "stone/rock/{rock}",
base: "block/stone/rock/{rock}",
overlays: [ "stone/ore/{ore}1" ],
overlays: [ "block/stone/ore/{ore}1" ],
alternates: [
alternates: [
{ base: "stone/rock/{rock}", overlays: [ "stone/ore/{ore}2" ] },
{ base: "block/stone/rock/{rock}", overlays: [ "block/stone/ore/{ore}2" ] },
{ base: "stone/rock/{rock}", overlays: [ "stone/ore/{ore}3" ] }
{ base: "block/stone/rock/{rock}", overlays: [ "block/stone/ore/{ore}3" ] }
]
]
}
}
},</syntaxhighlight>
},</syntaxhighlight>

Revision as of 09:37, 1 September 2017

Default example (glass):

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

Using variantgroups (rock):

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

Using directions (hay block):

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

Overlay and alternate textures combined (ore):

textures: {
		all: {
			base: "block/stone/rock/{rock}",
			overlays: [ "block/stone/ore/{ore}1" ],
			alternates: [
				{ base: "block/stone/rock/{rock}", overlays: [ "block/stone/ore/{ore}2" ] },
				{ base: "block/stone/rock/{rock}", overlays: [ "block/stone/ore/{ore}3" ] }
			]
		}
	},