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 revision Previous revision
Next revision
Previous revision
tutorial:blockappearance [2020/01/17 13:54]
juuz use nonOpaque()
tutorial:blockappearance [2020/04/04 20:25] (current)
earthcomputer [Making a block transparent] Move paragraph outside code, oops
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 =====
Line 39: Line 41:
     @Override     @Override
     public VoxelShape getOutlineShape(BlockState blockState, BlockView blockView, BlockPos blockPos, EntityContext entityContext) {     public VoxelShape getOutlineShape(BlockState blockState, BlockView blockView, BlockPos blockPos, EntityContext entityContext) {
-       ​return VoxelShapes.empty;​+       ​return VoxelShapes.empty();
     }     }
 </​code>​ </​code>​
tutorial/blockappearance.1579269269.txt.gz ยท Last modified: 2020/01/17 13:54 by juuz