tutorial:blocks
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
tutorial:blocks [2020/01/04 16:04] – [Next Steps] Classes? jamieswhiteshirt | tutorial:blocks [2020/03/30 17:35] – [Creating a Block class] liach | ||
---|---|---|---|
Line 138: | Line 138: | ||
</ | </ | ||
- | Just like we did in the item tutorial, you can override methods in the block class for custom functionality. | + | Just like we did in the item tutorial, you can override methods in the block class for custom functionality. |
+ | |||
+ | If you want your block to be transparent, in your client mod initializer code, do: | ||
+ | <code java> | ||
+ | BlockRenderLayerMap.putBlock(/ | ||
+ | </ | ||
+ | |||
+ | In versions before 1.15/ | ||
<code java> | <code java> | ||
@Environment(EnvType.CLIENT) | @Environment(EnvType.CLIENT) | ||
+ | @Override | ||
public BlockRenderLayer getRenderLayer() { | public BlockRenderLayer getRenderLayer() { | ||
return BlockRenderLayer.TRANSLUCENT; | return BlockRenderLayer.TRANSLUCENT; |
tutorial/blocks.txt · Last modified: 2024/04/15 01:52 by solidblock