tutorial:blockentityrenderers
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
tutorial:blockentityrenderers [2019/07/28 07:03] – ↷ Page moved from blockentityrenderers to tutorial:blockentityrenderers fudge | tutorial:blockentityrenderers [2019/08/06 18:35] – fudge | ||
---|---|---|---|
Line 26: | Line 26: | ||
@Override | @Override | ||
public void onInitialize() { | public void onInitialize() { | ||
- | ... | + | |
BlockEntityRendererRegistry.INSTANCE.register(DemoBlockEntity.class, | BlockEntityRendererRegistry.INSTANCE.register(DemoBlockEntity.class, | ||
} | } | ||
Line 48: | Line 48: | ||
<code java> | <code java> | ||
public void render(DemoBlockEntity blockEntity, | public void render(DemoBlockEntity blockEntity, | ||
- | ... | + | [...] |
// Calculate the current offset in the y value | // Calculate the current offset in the y value | ||
double offset = Math.sin((blockEntity.getWorld().getTime() + partialTicks) / 8.0) / 4.0; | double offset = Math.sin((blockEntity.getWorld().getTime() + partialTicks) / 8.0) / 4.0; | ||
Line 64: | Line 64: | ||
<code java> | <code java> | ||
public void render(DemoBlockEntity blockEntity, | public void render(DemoBlockEntity blockEntity, | ||
- | ... | + | |
MinecraftClient.getInstance().getItemRenderer().renderItem(stack, | MinecraftClient.getInstance().getItemRenderer().renderItem(stack, | ||
Line 83: | Line 83: | ||
@Override | @Override | ||
public void render(DemoBlockEntity blockEntity, | public void render(DemoBlockEntity blockEntity, | ||
- | ... | + | |
| | ||
// Put this right above " | // Put this right above " | ||
Line 89: | Line 89: | ||
GLX.glMultiTexCoord2f(GLX.GL_TEXTURE1, | GLX.glMultiTexCoord2f(GLX.GL_TEXTURE1, | ||
| | ||
- | ... | + | |
} | } | ||
</ | </ | ||
The jukebox should now have the proper lighting. | The jukebox should now have the proper lighting. |
tutorial/blockentityrenderers.txt · Last modified: 2023/02/09 13:14 by mschae23