Confirmedusers, editor, Administrators
886
edits
CreativeMD (talk | contribs) |
|||
Line 135: | Line 135: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Every group will be added after each other to the blocks name <code>myblockname-mygroup-mysecondgroup</code>. In our example the block name is ignorable so its replaced by <code>*</code>. | |||
You can also use a more compact definition. | You can also use a more compact definition. Due to way we named our textures we can use the placeholder {type} to determine the texture name, so instead of taken care of every case we can do it like this: | ||
<syntaxhighlight lang="json"> | <syntaxhighlight lang="json"> | ||
Line 146: | Line 147: | ||
}, | }, | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Eventually your file should look like this: | Eventually your file should look like this: | ||
Line 162: | Line 159: | ||
blockmaterial: "Stone", | blockmaterial: "Stone", | ||
drawtype: "cube", | drawtype: "cube", | ||
textures: { | |||
all: { | |||
base: "metal/my{type}texture", | |||
alternates: [{base: "metal/my{type}texture1" }, {base: "metal/my{type}texture2" }, {base: "metal/my{type}texture3" }], | |||
}, | }, | ||
}, | }, | ||
resistance: 3.5, | resistance: 3.5, |