Json:block:texture: Difference between revisions

From Vintage Story Wiki
No edit summary
No edit summary
Line 5: Line 5:
all: {base: "block/stone/rock/{rock}" },
all: {base: "block/stone/rock/{rock}" },
}</syntaxhighlight>
}</syntaxhighlight>
Using directions - the texture codes "verticals", "horizontals", "sides", "westeast" and "northsouth" get expanded into their respective n/e/s/w/u/d faces. Example hay block:
Using directions - the texture codes "verticals", "horizontals", "sides", "westeast" and "northsouth" are specially handled as they get expanded into their respective n/e/s/w/u/d faces. Example hay block:
<syntaxhighlight lang='json'>textures: {
<syntaxhighlight lang='json'>textures: {
horizontals: { base: "block/hay/{type}-side" },
horizontals: { base: "block/hay/{type}-side" },

Revision as of 08:01, 25 June 2021

Default example (glass):

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

Using variantgroups (rock):

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

Using directions - the texture codes "verticals", "horizontals", "sides", "westeast" and "northsouth" are specially handled as they get expanded into their respective n/e/s/w/u/d faces. Example 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*" }
	},