Json:block:texture: Difference between revisions

From Vintage Story Wiki
No edit summary
No edit summary
Line 11: Line 11:
},</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: "block/stone/rock/{rock}",
base: "block/stone/rock/{rock}",
Line 20: Line 22:
]
]
}
}
},</syntaxhighlight>
Random textures:
<syntaxhighlight lang='json'>
textures: {
all: { base: "block/plant/waterlily/lily*" }
},</syntaxhighlight>
},</syntaxhighlight>

Revision as of 16:32, 6 February 2018

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" ] }
			]
		}
	},

Random textures:

	textures: {
		all: { base: "block/plant/waterlily/lily*" }
	},