Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.meepshadow.mysticsbiomes.init;
- import com.meepshadow.mysticsbiomes.MysticsBiomes;
- import com.meepshadow.mysticsbiomes.blocks.*;
- import com.meepshadow.mysticsbiomes.blocks.CakeBlock;
- import com.meepshadow.mysticsbiomes.world.layers.trees.LavenderTree;
- import net.minecraft.block.*;
- import net.minecraft.block.material.Material;
- import net.minecraft.block.material.MaterialColor;
- import net.minecraft.potion.Effects;
- import net.minecraftforge.common.ToolType;
- import net.minecraftforge.fml.RegistryObject;
- import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
- import net.minecraftforge.registries.DeferredRegister;
- import net.minecraftforge.registries.ForgeRegistries;
- public class ModBlock {
- @SuppressWarnings("deprecation")
- public static final DeferredRegister<Block> BLOCKS = new DeferredRegister<>(ForgeRegistries.BLOCKS, MysticsBiomes.MOD_ID);
- // Blocks
- public static final RegistryObject<Block> DANDELION_LEAVES = BLOCKS.register("dandelion_leaves", () -> new LeavesBlock(Block.Properties.create(Material.LEAVES).hardnessAndResistance(0.2F).tickRandomly().sound(SoundType.PLANT).notSolid()));
- public static final RegistryObject<Block> LEMON_LIME_LEAVES = BLOCKS.register("lemon_lime_leaves", () -> new LeavesBlock(Block.Properties.create(Material.LEAVES).hardnessAndResistance(0.2F).tickRandomly().sound(SoundType.PLANT).notSolid()));
- public static final RegistryObject<Block> SEAFOAM_LEAVES = BLOCKS.register("seafoam_leaves", () -> new LeavesBlock(Block.Properties.create(Material.LEAVES).hardnessAndResistance(0.2F).tickRandomly().sound(SoundType.PLANT).notSolid()));
- public static final RegistryObject<Block> TROPICAL_LEAVES = BLOCKS.register("tropical_leaves", () -> new LeavesBlock(Block.Properties.create(Material.LEAVES).hardnessAndResistance(0.2F).tickRandomly().sound(SoundType.PLANT).notSolid()));
- public static final RegistryObject<Block> STRAWBERRY_LEAVES = BLOCKS.register("strawberry_leaves", () -> new LeavesBlock(Block.Properties.create(Material.LEAVES).hardnessAndResistance(0.2F).tickRandomly().sound(SoundType.PLANT).notSolid()));
- public static final RegistryObject<Block> SWEET_STRAWBERRY_LEAVES = BLOCKS.register("sweet_strawberry_leaves", () -> new LeavesBlock(Block.Properties.create(Material.LEAVES).hardnessAndResistance(0.2F).tickRandomly().sound(SoundType.PLANT).notSolid()));
- public static final RegistryObject<Block> LAVENDER_LEAVES = BLOCKS.register("lavender_leaves", () -> new LeavesBlock(Block.Properties.create(Material.LEAVES).hardnessAndResistance(0.2F).tickRandomly().sound(SoundType.PLANT).notSolid()));
- public static final RegistryObject<Block> MYSTIC_LEAVES = BLOCKS.register("mystic_leaves", () -> new LeavesBlock(Block.Properties.create(Material.LEAVES).hardnessAndResistance(0.2F).tickRandomly().sound(SoundType.PLANT).notSolid()));
- public static final RegistryObject<Block> DANDELION_LOG = BLOCKS.register("dandelion_log", () -> new LogBlock(MaterialColor.WOOD, Block.Properties.create(Material.WOOD, MaterialColor.YELLOW).hardnessAndResistance(2.0F).sound(SoundType.WOOD)));
- public static final RegistryObject<Block> DANDELION_PLANKS = BLOCKS.register("dandelion_planks", DandelionPlanks::new);
- public static final RegistryObject<Block> DANDELION_STAIRS = BLOCKS.register("dandelion_stairs", () -> new StairsBlock(() -> ModBlock.DANDELION_PLANKS.get().getDefaultState(), Block.Properties.create(Material.WOOD).hardnessAndResistance(2.0F).sound(SoundType.WOOD).harvestLevel(0).harvestTool(ToolType.AXE)));
- public static final RegistryObject<Block> DANDELION_SLAB = BLOCKS.register("dandelion_slab", () -> new SlabBlock(Block.Properties.create(Material.WOOD, MaterialColor.WOOD).hardnessAndResistance(2.0F, 3.0F).sound(SoundType.WOOD)));
- public static final RegistryObject<Block> LEMON_LIME_LOG = BLOCKS.register("lemon_lime_log", () -> new LogBlock(MaterialColor.WOOD, Block.Properties.create(Material.WOOD, MaterialColor.LIME).hardnessAndResistance(2.0F).sound(SoundType.WOOD)));
- public static final RegistryObject<Block> LEMON_LIME_PLANKS = BLOCKS.register("lemon_lime_planks", LemonLimePlanks::new);
- public static final RegistryObject<Block> LEMON_LIME_STAIRS = BLOCKS.register("lemon_lime_stairs", () -> new StairsBlock(() -> ModBlock.LEMON_LIME_PLANKS.get().getDefaultState(), Block.Properties.create(Material.WOOD).hardnessAndResistance(2.0F).sound(SoundType.WOOD).harvestLevel(0).harvestTool(ToolType.AXE)));
- public static final RegistryObject<Block> LEMON_LIME_SLAB = BLOCKS.register("lemon_lime_slab", () -> new SlabBlock(Block.Properties.create(Material.WOOD, MaterialColor.WOOD).hardnessAndResistance(2.0F, 3.0F).sound(SoundType.WOOD)));
- public static final RegistryObject<Block> SEAFOAM_LOG = BLOCKS.register("seafoam_log", () -> new LogBlock(MaterialColor.WOOD, Block.Properties.create(Material.WOOD, MaterialColor.CYAN).hardnessAndResistance(2.0F).sound(SoundType.WOOD)));
- public static final RegistryObject<Block> SEAFOAM_PLANKS = BLOCKS.register("seafoam_planks", SeaFoamPlanks::new);
- public static final RegistryObject<Block> SEAFOAM_STAIRS = BLOCKS.register("seafoam_stairs", () -> new StairsBlock(() -> ModBlock.SEAFOAM_PLANKS.get().getDefaultState(), Block.Properties.create(Material.WOOD).hardnessAndResistance(2.0F).sound(SoundType.WOOD).harvestLevel(0).harvestTool(ToolType.AXE)));
- public static final RegistryObject<Block> SEAFOAM_SLAB = BLOCKS.register("seafoam_slab", () -> new SlabBlock(Block.Properties.create(Material.WOOD, MaterialColor.WOOD).hardnessAndResistance(2.0F, 3.0F).sound(SoundType.WOOD)));
- public static final RegistryObject<Block> TROPICAL_LOG = BLOCKS.register("tropical_log", () -> new LogBlock(MaterialColor.WOOD, Block.Properties.create(Material.WOOD, MaterialColor.BLUE).hardnessAndResistance(2.0F).sound(SoundType.WOOD)));
- public static final RegistryObject<Block> TROPICAL_PLANKS = BLOCKS.register("tropical_planks", TropicalPlanks::new);
- public static final RegistryObject<Block> TROPICAL_STAIRS = BLOCKS.register("tropical_stairs", () -> new StairsBlock(() -> ModBlock.TROPICAL_PLANKS.get().getDefaultState(), Block.Properties.create(Material.WOOD).hardnessAndResistance(2.0F).sound(SoundType.WOOD).harvestLevel(0).harvestTool(ToolType.AXE)));
- public static final RegistryObject<Block> TROPICAL_SLAB = BLOCKS.register("tropical_slab", () -> new SlabBlock(Block.Properties.create(Material.WOOD, MaterialColor.WOOD).hardnessAndResistance(2.0F, 3.0F).sound(SoundType.WOOD)));
- public static final RegistryObject<Block> STRAWBERRY_LOGS = BLOCKS.register("strawberry_logs", () -> new LogBlock(MaterialColor.WOOD, Block.Properties.create(Material.WOOD, MaterialColor.PINK).hardnessAndResistance(2.0F).sound(SoundType.WOOD)));
- public static final RegistryObject<Block> STRAWBERRY_PLANKS = BLOCKS.register("strawberry_planks", StrawberryPlanks::new);
- public static final RegistryObject<Block> STRAWBERRY_STAIRS = BLOCKS.register("strawberry_stairs", () -> new StairsBlock(() -> ModBlock.STRAWBERRY_PLANKS.get().getDefaultState(), Block.Properties.create(Material.WOOD).hardnessAndResistance(2.0F).sound(SoundType.WOOD).harvestLevel(0).harvestTool(ToolType.AXE)));
- public static final RegistryObject<Block> STRAWBERRY_SLAB = BLOCKS.register("strawberry_slab", () -> new SlabBlock(Block.Properties.create(Material.WOOD, MaterialColor.WOOD).hardnessAndResistance(2.0F, 3.0F).sound(SoundType.WOOD)));
- public static final RegistryObject<Block> SWEET_STRAWBERRY_LOG = BLOCKS.register("sweet_strawberry_log", () -> new LogBlock(MaterialColor.WOOD, Block.Properties.create(Material.WOOD, MaterialColor.PINK).hardnessAndResistance(2.0F).sound(SoundType.WOOD)));
- public static final RegistryObject<Block> STRIPPED_SWEET_STRAWBERRY_LOG = BLOCKS.register("stripped_sweet_strawberry_log", () -> new LogBlock(MaterialColor.WOOD, Block.Properties.create(Material.WOOD, MaterialColor.PINK).hardnessAndResistance(2.0F).sound(SoundType.WOOD)));
- public static final RegistryObject<Block> SWEET_STRAWBERRY_PLANKS = BLOCKS.register("sweet_strawberry_planks", SweetStrawberryPlanks::new);
- public static final RegistryObject<Block> SWEET_STRAWBERRY_STAIRS = BLOCKS.register("sweet_strawberry_stairs", () -> new StairsBlock(() -> ModBlock.SWEET_STRAWBERRY_PLANKS.get().getDefaultState(), Block.Properties.create(Material.WOOD).hardnessAndResistance(2.0F).sound(SoundType.WOOD).harvestLevel(0).harvestTool(ToolType.AXE)));
- public static final RegistryObject<Block> SWEET_STRAWBERRY_SLAB = BLOCKS.register("sweet_strawberry_slab", () -> new SlabBlock(Block.Properties.create(Material.WOOD, MaterialColor.WOOD).hardnessAndResistance(2.0F, 3.0F).sound(SoundType.WOOD)));
- public static final RegistryObject<Block> LAVENDER_LOG = BLOCKS.register("lavender_log", () -> new LogBlock(MaterialColor.WOOD, Block.Properties.create(Material.WOOD, MaterialColor.PURPLE).hardnessAndResistance(2.0F).sound(SoundType.WOOD)));
- public static final RegistryObject<Block> LAVENDER_PLANKS = BLOCKS.register("lavender_planks", LavenderPlanks::new);
- public static final RegistryObject<Block> LAVENDER_STAIRS = BLOCKS.register("lavender_stairs", () -> new StairsBlock(() -> ModBlock.LAVENDER_PLANKS.get().getDefaultState(), Block.Properties.create(Material.WOOD).hardnessAndResistance(2.0F).sound(SoundType.WOOD).harvestLevel(0).harvestTool(ToolType.AXE)));
- public static final RegistryObject<Block> LAVENDER_SLAB = BLOCKS.register("lavender_slab", () -> new SlabBlock(Block.Properties.create(Material.WOOD, MaterialColor.WOOD).hardnessAndResistance(2.0F, 3.0F).sound(SoundType.WOOD)));
- public static final RegistryObject<Block> MYSTIC_LOG = BLOCKS.register("mystic_log", () -> new LogBlock(MaterialColor.WOOD, Block.Properties.create(Material.WOOD, MaterialColor.PURPLE).hardnessAndResistance(2.0F).sound(SoundType.WOOD)));
- public static final RegistryObject<Block> MYSTIC_PLANKS = BLOCKS.register("mystic_planks", MysticPlanks::new);
- public static final RegistryObject<Block> MYSTIC_STAIRS = BLOCKS.register("mystic_stairs", () -> new StairsBlock(() -> ModBlock.MYSTIC_PLANKS.get().getDefaultState(), Block.Properties.create(Material.WOOD).hardnessAndResistance(2.0F).sound(SoundType.WOOD).harvestLevel(0).harvestTool(ToolType.AXE)));
- public static final RegistryObject<Block> MYSTIC_SLAB = BLOCKS.register("mystic_slab", () -> new SlabBlock(Block.Properties.create(Material.WOOD, MaterialColor.WOOD).hardnessAndResistance(2.0F, 3.0F).sound(SoundType.WOOD)));
- public static final RegistryObject<Block> LAVENDER = BLOCKS.register("lavender", () -> new ModFlower(Effects.HEALTH_BOOST, 9, Block.Properties.create(Material.PLANTS).doesNotBlockMovement().hardnessAndResistance(0F).sound(SoundType.PLANT)));
- public static final RegistryObject<Block> PINK_TULIP = BLOCKS.register("pink_tulip", () -> new ModFlower(Effects.SPEED, 9, Block.Properties.create(Material.PLANTS).doesNotBlockMovement().hardnessAndResistance(0F).sound(SoundType.PLANT)));
- public static final RegistryObject<Block> STRAWBERRY_CAKE_BLOCK = BLOCKS.register("strawberry_cake", () -> new CakeBlock(Block.Properties.create(Material.CAKE).hardnessAndResistance(0.5F).sound(SoundType.CLOTH)));
- public static final RegistryObject<Block> CHOCOLATE_CAKE_BLOCK = BLOCKS.register("chocolate_cake", () -> new CakeBlock(Block.Properties.create(Material.CAKE).hardnessAndResistance(0.5F).sound(SoundType.CLOTH)));
- public static final RegistryObject<Block> VANILLA_CAKE_BLOCK = BLOCKS.register("vanilla_cake", () -> new CakeBlock(Block.Properties.create(Material.CAKE).hardnessAndResistance(0.5F).sound(SoundType.CLOTH)));
- public static final RegistryObject<Block> PINK_CAKE_BLOCK = BLOCKS.register("pink_cake", () -> new CakeBlock(Block.Properties.create(Material.CAKE).hardnessAndResistance(0.5F).sound(SoundType.CLOTH)));
- public static final RegistryObject<Block> ORANGE_CAKE_BLOCK = BLOCKS.register("orange_cake", () -> new CakeBlock(Block.Properties.create(Material.CAKE).hardnessAndResistance(0.5F).sound(SoundType.CLOTH)));
- public static final RegistryObject<Block> YELLOW_CAKE_BLOCK = BLOCKS.register("yellow_cake", () -> new CakeBlock(Block.Properties.create(Material.CAKE).hardnessAndResistance(0.5F).sound(SoundType.CLOTH)));
- public static final RegistryObject<Block> LIME_CAKE_BLOCK = BLOCKS.register("lime_cake", () -> new CakeBlock(Block.Properties.create(Material.CAKE).hardnessAndResistance(0.5F).sound(SoundType.CLOTH)));
- public static final RegistryObject<Block> CYAN_CAKE_BLOCK = BLOCKS.register("cyan_cake", () -> new CakeBlock(Block.Properties.create(Material.CAKE).hardnessAndResistance(0.5F).sound(SoundType.CLOTH)));
- public static final RegistryObject<Block> PURPLE_CAKE_BLOCK = BLOCKS.register("purple_cake", () -> new CakeBlock(Block.Properties.create(Material.CAKE).hardnessAndResistance(0.5F).sound(SoundType.CLOTH)));
- public static final RegistryObject<Block> MAGENTA_CAKE_BLOCK = BLOCKS.register("magenta_cake", () -> new CakeBlock(Block.Properties.create(Material.CAKE).hardnessAndResistance(0.5F).sound(SoundType.CLOTH)));
- public static final RegistryObject<Block> SERENE_CRYSTAL_ORE = BLOCKS.register("serene_crystal_ore", () -> new OreBlock(Block.Properties.create(Material.ROCK).hardnessAndResistance(3.0F, 3.0F).harvestLevel(3).harvestTool(ToolType.PICKAXE)));
- public static final RegistryObject<Block> SAPPHIRE_ORE = BLOCKS.register("sapphire_ore", () -> new OreBlock(Block.Properties.create(Material.ROCK).hardnessAndResistance(3.0F, 3.0F).harvestLevel(2).harvestTool(ToolType.PICKAXE)));
- public static final RegistryObject<Block> LAVENDER_SAPLING = BLOCKS.register("lavender_sapling", () -> new ModSapling(new LavenderTree(), Block.Properties.create(Material.PLANTS).doesNotBlockMovement().tickRandomly().hardnessAndResistance(0).sound(SoundType.PLANT)));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement