Added flammability settings to every block

This commit is contained in:
Justin Parsell 2021-02-24 21:45:48 -05:00
parent cf841a04f6
commit 54855a1981
1 changed files with 4 additions and 0 deletions

View File

@ -1,6 +1,7 @@
package net.parsell.cherry.core; package net.parsell.cherry.core;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.fabricmc.fabric.api.registry.FlammableBlockRegistry;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.Blocks; import net.minecraft.block.Blocks;
import net.minecraft.block.LeavesBlock; import net.minecraft.block.LeavesBlock;
@ -17,6 +18,9 @@ public class CherryBlocks {
Registry.register(Registry.BLOCK, new Identifier("cherry", "cherry_log"), CHERRYLOG); Registry.register(Registry.BLOCK, new Identifier("cherry", "cherry_log"), CHERRYLOG);
Registry.register(Registry.BLOCK, new Identifier("cherry", "cherry_leaves"), CHERRYLEAVES); Registry.register(Registry.BLOCK, new Identifier("cherry", "cherry_leaves"), CHERRYLEAVES);
System.out.println("Successfully added blocks!"); System.out.println("Successfully added blocks!");
System.out.println("Setting flammability...");
FlammableBlockRegistry.getDefaultInstance().add(CHERRYLOG, 5, 5);
FlammableBlockRegistry.getDefaultInstance().add(CHERRYLEAVES, 30, 60);
} }
public static void init(){ public static void init(){