tutorial:blockstate
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
tutorial:blockstate [2019/08/28 21:54] – [Adding models for your blockstates] b0undarybreaker | tutorial:blockstate [2019/11/14 11:53] – fudge | ||
---|---|---|---|
Line 8: | Line 8: | ||
it would become harder and gain a hardness of '' | it would become harder and gain a hardness of '' | ||
| | ||
- | First we define the boolean property of the block - whether or not it is hard: | + | First we define the boolean property of the block - whether or not it is hard (careful not to import the wrong BooleanProperty!): |
<code java> | <code java> | ||
public class MyBlock extends Block { | public class MyBlock extends Block { | ||
Line 36: | Line 36: | ||
} | } | ||
</ | </ | ||
+ | (To set multiple properties, chain '' | ||
- | Now, to set the property we need to call | + | Now, to set the property we need to call '' |
- | + | ||
- | '' | + | |
(Replace '' | (Replace '' | ||
Line 71: | Line 70: | ||
Let's say you register an instance of '' | Let's say you register an instance of '' | ||
- | <code json> | + | < |
{ | { | ||
" | " | ||
Line 88: | Line 87: | ||
If you //do// want to have different models for each blockstate, you'd want to add multiple variants. For the same '' | If you //do// want to have different models for each blockstate, you'd want to add multiple variants. For the same '' | ||
- | <code json> | + | < |
{ | { | ||
" | " |
tutorial/blockstate.txt · Last modified: 2023/11/18 08:13 by solidblock