User Tools

Site Tools


tutorial:blockappearance

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tutorial:blockappearance [2020/03/30 17:30] – [Making a block invisible] liachtutorial:blockappearance [2021/09/09 15:57] – Link client-sided mod initializer to documentation:entrypoint daomephsta
Line 1: Line 1:
 ====== Manipulating a Block's appearance ====== ====== Manipulating a Block's appearance ======
  
-//This is the 1.15 version of this tutorial. For the 1.14 version, see [[tutorial:1.14:blockappearance|Manipulating a Block's appearance (1.14)]].//+//This is the 1.15+ (1.16 and 1.17 work fine too) version of this tutorial. For the 1.14 version, see [[tutorial:1.14:blockappearance|Manipulating a Block's appearance (1.14)]].//
  
 ===== Making a block transparent ===== ===== Making a block transparent =====
Line 7: Line 7:
 To fix this, you need to set your block's render layer to cutout or transparent. To fix this, you need to set your block's render layer to cutout or transparent.
  
-In a client-sided mod initializer, add:+In a [[documentation:entrypoint|client-sided mod initializer]], add:
 <code java> <code java>
 BlockRenderLayerMap.INSTANCE.putBlock(ExampleMod.MY_BLOCK, RenderLayer.getCutout()); BlockRenderLayerMap.INSTANCE.putBlock(ExampleMod.MY_BLOCK, RenderLayer.getCutout());
Line 24: Line 24:
  
 </code> </code>
 +
 +If you do not mark your block as non-opaque like this, then block faces behind the block will not render and you will be able to see through the world.
  
 ===== Making a block invisible ===== ===== Making a block invisible =====
tutorial/blockappearance.txt · Last modified: 2024/02/05 16:03 by haykam