User Tools

Site Tools


tutorial:blockstate

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
tutorial:blockstate [2024/08/26 01:19] solidblocktutorial:blockstate [2024/10/27 14:57] (current) solidblock
Line 24: Line 24:
 <code java> <code java>
 public final class TutorialBlocks { public final class TutorialBlocks {
 +    // For versions below 1.21.2:
     public static final Chargeable CHARGEABLE_BLOCK = register("chargeable_block", new ChargeableBlock(Block.Settings.copy(Blocks.STONE)));     public static final Chargeable CHARGEABLE_BLOCK = register("chargeable_block", new ChargeableBlock(Block.Settings.copy(Blocks.STONE)));
 +    // For versions since 1.21.2:
 +    public static final Chargeable CHARGEABLE_BLOCK = register("chargeable_block", ChargeableBlock::new, Block.Settings.copy(Blocks.STONE));
          
     // [...]     // [...]
tutorial/blockstate.1724635157.txt.gz · Last modified: 2024/08/26 01:19 by solidblock