introduced cherry button

This commit is contained in:
2021-03-20 21:55:52 -04:00
parent 83fa41f982
commit 4bf3a96749
8 changed files with 160 additions and 1 deletions
@@ -0,0 +1,10 @@
package net.parsell.cherry.common.blocks;
import net.minecraft.block.AbstractBlock;
import net.minecraft.block.WoodenButtonBlock;
public class CherryButtonBlock extends WoodenButtonBlock {
public CherryButtonBlock(AbstractBlock.Settings settings) {
super(settings);
}
}
@@ -35,6 +35,8 @@ public class CherryBlocks {
public static final Block CHERRYTRAPDOOR = registerTrapDoor("cherry_trapdoor", FabricBlockSettings.copyOf(Blocks.OAK_TRAPDOOR), 5, 20); //TODO: recipe, loot_tables, tags (as required)
public static final Block CHERRYSLAB = registerSlab("cherry_slab", FabricBlockSettings.copyOf(Blocks.OAK_SLAB), 5, 20); // TODO: recipe, loot tables, tags (as required)
public static final Block CHERRYSTAIRS = registerStair("cherry_stairs", CHERRYPLANKS.getDefaultState(), FabricBlockSettings.copyOf(Blocks.OAK_STAIRS), 5, 20); //TODO: recipe, loot tables, tags (as required)
public static final Block CHERRYBUTTON = registerButton("cherry_button", FabricBlockSettings.copyOf(Blocks.OAK_BUTTON), 5, 20);
public static final Block CHERRYPRESSUREPLATE = reigsterPressurePlate("cherry_pressure_plate", FabricBlockSettings.copyOf(Blocks.OAK_PRESSURE_PLATE), 5, 20);
private static Block registerBlock(String blockID, FabricBlockSettings settings, int burnChance, int burnSpread) {
Block block = new Block(settings);
@@ -57,6 +59,13 @@ public class CherryBlocks {
return block;
}
private static Block registerButton(String blockID, FabricBlockSettings settings, int burnChance, int burnSpread) {
Block block = new CherryButtonBlock(settings);
Registry.register(Registry.BLOCK, new Identifier("cherry", blockID), block);
FlammableBlockRegistry.getDefaultInstance().add(block, burnChance, burnSpread);
return block;
}
private static Block registerFence(String blockID, FabricBlockSettings settings, int burnChance, int burnSpread) {
Block block = new FenceBlock(settings);
Registry.register(Registry.BLOCK, new Identifier("cherry", blockID), block);