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/11/14 11:53] – fudge | tutorial:blockstate [2020/03/19 10:10] – 1.15 juuz | ||
---|---|---|---|
Line 19: | Line 19: | ||
[...] | [...] | ||
@Override | @Override | ||
- | protected void appendProperties(StateFactory.Builder< | + | protected void appendProperties(StateManager.Builder< |
- | | + | |
} | } | ||
| | ||
Line 31: | Line 31: | ||
public MyBlock(Settings settings) { | public MyBlock(Settings settings) { | ||
super(settings); | super(settings); | ||
- | setDefaultState(getStateFactory().getDefaultState().with(HARDENED, | + | setDefaultState(getStateManager().getDefaultState().with(HARDENED, |
} | } | ||
| | ||
} | } | ||
</ | </ | ||
- | (To set multiple properties, chain `with()` calls) | + | (To set multiple properties, chain '' |
Now, to set the property we need to call '' | Now, to set the property we need to call '' | ||
Line 45: | Line 45: | ||
[...] | [...] | ||
@Override | @Override | ||
- | public | + | public |
world.setBlockState(pos, | world.setBlockState(pos, | ||
- | return | + | return |
} | } | ||
} | } |
tutorial/blockstate.txt · Last modified: 2023/11/18 08:13 by solidblock