|
|
@ -13,6 +13,7 @@ import net.minecraft.block.FenceBlock;
|
|
|
|
import net.minecraft.block.FenceGateBlock;
|
|
|
|
import net.minecraft.block.FenceGateBlock;
|
|
|
|
import net.minecraft.block.LeavesBlock;
|
|
|
|
import net.minecraft.block.LeavesBlock;
|
|
|
|
import net.minecraft.block.PillarBlock;
|
|
|
|
import net.minecraft.block.PillarBlock;
|
|
|
|
|
|
|
|
import net.minecraft.block.PressurePlateBlock;
|
|
|
|
import net.minecraft.block.SlabBlock;
|
|
|
|
import net.minecraft.block.SlabBlock;
|
|
|
|
import net.minecraft.client.render.RenderLayer;
|
|
|
|
import net.minecraft.client.render.RenderLayer;
|
|
|
|
import net.minecraft.util.Identifier;
|
|
|
|
import net.minecraft.util.Identifier;
|
|
|
@ -36,7 +37,7 @@ public class CherryBlocks {
|
|
|
|
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 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 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 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);
|
|
|
|
public static final Block CHERRYPRESSUREPLATE = registerPressurePlate("cherry_pressure_plate", PressurePlateBlock.ActivationRule.EVERYTHING, FabricBlockSettings.copyOf(Blocks.OAK_PRESSURE_PLATE), 5, 20);
|
|
|
|
|
|
|
|
|
|
|
|
private static Block registerBlock(String blockID, FabricBlockSettings settings, int burnChance, int burnSpread) {
|
|
|
|
private static Block registerBlock(String blockID, FabricBlockSettings settings, int burnChance, int burnSpread) {
|
|
|
|
Block block = new Block(settings);
|
|
|
|
Block block = new Block(settings);
|
|
|
@ -66,6 +67,13 @@ public class CherryBlocks {
|
|
|
|
return block;
|
|
|
|
return block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static Block registerPressurePlate(String blockID, PressurePlateBlock.ActivationRule rule, FabricBlockSettings settings, int burnChance, int burnSpread) {
|
|
|
|
|
|
|
|
Block block = new CherryPressurePlate(rule, 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) {
|
|
|
|
private static Block registerFence(String blockID, FabricBlockSettings settings, int burnChance, int burnSpread) {
|
|
|
|
Block block = new FenceBlock(settings);
|
|
|
|
Block block = new FenceBlock(settings);
|
|
|
|
Registry.register(Registry.BLOCK, new Identifier("cherry", blockID), block);
|
|
|
|
Registry.register(Registry.BLOCK, new Identifier("cherry", blockID), block);
|
|
|
|