tutorial:blockappearance
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tutorial:blockappearance [2024/08/26 08:28] – solidblock | tutorial:blockappearance [2025/12/06 21:44] (current) – cassiancc | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ~~REDIRECT> | ||
| ====== Manipulating a Block' | ====== Manipulating a Block' | ||
| Line 8: | Line 9: | ||
| In a [[documentation: | In a [[documentation: | ||
| - | < | + | //For version 1.21.5 and before:// |
| + | < | ||
| @Environment(EnvType.CLIENT) | @Environment(EnvType.CLIENT) | ||
| - | public class ExampleModClient implements ClientModInitializer() { | + | public class ExampleModClient implements ClientModInitializer { |
| public void onInitializeClient() { | public void onInitializeClient() { | ||
| // To make some parts of the block transparent (like glass, saplings and doors): | // To make some parts of the block transparent (like glass, saplings and doors): | ||
| - | BlockRenderLayerMap.INSTANCE.putBlock(TutorialBlocks.MY_BLOCK, | + | BlockRenderLayerMap.INSTANCE.putBlock(TutorialBlocks.MY_BLOCK, |
| | | ||
| // To make some parts of the block translucent (like ice, stained glass and portal) | // To make some parts of the block translucent (like ice, stained glass and portal) | ||
| - | BlockRenderLayerMap.INSTANCE.putBlock(TutorialBlocks.MY_BLOCK, | + | BlockRenderLayerMap.INSTANCE.putBlock(TutorialBlocks.MY_BLOCK, |
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | //For version 1.21.6 and after: // | ||
| + | < | ||
| + | @Environment(EnvType.CLIENT) | ||
| + | public class ExampleModClient implements ClientModInitializer { | ||
| + | public void onInitializeClient() { | ||
| + | // To make some parts of the block transparent (like glass, saplings and doors): | ||
| + | BlockRenderLayerMap.putBlock(TutorialBlocks.MY_BLOCK, | ||
| + | |||
| + | // To make some parts of the block translucent (like ice, stained glass and portal) | ||
| + | BlockRenderLayerMap.putBlock(TutorialBlocks.MY_BLOCK, | ||
| } | } | ||
| } | } | ||
tutorial/blockappearance.1724660896.txt.gz · Last modified: 2024/08/26 08:28 by solidblock