tutorial:containers
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
tutorial:containers [2020/04/02 11:05] – Add more @Override annotations earthcomputer | tutorial:containers [2020/04/02 12:57] – [Block and BlockItem] Revert BlockWithEntity change earthcomputer | ||
---|---|---|---|
Line 6: | Line 6: | ||
<code java [enable_line_numbers=" | <code java [enable_line_numbers=" | ||
- | public class BiggerChestBlock extends | + | public class BiggerChestBlock extends |
public BiggerChestBlock(Settings settings) { | public BiggerChestBlock(Settings settings) { | ||
super(settings); | super(settings); | ||
+ | } | ||
+ | | ||
+ | // A side effect of extending BlockWithEntity is it changes the render type to INVISIBLE, so we have to revert this | ||
+ | @Override | ||
+ | public BlockRenderType getRenderType(BlockState state) { | ||
+ | return BlockRenderType.MODEL; | ||
} | } | ||
tutorial/containers.txt · Last modified: 2022/05/27 15:57 by solidblock