TechReborn/src/main/java/techreborn/init/ModBlocks.java

490 lines
22 KiB
Java
Raw Normal View History

/*
* This file is part of TechReborn, licensed under the MIT License (MIT).
*
* Copyright (c) 2017 TechReborn
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
2015-04-11 18:03:14 +02:00
package techreborn.init;
2015-04-12 10:45:31 +02:00
import net.minecraft.block.Block;
2015-05-07 19:39:47 +02:00
import net.minecraft.init.Blocks;
2016-05-08 11:13:21 +02:00
import net.minecraft.item.ItemBlock;
2015-04-12 15:59:29 +02:00
import net.minecraft.item.ItemStack;
2015-11-23 20:19:18 +01:00
import net.minecraftforge.fml.common.registry.GameRegistry;
2015-04-12 15:59:29 +02:00
import net.minecraftforge.oredict.OreDictionary;
import reborncore.common.tile.TileMachineBase;
import reborncore.common.util.StringUtils;
2015-11-08 13:15:45 +01:00
import techreborn.Core;
2016-05-08 22:42:09 +02:00
import techreborn.blocks.*;
2016-10-08 21:46:16 +02:00
import techreborn.blocks.advanced_machine.*;
2017-05-19 14:12:02 +02:00
import techreborn.blocks.cable.BlockCable;
2016-10-08 21:46:16 +02:00
import techreborn.blocks.generator.*;
import techreborn.blocks.iron_machines.BlockIronAlloyFurnace;
import techreborn.blocks.iron_machines.BlockIronFurnace;
2016-10-08 21:46:16 +02:00
import techreborn.blocks.machine.*;
import techreborn.blocks.storage.*;
import techreborn.blocks.tier1.*;
2016-03-16 17:54:44 +01:00
import techreborn.blocks.transformers.BlockHVTransformer;
import techreborn.blocks.transformers.BlockLVTransformer;
import techreborn.blocks.transformers.BlockMVTransformer;
2016-10-08 21:46:16 +02:00
import techreborn.itemblocks.*;
2017-06-14 01:49:52 +02:00
import techreborn.lib.ModInfo;
2016-05-08 22:42:09 +02:00
import techreborn.tiles.*;
2017-05-19 14:12:02 +02:00
import techreborn.tiles.cable.TileCable;
import techreborn.tiles.fusionReactor.TileFusionControlComputer;
import techreborn.tiles.generator.*;
import techreborn.tiles.idsu.TileInterdimensionalSU;
import techreborn.tiles.lesu.TileLSUStorage;
import techreborn.tiles.lesu.TileLapotronicSU;
import techreborn.tiles.multiblock.*;
import techreborn.tiles.storage.TileHighVoltageSU;
import techreborn.tiles.storage.TileLowVoltageSU;
import techreborn.tiles.storage.TileMediumVoltageSU;
2016-10-08 21:46:16 +02:00
import techreborn.tiles.teir1.*;
2016-03-16 17:54:44 +01:00
import techreborn.tiles.transformers.TileHVTransformer;
import techreborn.tiles.transformers.TileLVTransformer;
import techreborn.tiles.transformers.TileMVTransformer;
2015-04-11 18:03:14 +02:00
2016-05-08 11:13:21 +02:00
import java.lang.reflect.InvocationTargetException;
2016-10-08 21:46:16 +02:00
public class ModBlocks {
2016-03-25 10:47:34 +01:00
public static Block THERMAL_GENERATOR;
public static Block QUANTUM_TANK;
public static Block QUANTUM_CHEST;
public static Block DIGITAL_CHEST;
public static Block INDUSTRIAL_CENTRIFUGE;
public static Block ROLLING_MACHINE;
public static Block MACHINE_CASINGS;
public static Block INDUSTRIAL_BLAST_FURNACE;
public static Block ALLOY_SMELTER;
public static Block INDUSTRIAL_GRINDER;
public static Block IMPLOSION_COMPRESSOR;
public static Block MATTER_FABRICATOR;
public static Block CHUNK_LOADER;
public static Block DRAGON_EGG_SYPHON;
public static Block MAGIC_ENERGY_CONVERTER;
public static Block ASSEMBLY_MACHINE;
public static Block DIESEL_GENERATOR;
public static Block INDUSTRIAL_ELECTROLYZER;
public static Block MAGICAL_ABSORBER;
public static Block SEMI_FLUID_GENERATOR;
public static Block GAS_TURBINE;
public static Block IRON_ALLOY_FURNACE;
public static Block CHEMICAL_REACTOR;
public static Block INTERDIMENSIONAL_SU;
public static Block ADJUSTABLE_SU;
public static Block LAPOTRONIC_SU;
public static Block LSU_STORAGE;
public static Block DISTILLATION_TOWER;
public static Block VACUUM_FREEZER;
public static Block FUSION_CONTROL_COMPUTER;
public static Block FUSION_COIL;
public static Block LIGHTNING_ROD;
public static Block HEAT_GENERATOR;
public static Block INDUSTRIAL_SAWMILL;
public static Block CHARGE_O_MAT;
public static Block PLAYER_DETECTOR;
public static Block GRINDER;
public static Block SOLID_FUEL_GENEREATOR;
public static Block COMPRESSOR;
public static Block EXTRACTOR;
public static Block ELECTRIC_FURNACE;
public static Block SOLAR_PANEL;
public static Block CREATIVE_SOLAR_PANEL;
public static Block WATER_MILL;
public static Block WIND_MILL;
public static Block RECYCLER;
public static Block LOW_VOLTAGE_SU;
public static Block MEDIUM_VOLTAGE_SU;
public static Block HIGH_VOLTAGE_SU;
public static Block SCRAPBOXINATOR;
public static Block LV_TRANSFORMER;
public static Block MV_TRANSFORMER;
public static Block HV_TRANSFORMER;
public static BlockOre ORE;
public static BlockOre2 ORE2;
public static Block STORAGE;
public static Block STORAGE2;
public static Block MACHINE_FRAMES;
public static Block REINFORCED_GLASS;
public static Block IRON_FURNACE;
public static Block NUKE;
public static Block RUBBER_LOG;
public static Block RUBBER_LEAVES;
public static Block RUBBER_SAPLING;
public static Block RUBBER_PLANKS;
public static Block REFINED_IRON_FENCE;
public static Block FLARE;
2017-05-19 14:12:02 +02:00
public static Block CABLE;
2016-03-25 10:47:34 +01:00
2016-10-08 21:46:16 +02:00
public static void init() {
THERMAL_GENERATOR = new BlockThermalGenerator();
2017-06-14 01:49:52 +02:00
registerBlock(THERMAL_GENERATOR, "thermal_generator");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileThermalGenerator.class, "TileThermalGeneratorTR");
QUANTUM_TANK = new BlockQuantumTank();
2017-06-14 01:49:52 +02:00
registerBlock(QUANTUM_TANK, ItemBlockQuantumTank.class, "quantum_tank");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileQuantumTank.class, "TileQuantumTankTR");
QUANTUM_CHEST = new BlockQuantumChest();
2017-06-14 01:49:52 +02:00
registerBlock(QUANTUM_CHEST, ItemBlockQuantumChest.class, "quantum_chest");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileQuantumChest.class, "TileQuantumChestTR");
DIGITAL_CHEST = new BlockDigitalChest();
2017-06-14 01:49:52 +02:00
registerBlock(DIGITAL_CHEST, ItemBlockDigitalChest.class, "digital_chest");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileDigitalChest.class, "TileDigitalChestTR");
2017-06-14 01:49:52 +02:00
INDUSTRIAL_CENTRIFUGE = new BlockIndustrialCentrifuge();
registerBlock(INDUSTRIAL_CENTRIFUGE, "industrial_centrifuge");
GameRegistry.registerTileEntity(TileIndustrialCentrifuge.class, "TileIndustrialCentrifugeTR");
2016-03-25 10:47:34 +01:00
2017-06-14 01:49:52 +02:00
ROLLING_MACHINE = new BlockRollingMachine();
registerBlock(ROLLING_MACHINE, "rolling_machine");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileRollingMachine.class, "TileRollingMachineTR");
2017-06-14 01:49:52 +02:00
INDUSTRIAL_BLAST_FURNACE = new BlockIndustrialBlastFurnace();
registerBlock(INDUSTRIAL_BLAST_FURNACE, "industrial_blast_furnace");
GameRegistry.registerTileEntity(TileIndustrialBlastFurnace.class, "TileIndustrialBlastFurnaceTR");
2016-03-25 10:47:34 +01:00
2017-06-14 01:49:52 +02:00
ALLOY_SMELTER = new BlockAlloySmelter();
registerBlock(ALLOY_SMELTER, "alloy_smelter");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileAlloySmelter.class, "TileAlloySmalterTR");
2017-06-14 01:49:52 +02:00
INDUSTRIAL_GRINDER = new BlockIndustrialGrinder();
registerBlock(INDUSTRIAL_GRINDER, "industrial_grinder");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileIndustrialGrinder.class, "TileIndustrialGrinderTR");
2017-06-14 01:49:52 +02:00
IMPLOSION_COMPRESSOR = new BlockImplosionCompressor();
registerBlock(IMPLOSION_COMPRESSOR, "implosion_compressor");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileImplosionCompressor.class, "TileImplosionCompressorTR");
2017-06-14 01:49:52 +02:00
MATTER_FABRICATOR = new BlockMatterFabricator();
registerBlock(MATTER_FABRICATOR, "matter_fabricator");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileMatterFabricator.class, "TileMatterFabricatorTR");
2017-06-14 01:49:52 +02:00
CHUNK_LOADER = new BlockChunkLoader();
registerBlock(CHUNK_LOADER, "chunk_loader");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileChunkLoader.class, "TileChunkLoaderTR");
2017-06-14 01:49:52 +02:00
CHARGE_O_MAT = new BlockChargeOMat();
registerBlock(CHARGE_O_MAT, "charge_o_mat");
GameRegistry.registerTileEntity(TileChargeOMat.class, "TileChargeOMatTR");
2016-03-25 10:47:34 +01:00
PLAYER_DETECTOR = new BlockPlayerDetector();
2017-06-14 01:49:52 +02:00
registerBlock(PLAYER_DETECTOR, ItemBlockPlayerDetector.class, "player_detector");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TilePlayerDectector.class, "TilePlayerDectectorTR");
2017-05-19 14:12:02 +02:00
CABLE = new BlockCable();
2017-06-12 11:47:38 +02:00
registerBlock(CABLE, ItemBlockCable.class, "cable");
2017-05-19 14:12:02 +02:00
GameRegistry.registerTileEntity(TileCable.class, "TileCableTR");
2017-06-14 01:49:52 +02:00
MACHINE_CASINGS = new BlockMachineCasing();
registerBlock(MACHINE_CASINGS, ItemBlockMachineCasing.class, "machine_casing");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileMachineCasing.class, "TileMachineCasingTR");
2016-11-28 13:54:44 +01:00
2017-06-14 01:49:52 +02:00
ORE = new BlockOre();
registerBlock(ORE, ItemBlockOre.class, "ore");
2016-03-25 10:47:34 +01:00
2017-06-14 01:49:52 +02:00
ORE2 = new BlockOre2();
registerBlock(ORE2, ItemBlockOre2.class, "ore2");
2016-03-25 10:47:34 +01:00
2017-06-14 01:49:52 +02:00
STORAGE = new BlockStorage();
registerBlock(STORAGE, ItemBlockStorage.class, "storage");
2016-03-25 10:47:34 +01:00
2017-06-14 01:49:52 +02:00
STORAGE2 = new BlockStorage2();
registerBlock(STORAGE2, ItemBlockStorage2.class, "storage2");
2016-03-25 10:47:34 +01:00
DRAGON_EGG_SYPHON = new BlockDragonEggSyphon();
registerBlock(DRAGON_EGG_SYPHON, "dragon_egg_syphon");
GameRegistry.registerTileEntity(TileDragonEggSyphon.class, "TileDragonEggSyphonTR");
2016-03-25 10:47:34 +01:00
MAGIC_ENERGY_CONVERTER = new BlockMagicEnergyConverter();
registerBlock(MAGIC_ENERGY_CONVERTER, "magic_energy_converter");
2016-11-28 13:54:44 +01:00
ASSEMBLY_MACHINE = new BlockAssemblingMachine();
registerBlock(ASSEMBLY_MACHINE, "assembly_machine");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileAssemblingMachine.class, "TileAssemblyMachineTR");
DIESEL_GENERATOR = new BlockDieselGenerator();
registerBlock(DIESEL_GENERATOR, "diesel_generator");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileDieselGenerator.class, "TileDieselGeneratorTR");
2016-11-28 13:54:44 +01:00
INDUSTRIAL_ELECTROLYZER = new BlockIndustrialElectrolyzer();
registerBlock(INDUSTRIAL_ELECTROLYZER, "industrial_electrolyzer");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileIndustrialElectrolyzer.class, "TileIndustrialElectrolyzerTR");
2016-11-28 13:54:44 +01:00
MAGICAL_ABSORBER = new BlockMagicEnergyAbsorber();
registerBlock(MAGICAL_ABSORBER, "magic_energy_absorber");
2016-03-25 10:47:34 +01:00
SEMI_FLUID_GENERATOR = new BlockSemiFluidGenerator();
registerBlock(SEMI_FLUID_GENERATOR, "semi_fluid_generator");
GameRegistry.registerTileEntity(TileSemiFluidGenerator.class, "TileSemiFluidGeneratorTR");
2016-03-25 10:47:34 +01:00
GAS_TURBINE = new BlockGasTurbine();
registerBlock(GAS_TURBINE, "gas_turbine");
GameRegistry.registerTileEntity(TileGasTurbine.class, "TileGasTurbineTR");
2016-03-25 10:47:34 +01:00
IRON_ALLOY_FURNACE = new BlockIronAlloyFurnace();
registerBlock(IRON_ALLOY_FURNACE, "iron_alloy_furnace");
GameRegistry.registerTileEntity(TileIronAlloyFurnace.class, "TileIronAlloyFurnaceTR");
2016-03-25 10:47:34 +01:00
CHEMICAL_REACTOR = new BlockChemicalReactor();
registerBlock(CHEMICAL_REACTOR, "chemical_reactor");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileChemicalReactor.class, "TileChemicalReactorTR");
INTERDIMENSIONAL_SU = new BlockInterdimensionalSU();
registerBlock(INTERDIMENSIONAL_SU, "inderdimensional_su");
GameRegistry.registerTileEntity(TileInterdimensionalSU.class, "TileInterdimensionalSUTR");
ADJUSTABLE_SU = new BlockAdjustableSU();
registerBlock(ADJUSTABLE_SU, ItemBlockAdjustableSU.class, "adjustable_su");
GameRegistry.registerTileEntity(TileAdjustableSU.class, "TileAdjustableSUTR");
LAPOTRONIC_SU = new BlockLapotronicSU();
registerBlock(LAPOTRONIC_SU, "lapotronic_su");
GameRegistry.registerTileEntity(TileLapotronicSU.class, "TileLapotronicSUTR");
LSU_STORAGE = new BlockLSUStorage();
registerBlock(LSU_STORAGE, "lsu_storage");
GameRegistry.registerTileEntity(TileLSUStorage.class, "TileLSUStorageTR");
DISTILLATION_TOWER = new BlockDistillationTower();
registerBlock(DISTILLATION_TOWER, "distillation_tower");
2016-03-25 10:47:34 +01:00
VACUUM_FREEZER = new BlockVacuumFreezer();
registerBlock(VACUUM_FREEZER, "vacuum_freezer");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileVacuumFreezer.class, "TileVacuumFreezerTR");
FUSION_CONTROL_COMPUTER = new BlockFusionControlComputer();
registerBlock(FUSION_CONTROL_COMPUTER, "fusion_control_computer");
GameRegistry.registerTileEntity(TileFusionControlComputer.class, "TileFusionControlComputerTR");
2016-11-28 13:54:44 +01:00
FUSION_COIL = new BlockFusionCoil();
registerBlock(FUSION_COIL, "fusion_coil");
2016-03-25 10:47:34 +01:00
LIGHTNING_ROD = new BlockLightningRod();
registerBlock(LIGHTNING_ROD, "lightning_rod");
GameRegistry.registerTileEntity(TileLightningRod.class, "TileLightningRodTR");
2016-03-25 10:47:34 +01:00
HEAT_GENERATOR = new BlockHeatGenerator();
registerBlock(HEAT_GENERATOR, "heat_generator");
GameRegistry.registerTileEntity(TileHeatGenerator.class, "TileHeatGeneratorTR");
2016-03-25 10:47:34 +01:00
INDUSTRIAL_SAWMILL = new BlockIndustrialSawmill();
registerBlock(INDUSTRIAL_SAWMILL, "industrial_sawmill");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileIndustrialSawmill.class, "TileIndustrialSawmillTR");
MACHINE_FRAMES = new BlockMachineFrames();
registerBlock(MACHINE_FRAMES, ItemBlockMachineFrames.class, "machine_frame");
2016-03-25 10:47:34 +01:00
GRINDER = new BlockGrinder();
registerBlock(GRINDER, "grinder");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileGrinder.class, "TileGrinderTR");
SOLID_FUEL_GENEREATOR = new BlockSolidFuelGenerator();
registerBlock(SOLID_FUEL_GENEREATOR, "solid_fuel_generator");
GameRegistry.registerTileEntity(TileSolidFuelGenerator.class, "TileSolidFuelGeneratorTR");
2016-03-25 10:47:34 +01:00
EXTRACTOR = new BlockExtractor();
registerBlock(EXTRACTOR, "extractor");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileExtractor.class, "TileExtractorTR");
COMPRESSOR = new BlockCompressor();
registerBlock(COMPRESSOR, "compressor");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileCompressor.class, "TileCompressorTR");
ELECTRIC_FURNACE = new BlockElectricFurnace();
registerBlock(ELECTRIC_FURNACE, "electric_furnace");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileElectricFurnace.class, "TileElectricFurnaceTR");
SOLAR_PANEL = new BlockSolarPanel();
registerBlock(SOLAR_PANEL, "solar_panel");
GameRegistry.registerTileEntity(TileSolarPanel.class, "TileSolarPanelTR");
2016-03-25 10:47:34 +01:00
CREATIVE_SOLAR_PANEL = new BlockCreativeSolarPanel();
registerBlock(CREATIVE_SOLAR_PANEL, "creative_solar_panel");
GameRegistry.registerTileEntity(TileCreativeSolarPanel.class, "TileCreativeSolarPanelTR");
WATER_MILL = new BlockWaterMill();
registerBlock(WATER_MILL, "water_mill");
GameRegistry.registerTileEntity(TileWaterMill.class, "TileWaterMillTR");
2016-03-25 10:47:34 +01:00
WIND_MILL = new BlockWindMill();
registerBlock(WIND_MILL, "wind_mill");
GameRegistry.registerTileEntity(TileWindMill.class, "TileWindMillTR");
2016-07-01 16:40:46 +02:00
GameRegistry.registerTileEntity(TileMachineBase.class, "TileMachineBaseTR");
2016-03-25 10:47:34 +01:00
RUBBER_LOG = new BlockRubberLog();
registerBlock(RUBBER_LOG, "rubber_log");
2016-03-25 10:47:34 +01:00
RUBBER_PLANKS = new BlockRubberPlank();
registerBlock(RUBBER_PLANKS, "rubber_planks");
2016-03-25 10:47:34 +01:00
RUBBER_LEAVES = new BlockRubberLeaves();
registerBlock(RUBBER_LEAVES, "rubber_leaves");
2016-03-25 10:47:34 +01:00
RUBBER_SAPLING = new BlockRubberSapling();
registerBlock(RUBBER_SAPLING, ItemBlockRubberSapling.class, "rubber_sapling");
2016-03-25 10:47:34 +01:00
REFINED_IRON_FENCE = new BlockRefinedIronFence();
registerBlock(REFINED_IRON_FENCE, "refined_iron_fence");
2016-03-25 10:47:34 +01:00
REINFORCED_GLASS = new BlockReinforcedGlass();
registerBlock(REINFORCED_GLASS, "reinforced_glass");
2016-03-25 10:47:34 +01:00
RECYCLER = new BlockRecycler();
registerBlock(RECYCLER, "recycler");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileRecycler.class, "TileRecyclerTR");
LOW_VOLTAGE_SU = new BlockLowVoltageSU();
registerBlock(LOW_VOLTAGE_SU, "low_voltage_su");
GameRegistry.registerTileEntity(TileLowVoltageSU.class, "TileLowVoltageSUTR");
2016-03-25 10:47:34 +01:00
MEDIUM_VOLTAGE_SU = new BlockMediumVoltageSU();
registerBlock(MEDIUM_VOLTAGE_SU, "medium_voltage_su");
GameRegistry.registerTileEntity(TileMediumVoltageSU.class, "TileMediumVoltageSUTR");
2016-03-25 10:47:34 +01:00
HIGH_VOLTAGE_SU = new BlockHighVoltageSU();
registerBlock(HIGH_VOLTAGE_SU, "high_voltage_su");
GameRegistry.registerTileEntity(TileHighVoltageSU.class, "TileHighVoltageSUTR");
2016-03-25 10:47:34 +01:00
LV_TRANSFORMER = new BlockLVTransformer();
registerBlock(LV_TRANSFORMER, "lv_transformer");
GameRegistry.registerTileEntity(TileLVTransformer.class, "TileLVTransformerTR");
2016-03-25 10:47:34 +01:00
MV_TRANSFORMER = new BlockMVTransformer();
registerBlock(MV_TRANSFORMER, "mv_transformer");
GameRegistry.registerTileEntity(TileMVTransformer.class, "TileMVTransformerTR");
2016-03-25 10:47:34 +01:00
HV_TRANSFORMER = new BlockHVTransformer();
registerBlock(HV_TRANSFORMER, "hv_transformer");
GameRegistry.registerTileEntity(TileHVTransformer.class, "TileHVTransformerTR");
2016-03-25 10:47:34 +01:00
IRON_FURNACE = new BlockIronFurnace();
registerBlock(IRON_FURNACE, "iron_furnace");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileIronFurnace.class, "TileIronFurnaceTR");
NUKE = new BlockNuke();
registerBlock(NUKE, "nuke");
2016-03-25 10:47:34 +01:00
SCRAPBOXINATOR = new BlockScrapboxinator();
registerBlock(SCRAPBOXINATOR, "scrapboxinator");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileScrapboxinator.class, "TileScrapboxinatorTR");
//TODO enable when done
2016-11-25 14:25:51 +01:00
// flare = new BlockFlare();
// registerBlock(flare, "flare");
// ItemBlock itemBlock = new ItemColored(flare, true);
// itemBlock.setRegistryName("flareItemBlock");
// itemBlock.setCreativeTab(TechRebornCreativeTabMisc.instance);
// GameRegistry.register(itemBlock);
// GameRegistry.registerTileEntity(TileEntityFlare.class, "TileEntityFlareTR");
2016-11-06 20:14:43 +01:00
registerOreDict();
2016-03-25 10:47:34 +01:00
Core.logHelper.info("TechReborns Blocks Loaded");
}
2016-10-08 21:46:16 +02:00
public static void registerBlock(Block block, String name) {
name = name.toLowerCase();
2017-06-14 01:49:52 +02:00
block.setRegistryName(ModInfo.MOD_ID, name);
block.setUnlocalizedName(ModInfo.MOD_ID + ":" + name);
2016-05-08 11:13:21 +02:00
GameRegistry.register(block);
GameRegistry.register(new ItemBlock(block), block.getRegistryName());
}
2016-10-08 21:46:16 +02:00
public static void registerBlock(Block block, Class<? extends ItemBlock> itemclass, String name) {
name = name.toLowerCase();
2017-06-14 01:49:52 +02:00
block.setRegistryName(ModInfo.MOD_ID, name);
block.setUnlocalizedName(ModInfo.MOD_ID + ":" + name);
2016-05-08 11:13:21 +02:00
GameRegistry.register(block);
try {
ItemBlock itemBlock = itemclass.getConstructor(Block.class).newInstance(block);
2017-06-14 01:49:52 +02:00
itemBlock.setRegistryName(ModInfo.MOD_ID, name);
2016-05-08 11:13:21 +02:00
GameRegistry.register(itemBlock);
} catch (InstantiationException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
e.printStackTrace();
}
}
2016-10-08 21:46:16 +02:00
public static void registerOreDict() {
for (String ore : BlockOre.ores) {
OreDictionary.registerOre("ore" + StringUtils.toFirstCapital(ore), BlockOre.getOreByName(ore));
}
2016-10-08 21:46:16 +02:00
for (String ore : BlockOre2.ores) {
OreDictionary.registerOre("ore" + StringUtils.toFirstCapital(ore), BlockOre2.getOreByName(ore));
}
2016-10-08 21:46:16 +02:00
2016-12-22 01:41:33 +01:00
OreDictionary.registerOre("blockSilver", BlockStorage.getStorageBlockByName("silver"));
OreDictionary.registerOre("blockAluminum", BlockStorage.getStorageBlockByName("aluminum"));
OreDictionary.registerOre("blockAluminium", BlockStorage.getStorageBlockByName("aluminum"));
OreDictionary.registerOre("blockTitanium", BlockStorage.getStorageBlockByName("titanium"));
OreDictionary.registerOre("blockChrome", BlockStorage.getStorageBlockByName("chrome"));
OreDictionary.registerOre("blockSteel", BlockStorage.getStorageBlockByName("steel"));
OreDictionary.registerOre("blockBrass", BlockStorage.getStorageBlockByName("brass"));
OreDictionary.registerOre("blockLead", BlockStorage.getStorageBlockByName("lead"));
OreDictionary.registerOre("blockElectrum", BlockStorage.getStorageBlockByName("electrum"));
OreDictionary.registerOre("blockZinc", BlockStorage.getStorageBlockByName("zinc"));
OreDictionary.registerOre("blockPlatinum", BlockStorage.getStorageBlockByName("platinum"));
OreDictionary.registerOre("blockTungsten", BlockStorage.getStorageBlockByName("tungsten"));
OreDictionary.registerOre("blockNickel", BlockStorage.getStorageBlockByName("nickel"));
OreDictionary.registerOre("blockInvar", BlockStorage.getStorageBlockByName("invar"));
OreDictionary.registerOre("blockIridium", BlockStorage.getStorageBlockByName("iridium"));
OreDictionary.registerOre("blockCopper", BlockStorage2.getStorageBlockByName("copper", 1));
OreDictionary.registerOre("blockTin", BlockStorage2.getStorageBlockByName("tin", 1));
2016-12-22 01:41:33 +01:00
OreDictionary.registerOre("blockTungstensteel", BlockStorage2.getStorageBlockByName("tungstensteel", 1));
OreDictionary.registerOre("blockRuby", BlockStorage2.getStorageBlockByName("ruby", 1));
OreDictionary.registerOre("blockSapphire", BlockStorage2.getStorageBlockByName("sapphire", 1));
OreDictionary.registerOre("blockPeridot", BlockStorage2.getStorageBlockByName("peridot", 1));
OreDictionary.registerOre("blockYellowGarnet", BlockStorage2.getStorageBlockByName("yellowGarnet", 1));
OreDictionary.registerOre("blockRedGarnet", BlockStorage2.getStorageBlockByName("redGarnet", 1));
2016-03-25 10:47:34 +01:00
2016-05-06 23:13:24 +02:00
OreDictionary.registerOre("craftingPiston", Blocks.PISTON);
OreDictionary.registerOre("craftingPiston", Blocks.STICKY_PISTON);
OreDictionary.registerOre("crafterWood", Blocks.CRAFTING_TABLE);
OreDictionary.registerOre("machineBasic", new ItemStack(MACHINE_FRAMES, 1));
OreDictionary.registerOre("treeSapling", RUBBER_SAPLING);
OreDictionary.registerOre("saplingRubber", RUBBER_SAPLING);
OreDictionary.registerOre("logWood", new ItemStack(RUBBER_LOG, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("logRubber", new ItemStack(RUBBER_LOG, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("plankWood", new ItemStack(RUBBER_PLANKS, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("plankRubber", new ItemStack(RUBBER_PLANKS, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("treeLeaves", new ItemStack(RUBBER_LEAVES, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("leavesRubber", new ItemStack(RUBBER_LEAVES, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("fenceIron", REFINED_IRON_FENCE);
2016-10-08 21:46:16 +02:00
OreDictionary.registerOre("machineBlockBasic", BlockMachineFrames.getFrameByName("basic", 1));
OreDictionary.registerOre("machineBlockAdvanced", BlockMachineFrames.getFrameByName("advanced", 1));
OreDictionary.registerOre("machineBlockHighlyAdvanced", BlockMachineFrames.getFrameByName("highly_advanced", 1));
2016-09-18 21:56:29 +02:00
2016-03-25 10:47:34 +01:00
}
2015-04-11 18:03:14 +02:00
}