/* * This file ("InitBlocks.java") is part of the Actually Additions mod for Minecraft. * It is created and owned by Ellpeck and distributed * under the Actually Additions License to be found at * http://ellpeck.de/actaddlicense * View the source code at https://github.com/Ellpeck/ActuallyAdditions * * © 2015-2017 Ellpeck */ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockPlant; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals; import net.minecraft.block.*; import net.minecraft.block.material.Material; import net.minecraftforge.common.ToolType; import net.minecraftforge.fml.RegistryObject; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; public final class ActuallyBlocks { public static final DeferredRegister BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, ActuallyAdditions.MODID); public static final AbstractBlock.Properties miscBlockProperties = AbstractBlock.Properties.create(Material.ROCK).harvestLevel(1).harvestTool(ToolType.PICKAXE).hardnessAndResistance(1.5f,10f); public static final RegistryObject blockMisc = BLOCKS.register("block_misc", () -> new Block(miscBlockProperties)); // TODO this isnt a real block? public static final RegistryObject WOOD_CASING = BLOCKS.register("block_wood_casing", () -> new Block(miscBlockProperties)); public static final RegistryObject IRON_CASING = BLOCKS.register("block_iron_casing", () -> new Block(miscBlockProperties)); public static final RegistryObject ENDER_CASING = BLOCKS.register("block_ender_casing", () -> new Block(miscBlockProperties)); public static final RegistryObject LAVA_CASING = BLOCKS.register("block_lava_casing", () -> new Block(miscBlockProperties)); public static final RegistryObject WILD_PLANT = BLOCKS.register("block_wild", BlockWildPlant::new); public static final RegistryObject FEEDER = BLOCKS.register("block_feeder", BlockFeeder::new); public static final RegistryObject GRINDER = BLOCKS.register("block_grinder", () -> new BlockGrinder(false)); public static final RegistryObject GRINDER_DOUBLE = BLOCKS.register("block_grinder_double", () -> new BlockGrinder(true)); public static final RegistryObject CRYSTAL_CLUSTER_REDSTONE = BLOCKS.register("block_crystal_cluster_redstone", () -> new BlockCrystalCluster(TheCrystals.REDSTONE)); public static final RegistryObject CRYSTAL_CLUSTER_LAPIS = BLOCKS.register("block_crystal_cluster_lapis", () -> new BlockCrystalCluster(TheCrystals.LAPIS)); public static final RegistryObject CRYSTAL_CLUSTER_DIAMOND = BLOCKS.register("block_crystal_cluster_diamond", () -> new BlockCrystalCluster(TheCrystals.DIAMOND)); public static final RegistryObject CRYSTAL_CLUSTER_COAL = BLOCKS.register("block_crystal_cluster_coal", () -> new BlockCrystalCluster(TheCrystals.COAL)); public static final RegistryObject CRYSTAL_CLUSTER_EMERALD = BLOCKS.register("block_crystal_cluster_emerald", () -> new BlockCrystalCluster(TheCrystals.EMERALD)); public static final RegistryObject CRYSTAL_CLUSTER_IRON = BLOCKS.register("block_crystal_cluster_iron", () -> new BlockCrystalCluster(TheCrystals.IRON)); public static final RegistryObject BATTERY_BOX = BLOCKS.register("block_battery_box", BlockBatteryBox::new); public static final RegistryObject ITEM_VIEWER_HOPPING = BLOCKS.register("block_item_viewer_hopping", BlockItemViewerHopping::new); public static final RegistryObject FARMER = BLOCKS.register("block_farmer", BlockFarmer::new); public static final RegistryObject BIOREACTOR = BLOCKS.register("block_bio_reactor", BlockBioReactor::new); public static final RegistryObject EMPOWERER = BLOCKS.register("block_empowerer", BlockEmpowerer::new); public static final RegistryObject TINY_TORCH = BLOCKS.register("block_tiny_torch", BlockTinyTorch::new); public static final RegistryObject SHOCK_SUPPRESSOR = BLOCKS.register("block_shock_suppressor", BlockShockSuppressor::new); public static final RegistryObject DISPLAY_STAND = BLOCKS.register("block_display_stand", BlockDisplayStand::new); public static final RegistryObject PLAYER_INTERFACE = BLOCKS.register("block_player_interface", BlockPlayerInterface::new); public static final RegistryObject ITEM_VIEWER = BLOCKS.register("block_item_viewer", BlockItemViewer::new); public static final RegistryObject FIREWORK_BOX = BLOCKS.register("block_firework_box", BlockFireworkBox::new); public static final RegistryObject MINER = BLOCKS.register("block_miner", BlockMiner::new); public static final RegistryObject ATOMIC_RECONSTRUCTOR = BLOCKS.register("block_atomic_reconstructor", BlockAtomicReconstructor::new); public static final RegistryObject LASER_RELAY = BLOCKS.register("block_laser_relay", () -> new BlockLaserRelay(BlockLaserRelay.Type.ENERGY_BASIC)); public static final RegistryObject LASER_RELAY_ADVANCED = BLOCKS.register("block_laser_relay_advanced", () -> new BlockLaserRelay(BlockLaserRelay.Type.ENERGY_ADVANCED)); public static final RegistryObject LASER_RELAY_EXTREME = BLOCKS.register("block_laser_relay_extreme", () -> new BlockLaserRelay(BlockLaserRelay.Type.ENERGY_EXTREME)); public static final RegistryObject LASER_RELAY_FLUIDS = BLOCKS.register("block_laser_relay_fluids", () -> new BlockLaserRelay(BlockLaserRelay.Type.FLUIDS)); public static final RegistryObject LASER_RELAY_ITEM = BLOCKS.register("block_laser_relay_item", () -> new BlockLaserRelay(BlockLaserRelay.Type.ITEM)); public static final RegistryObject LASER_RELAY_ITEM_WHITELIST = BLOCKS.register("block_laser_relay_item_whitelist", () -> new BlockLaserRelay(BlockLaserRelay.Type.ITEM_WHITELIST)); public static final RegistryObject RANGED_COLLECTOR = BLOCKS.register("block_ranged_collector", BlockRangedCollector::new); public static final RegistryObject DIRECTIONAL_BREAKER = BLOCKS.register("block_directional_breaker", BlockDirectionalBreaker::new); public static final RegistryObject LEAF_GENERATOR = BLOCKS.register("block_leaf_generator", BlockLeafGenerator::new); public static final RegistryObject XP_SOLIDIFIER = BLOCKS.register("block_xp_solidifier", BlockXPSolidifier::new); public static final RegistryObject TESTIFI_BUCKS_GREEN_WALL = BLOCKS.register("block_testifi_bucks_green_wall", BlockGeneric::new); public static final RegistryObject TESTIFI_BUCKS_WHITE_WALL = BLOCKS.register("block_testifi_bucks_white_wall", BlockGeneric::new); public static final RegistryObject TESTIFI_BUCKS_GREEN_STAIRS = BLOCKS.register("block_testifi_bucks_green_stairs", () -> new StairsBlock(() -> TESTIFI_BUCKS_GREEN_WALL.get().getDefaultState(), AbstractBlock.Properties.from(TESTIFI_BUCKS_GREEN_WALL.get()))); public static final RegistryObject TESTIFI_BUCKS_WHITE_STAIRS = BLOCKS.register("block_testifi_bucks_white_stairs", () -> new StairsBlock(() -> TESTIFI_BUCKS_WHITE_WALL.get().getDefaultState(), AbstractBlock.Properties.from(TESTIFI_BUCKS_WHITE_WALL.get()))); public static final RegistryObject TESTIFI_BUCKS_GREEN_SLAB = BLOCKS.register("block_testifi_bucks_green_slab", () -> new SlabBlock(AbstractBlock.Properties.from(TESTIFI_BUCKS_GREEN_WALL.get()))); public static final RegistryObject TESTIFI_BUCKS_WHITE_SLAB = BLOCKS.register("block_testifi_bucks_white_slab", () -> new SlabBlock(AbstractBlock.Properties.from(TESTIFI_BUCKS_WHITE_WALL.get()))); public static final RegistryObject TESTIFI_BUCKS_GREEN_FENCE = BLOCKS.register("block_testifi_bucks_green_fence", () -> new WallBlock(AbstractBlock.Properties.from(TESTIFI_BUCKS_GREEN_WALL.get()))); public static final RegistryObject TESTIFI_BUCKS_WHITE_FENCE = BLOCKS.register("block_testifi_bucks_white_fence", () -> new WallBlock(AbstractBlock.Properties.from(TESTIFI_BUCKS_WHITE_WALL.get()))); public static final RegistryObject CRYSTAL_ENORI = BLOCKS.register("crystal_enori_block", () -> new BlockCrystal(false)); public static final RegistryObject CRYSTAL_RESTONIA = BLOCKS.register("crystal_restonia_block", () -> new BlockCrystal(false)); public static final RegistryObject CRYSTAL_PALIS = BLOCKS.register("crystal_palis_block", () -> new BlockCrystal(false)); public static final RegistryObject CRYSTAL_DIAMATINE = BLOCKS.register("crystal_diamatine_block", () -> new BlockCrystal(false)); public static final RegistryObject CRYSTAL_VOID = BLOCKS.register("crystal_void_block", () -> new BlockCrystal(false)); public static final RegistryObject CRYSTAL_EMERADIC = BLOCKS.register("crystal_emeradic_block", () -> new BlockCrystal(false)); public static final RegistryObject CRYSTAL_EMPOWERED_ENORI = BLOCKS.register("crystal_enori_empowered_block", () -> new BlockCrystal(true)); public static final RegistryObject CRYSTAL_EMPOWERED_RESTONIA = BLOCKS.register("crystal_restonia_empowered_block", () -> new BlockCrystal(true)); public static final RegistryObject CRYSTAL_EMPOWERED_PALIS = BLOCKS.register("crystal_palis_empowered_block", () -> new BlockCrystal(true)); public static final RegistryObject CRYSTAL_EMPOWERED_DIAMATINE = BLOCKS.register("crystal_diamatine_empowered_block", () -> new BlockCrystal(true)); public static final RegistryObject CRYSTAL_EMPOWERED_VOID = BLOCKS.register("crystal_void_empowered_block", () -> new BlockCrystal(true)); public static final RegistryObject CRYSTAL_EMPOWERED_EMERADIC = BLOCKS.register("crystal_emeradic_empowered_block", () -> new BlockCrystal(true)); public static final RegistryObject LAMP_WHITE = BLOCKS.register("lamp_white_block", BlockColoredLamp::new); public static final RegistryObject LAMP_ORANGE = BLOCKS.register("lamp_orange_block", BlockColoredLamp::new); public static final RegistryObject LAMP_MAGENTA = BLOCKS.register("lamp_magenta_block", BlockColoredLamp::new); public static final RegistryObject LAMP_LIGHT_BLUE = BLOCKS.register("lamp_light_blue_block", BlockColoredLamp::new); public static final RegistryObject LAMP_YELLOW = BLOCKS.register("lamp_yellow_block", BlockColoredLamp::new); public static final RegistryObject LAMP_LIME = BLOCKS.register("lamp_lime_block", BlockColoredLamp::new); public static final RegistryObject LAMP_PINK = BLOCKS.register("lamp_pink_block", BlockColoredLamp::new); public static final RegistryObject LAMP_GRAY = BLOCKS.register("lamp_gray_block", BlockColoredLamp::new); public static final RegistryObject LAMP_LIGHT_GRAY = BLOCKS.register("lamp_light_gray_block", BlockColoredLamp::new); public static final RegistryObject LAMP_CYAN = BLOCKS.register("lamp_cyan_block", BlockColoredLamp::new); public static final RegistryObject LAMP_PURPLE = BLOCKS.register("lamp_purple_block", BlockColoredLamp::new); public static final RegistryObject LAMP_BLUE = BLOCKS.register("lamp_blue_block", BlockColoredLamp::new); public static final RegistryObject LAMP_BROWN = BLOCKS.register("lamp_brown_block", BlockColoredLamp::new); public static final RegistryObject LAMP_GREEN = BLOCKS.register("lamp_green_block", BlockColoredLamp::new); public static final RegistryObject LAMP_RED = BLOCKS.register("lamp_red_block", BlockColoredLamp::new); public static final RegistryObject LAMP_BLACK = BLOCKS.register("lamp_black_block", BlockColoredLamp::new); // public static final RegistryObject blockColoredLamp = BLOCKS.register("block_colored_lamp", () -> new BlockColoredLamp()); // public static final RegistryObject blockColoredLampOn = BLOCKS.register("block_colored_lamp_on", () -> new BlockColoredLamp()); public static final RegistryObject LAMP_POWERER = BLOCKS.register("block_lamp_powerer", BlockLampPowerer::new); // public static final RegistryObject blockTreasureChest = BLOCKS.register("block_treasure_chest", BlockTreasureChest::new); public static final RegistryObject ENERGIZER = BLOCKS.register("block_energizer", () -> new BlockEnergizer(true)); public static final RegistryObject ENERVATOR = BLOCKS.register("block_enervator", () -> new BlockEnergizer(false)); public static final RegistryObject LAVA_FACTORY_CONTROLLER = BLOCKS.register("block_lava_factory_controller", BlockLavaFactoryController::new); public static final RegistryObject CANOLA_PRESS = BLOCKS.register("block_canola_press", BlockCanolaPress::new); public static final RegistryObject PHANTOMFACE = BLOCKS.register("block_phantomface", () -> new BlockPhantom(BlockPhantom.Type.FACE)); public static final RegistryObject PHANTOM_PLACER = BLOCKS.register("block_phantom_placer", () -> new BlockPhantom(BlockPhantom.Type.PLACER)); public static final RegistryObject PHANTOM_LIQUIFACE = BLOCKS.register("block_phantom_liquiface", () -> new BlockPhantom(BlockPhantom.Type.LIQUIFACE)); public static final RegistryObject PHANTOM_ENERGYFACE = BLOCKS.register("block_phantom_energyface", () -> new BlockPhantom(BlockPhantom.Type.ENERGYFACE)); public static final RegistryObject PHANTOM_REDSTONEFACE = BLOCKS.register("block_phantom_redstoneface", () -> new BlockPhantom(BlockPhantom.Type.REDSTONEFACE)); public static final RegistryObject PHANTOM_BREAKER = BLOCKS.register("block_phantom_breaker", () -> new BlockPhantom(BlockPhantom.Type.BREAKER)); public static final RegistryObject COAL_GENERATOR = BLOCKS.register("block_coal_generator", BlockCoalGenerator::new); public static final RegistryObject OIL_GENERATOR = BLOCKS.register("block_oil_generator", BlockOilGenerator::new); public static final RegistryObject FERMENTING_BARREL = BLOCKS.register("block_fermenting_barrel", BlockFermentingBarrel::new); public static final RegistryObject RICE = BLOCKS.register("block_rice", () -> new BlockPlant(ActuallyItems.itemRiceSeed.get()));// TODO: [port][replace] ensure values match these new BlockPlant(1, 2)); public static final RegistryObject CANOLA = BLOCKS.register("block_canola", () -> new BlockPlant(ActuallyItems.itemCanolaSeed.get()));// TODO: [port][replace] ensure values match these new BlockPlant(2, 3)); public static final RegistryObject FLAX = BLOCKS.register("block_flax", () -> new BlockPlant(ActuallyItems.itemFlaxSeed.get()));// TODO: [port][replace] ensure values match these new BlockPlant(2, 4)); public static final RegistryObject COFFEE = BLOCKS.register("block_coffee", () -> new BlockPlant(ActuallyItems.itemCoffeeSeed.get()));// TODO: [port][replace] ensure values match these new BlockPlant(2, 2)); public static final RegistryObject FURNACE_DOUBLE = BLOCKS.register("block_furnace_double", BlockFurnaceDouble::new); public static final RegistryObject INPUTTER = BLOCKS.register("block_inputter", () -> new BlockInputter(false)); public static final RegistryObject INPUTTER_ADVANCED = BLOCKS.register("block_inputter_advanced", () -> new BlockInputter(true)); // public static final RegistryObject blockFurnaceSolar = BLOCKS.register("block_furnace_solar", BlockFurnaceSolar::new); public static final RegistryObject HEAT_COLLECTOR = BLOCKS.register("block_heat_collector", BlockHeatCollector::new); public static final RegistryObject GREENHOUSE_GLASS = BLOCKS.register("block_greenhouse_glass", BlockGreenhouseGlass::new); public static final RegistryObject BREAKER = BLOCKS.register("block_breaker", () -> new BlockBreaker(false)); public static final RegistryObject PLACER = BLOCKS.register("block_placer", () -> new BlockBreaker(true)); public static final RegistryObject DROPPER = BLOCKS.register("block_dropper", BlockDropper::new); public static final RegistryObject FLUID_PLACER = BLOCKS.register("block_fluid_placer", () -> new BlockFluidCollector(true)); public static final RegistryObject FLUID_COLLECTOR = BLOCKS.register("block_fluid_collector", () -> new BlockFluidCollector(false)); public static final RegistryObject COFFEE_MACHINE = BLOCKS.register("block_coffee_machine", BlockCoffeeMachine::new); public static final RegistryObject PHANTOM_BOOSTER = BLOCKS.register("block_phantom_booster", BlockPhantomBooster::new); public static final RegistryObject QUARTZ_WALL = BLOCKS.register("block_quartz_wall", () -> new WallBlock(AbstractBlock.Properties.from(blockMisc.get()))); public static final RegistryObject CHISELED_QUARTZ_WALL = BLOCKS.register("block_chiseled_quartz_wall", () -> new WallBlock(AbstractBlock.Properties.from(blockMisc.get()))); public static final RegistryObject PILLAR_QUARTZ_WALL = BLOCKS.register("block_pillar_quartz_wall", () -> new WallBlock(AbstractBlock.Properties.from(blockMisc.get()))); public static final RegistryObject QUARTZ_STAIR = BLOCKS.register("block_quartz_stair", () -> new StairsBlock(() -> blockMisc.get().getDefaultState(), AbstractBlock.Properties.from(blockMisc.get()))); public static final RegistryObject CHISELED_QUARTZ_STAIR = BLOCKS.register("block_chiseled_quartz_stair", () -> new StairsBlock(() -> blockMisc.get().getDefaultState(), AbstractBlock.Properties.from(blockMisc.get()))); public static final RegistryObject PILLAR_QUARTZ_STAIR = BLOCKS.register("block_pillar_quartz_stair", () -> new StairsBlock(() -> blockMisc.get().getDefaultState(), AbstractBlock.Properties.from(blockMisc.get()))); public static final RegistryObject QUARTZ_SLAB = BLOCKS.register("block_quartz_slab", () -> new SlabBlock(AbstractBlock.Properties.from(blockMisc.get()))); public static final RegistryObject CHISELED_QUARTZ_SLAB = BLOCKS.register("block_chiseled_quartz_slab", () -> new SlabBlock(AbstractBlock.Properties.from(blockMisc.get()))); public static final RegistryObject PILLAR_QUARTZ_SLAB = BLOCKS.register("block_pillar_quartz_slab", () -> new SlabBlock(AbstractBlock.Properties.from(blockMisc.get()))); public static AbstractBlock.Properties defaultPickProps(int harvestLevel, float hardness, float resistance) { return AbstractBlock.Properties.create(Material.ROCK).harvestLevel(harvestLevel).harvestTool(ToolType.PICKAXE).hardnessAndResistance(hardness, resistance).sound(SoundType.STONE); } public static AbstractBlock.Properties defaultPickProps(int harvestLevel) { return AbstractBlock.Properties.create(Material.ROCK).harvestLevel(harvestLevel).harvestTool(ToolType.PICKAXE).hardnessAndResistance(1.5F, 10.0F).sound(SoundType.STONE); } }