User Tools

Site Tools


tutorial:blocks

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
tutorial:blocks [2023/11/18 08:34] solidblocktutorial:blocks [2024/04/15 01:37] – [Creating a Block] update solidblock
Line 19: Line 19:
        You can find the stats of all vanilla blocks in the class `Blocks`, where you can also reference other blocks.        You can find the stats of all vanilla blocks in the class `Blocks`, where you can also reference other blocks.
     */     */
-    // public static final Block EXAMPLE_BLOCK = new Block(FabricBlockSettings.of(Material.METAL).strength(4.0f)); // fabric api version <= 0.77.0 +     
-    public static final Block EXAMPLE_BLOCK  = new Block(FabricBlockSettings.create().strength(4.0f));+    // For versions below 1.20: 
 +    // public static final Block EXAMPLE_BLOCK = new Block(FabricBlockSettings.of(Material.METAL).strength(4.0f)); 
 +    // For versions below 1.20.5: 
 +    // public static final Block EXAMPLE_BLOCK = new Block(FabricBlockSettings.create().strength(4.0f)); 
 +    // For versions since 1.20.5: 
 +    public static final Block EXAMPLE_BLOCK = new Block(Block.Settings.create().strength(4.0f)); 
 +    
     @Override     @Override
     public void onInitialize() {     public void onInitialize() {
tutorial/blocks.txt · Last modified: 2024/04/15 01:52 by solidblock