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
Next revision
Previous revision
tutorial:blockstate [2024/08/24 14: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 {
-    public static final Chargeable CHARGEABLE_BLOCK = register(new ChargeableBlock(Block.Settings.copy(Blocks.STONE))"chargeable_block");+    // For versions below 1.21.2: 
 +    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.1724509190.txt.gz · Last modified: 2024/08/24 14:19 by solidblock