tutorial:blockentityrenderers
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:blockentityrenderers [2019/08/06 18:35] – fudge | tutorial:blockentityrenderers [2019/08/13 14:31] – Register block entity renderers in ClientModInitializer jamieswhiteshirt | ||
---|---|---|---|
Line 3: | Line 3: | ||
Make sure you [[tutorial: | Make sure you [[tutorial: | ||
===== Introduction ===== | ===== Introduction ===== | ||
- | Some may say blocks | + | Blocks |
they just stay static at a certain location and a certain size until broken. | they just stay static at a certain location and a certain size until broken. | ||
We can use block entity renderers to render items and blocks associated with a block entity far more dynamically - render multiple different items, | We can use block entity renderers to render items and blocks associated with a block entity far more dynamically - render multiple different items, | ||
Line 22: | Line 22: | ||
} | } | ||
</ | </ | ||
- | And register it: | + | And register it in our ClientModInitializer: |
<code java> | <code java> | ||
@Override | @Override | ||
- | public void onInitialize() { | + | public void onInitializeClient() { |
[...] | [...] | ||
BlockEntityRendererRegistry.INSTANCE.register(DemoBlockEntity.class, | BlockEntityRendererRegistry.INSTANCE.register(DemoBlockEntity.class, |
tutorial/blockentityrenderers.txt · Last modified: 2023/02/09 13:14 by mschae23