tutorial:blockstate
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
tutorial:blockstate [2019/08/28 21:29] – [Giving a block state] Added description of blockstate json b0undarybreaker | tutorial:blockstate [2019/08/28 21:49] – [Giving a block state] finish adding tutorial for blockstate jsons b0undarybreaker | ||
---|---|---|---|
Line 79: | Line 79: | ||
- The ''" | - The ''" | ||
- A variant named ''""'' | - A variant named ''""'' | ||
- | - The object assigned to the ''""'' | + | - The object assigned to the ''""'' |
+ | - The ''" | ||
+ | |||
+ | If you //do// want to have different models | ||
+ | |||
+ | <code json> | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | In this JSON, there are two variants, one for each possibility of the '' | ||
+ | |||
+ | This is only a simple introduction to blockstate JSONs. All of the tricks you can do with blockstate and model JSONs are documented on the [[https:// | ||
==== A note about performance ==== | ==== A note about performance ==== | ||
Every possible state of a block is registered at the start of the game. This means that if you have 14 boolean properties, the block has 2^14 = 16384 different states and 2^14 states are registered. For this reason blocks should not contain too many blockstate properties. Rather, blockstates should be mostly reserved for visuals, and [[tutorial: | Every possible state of a block is registered at the start of the game. This means that if you have 14 boolean properties, the block has 2^14 = 16384 different states and 2^14 states are registered. For this reason blocks should not contain too many blockstate properties. Rather, blockstates should be mostly reserved for visuals, and [[tutorial: |
tutorial/blockstate.txt · Last modified: 2023/11/18 08:13 by solidblock