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

515 lines
25 KiB
Java
Raw Normal View History

2015-04-11 18:03:14 +02:00
package techreborn.init;
2015-04-12 10:45:31 +02:00
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
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.*;
import techreborn.blocks.generator.*;
import techreborn.blocks.iron_machines.BlockAlloyFurnace;
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.*;
2016-05-08 22:42:09 +02:00
import techreborn.tiles.*;
import techreborn.tiles.fusionReactor.TileEntityFusionController;
import techreborn.tiles.generator.*;
import techreborn.tiles.idsu.TileIDSU;
2015-06-14 14:35:36 +02:00
import techreborn.tiles.lesu.TileLesu;
import techreborn.tiles.lesu.TileLesuStorage;
import techreborn.tiles.multiblock.*;
2016-03-14 09:26:41 +01:00
import techreborn.tiles.storage.TileBatBox;
import techreborn.tiles.storage.TileMFE;
import techreborn.tiles.storage.TileMFSU;
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 thermalGenerator;
public static Block quantumTank;
public static Block quantumChest;
public static Block digitalChest;
public static Block centrifuge;
2016-12-05 10:40:55 +01:00
public static Block rollingMachine;
public static Block machineCasing;
public static Block blastFurnace;
public static Block alloySmelter;
public static Block industrialGrinder;
public static Block implosionCompressor;
public static Block matterFabricator;
public static Block chunkLoader;
public static Block dragonEggEnergySiphoner;
public static Block magicEnergeyConverter;
public static Block assemblyMachine;
public static Block dieselGenerator;
public static Block industrialElectrolyzer;
public static Block magicalAbsorber;
public static Block semiFluidGenerator;
public static Block gasTurbine;
public static Block alloyFurnace;
public static Block chemicalReactor;
public static Block IDSU;
public static Block AESU;
public static Block LESU;
public static Block LESUStorage;
public static Block distillationTower;
public static Block vacuumFreezer;
public static Block fusionControlComputer;
public static Block fusionCoil;
public static Block lightningRod;
public static Block heatGenerator;
2016-03-25 10:47:34 +01:00
public static Block industrialSawmill;
public static Block chargeBench;
public static Block playerDetector;
2016-12-05 10:40:55 +01:00
public static Block grinder;
public static Block generator;
public static Block compressor;
public static Block extractor;
public static Block electricFurnace;
2016-03-25 10:47:34 +01:00
public static Block solarPanel;
public static Block waterMill;
public static Block windMill;
public static Block recycler;
public static Block batBox;
2016-12-05 10:40:55 +01:00
public static Block MFE;
public static Block MFSU;
2016-03-25 10:47:34 +01:00
public static Block scrapboxinator;
2016-12-05 10:40:55 +01:00
public static Block LVT;
public static Block MVT;
public static Block HVT;
2016-03-25 10:47:34 +01:00
public static BlockOre ore;
public static BlockOre2 ore2;
public static Block storage;
public static Block storage2;
public static Block machineframe;
public static Block reinforcedglass;
public static Block ironFurnace;
public static Block nuke;
public static Block rubberLog;
public static Block rubberLeaves;
public static Block rubberSapling;
public static Block rubberPlanks;
public static Block ironFence;
2016-11-06 20:14:43 +01:00
public static Block flare;
2016-03-25 10:47:34 +01:00
2016-10-08 21:46:16 +02:00
public static void init() {
2016-03-25 10:47:34 +01:00
thermalGenerator = new BlockThermalGenerator();
2016-05-08 11:13:21 +02:00
registerBlock(thermalGenerator, "techreborn.thermalGenerator");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileThermalGenerator.class, "TileThermalGeneratorTR");
2016-11-28 13:54:44 +01:00
Core.proxy.registerCustomBlockStateLocation(thermalGenerator, "machines/generators/thermal_generator");
2016-03-25 10:47:34 +01:00
quantumTank = new BlockQuantumTank();
2016-05-08 11:13:21 +02:00
registerBlock(quantumTank, ItemBlockQuantumTank.class, "techreborn.quantumTank");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileQuantumTank.class, "TileQuantumTankTR");
2016-11-28 13:54:44 +01:00
Core.proxy.registerCustomBlockStateLocation(quantumTank, "machines/tier3_machines/quantum_tank");
2016-03-25 10:47:34 +01:00
quantumChest = new BlockQuantumChest();
2016-05-08 11:13:21 +02:00
registerBlock(quantumChest, ItemBlockQuantumChest.class, "techreborn.quantumChest");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileQuantumChest.class, "TileQuantumChestTR");
2016-11-28 13:54:44 +01:00
Core.proxy.registerCustomBlockStateLocation(quantumChest, "machines/tier3_machines/quantum_chest");
2016-03-25 10:47:34 +01:00
digitalChest = new BlockDigitalChest();
2016-05-08 11:13:21 +02:00
registerBlock(digitalChest, ItemBlockDigitalChest.class, "techreborn.digitalChest");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileDigitalChest.class, "TileDigitalChestTR");
2016-11-28 13:54:44 +01:00
Core.proxy.registerCustomBlockStateLocation(digitalChest, "machines/tier2_machines/digital_chest");
2016-03-25 10:47:34 +01:00
centrifuge = new BlockCentrifuge();
2016-05-08 11:13:21 +02:00
registerBlock(centrifuge, "techreborn.centrifuge");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileCentrifuge.class, "TileCentrifugeTR");
2016-11-28 13:54:44 +01:00
Core.proxy.registerCustomBlockStateLocation(centrifuge, "machines/tier2_machines/industrial_centrifuge");
2016-03-25 10:47:34 +01:00
2016-12-05 10:40:55 +01:00
rollingMachine = new BlockRollingMachine(Material.ROCK);
registerBlock(rollingMachine, "rollingmachine");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileRollingMachine.class, "TileRollingMachineTR");
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(rollingMachine, "machines/tier1_machines/rolling_machine");
2016-03-25 10:47:34 +01:00
2016-12-05 10:40:55 +01:00
blastFurnace = new BlockBlastFurnace(Material.ROCK);
registerBlock(blastFurnace, "blastFurnace");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileBlastFurnace.class, "TileBlastFurnaceTR");
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(blastFurnace, "machines/tier2_machines/industrial_blast_furnace");
2016-03-25 10:47:34 +01:00
2016-12-05 10:40:55 +01:00
alloySmelter = new BlockAlloySmelter(Material.ROCK);
registerBlock(alloySmelter, "alloySmelter");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileAlloySmelter.class, "TileAlloySmalterTR");
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(alloySmelter, "machines/tier1_machines/electric_alloy_smelter");
2016-03-25 10:47:34 +01:00
2016-12-05 10:40:55 +01:00
industrialGrinder = new BlockIndustrialGrinder(Material.ROCK);
registerBlock(industrialGrinder, "grinder");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileIndustrialGrinder.class, "TileIndustrialGrinderTR");
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(industrialGrinder, "machines/tier2_machines/industrial_grinder");
2016-03-25 10:47:34 +01:00
2016-12-05 10:40:55 +01:00
implosionCompressor = new BlockImplosionCompressor(Material.ROCK);
registerBlock(implosionCompressor, "implosioncompressor");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileImplosionCompressor.class, "TileImplosionCompressorTR");
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(implosionCompressor, "machines/tier2_machines/implosion_compressor");
2016-03-25 10:47:34 +01:00
2016-12-05 10:40:55 +01:00
matterFabricator = new BlockMatterFabricator(Material.ROCK);
registerBlock(matterFabricator, "matterfabricator");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileMatterFabricator.class, "TileMatterFabricatorTR");
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(matterFabricator, "machines/tier3_machines/matter_fabricator");
2016-03-25 10:47:34 +01:00
2016-12-05 10:40:55 +01:00
chunkLoader = new BlockChunkLoader(Material.ROCK);
registerBlock(chunkLoader, "chunkloader");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileChunkLoader.class, "TileChunkLoaderTR");
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(chunkLoader, "machines/tier3_machines/industrial_chunk_loader");
2016-03-25 10:47:34 +01:00
2016-05-06 23:13:24 +02:00
chargeBench = new BlockChargeBench(Material.ROCK);
2016-05-08 11:13:21 +02:00
registerBlock(chargeBench, "chargebench");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileChargeBench.class, "TileChargeBench");
2016-11-28 13:54:44 +01:00
Core.proxy.registerCustomBlockStateLocation(chargeBench, "machines/tier2_machines/charge_bench");
2016-03-25 10:47:34 +01:00
playerDetector = new BlockPlayerDetector();
2016-05-08 11:13:21 +02:00
registerBlock(playerDetector, ItemBlockPlayerDetector.class, "playerDetector");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TilePlayerDectector.class, "TilePlayerDectectorTR");
2016-12-05 10:40:55 +01:00
machineCasing = new BlockMachineCasing(Material.ROCK);
registerBlock(machineCasing, ItemBlockMachineCasing.class, "machinecasing");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileMachineCasing.class, "TileMachineCasingTR");
2016-12-05 11:48:21 +01:00
if (Core.proxy.isCTMAvailable()) {
2016-12-05 11:07:41 +01:00
Core.proxy.registerCustomBlockStateLocation(machineCasing, "machines/structure/machine_casing_ctm");
} else {
Core.proxy.registerCustomBlockStateLocation(machineCasing, "machines/structure/machine_casing");
}
2016-11-28 13:54:44 +01:00
2016-05-06 23:13:24 +02:00
ore = new BlockOre(Material.ROCK);
2016-05-08 11:13:21 +02:00
registerBlock(ore, ItemBlockOre.class, "techreborn.ore");
2016-11-28 13:54:44 +01:00
for (int i = 0; i < BlockOre.ores.length; i++) {
Core.proxy.registerSubBlockInventoryLocation(ore, i, "storage/ores", BlockOre.ores[i]);
}
2016-03-25 10:47:34 +01:00
2016-05-06 23:13:24 +02:00
ore2 = new BlockOre2(Material.ROCK);
2016-05-08 11:13:21 +02:00
registerBlock(ore2, ItemBlockOre2.class, "techreborn.ore2");
2016-11-28 13:54:44 +01:00
for (int i = 0; i < BlockOre2.ores.length; i++) {
Core.proxy.registerSubBlockInventoryLocation(ore2, i, "storage/ores", BlockOre2.ores[i]);
}
2016-03-25 10:47:34 +01:00
2016-05-06 23:13:24 +02:00
storage = new BlockStorage(Material.IRON);
2016-05-08 11:13:21 +02:00
registerBlock(storage, ItemBlockStorage.class, "techreborn.storage");
2016-11-28 13:54:44 +01:00
for (int i = 0; i < BlockStorage.types.length; i++) {
Core.proxy.registerSubBlockInventoryLocation(storage, i, "storage/storage", BlockStorage.types[i]);
}
2016-03-25 10:47:34 +01:00
2016-05-06 23:13:24 +02:00
storage2 = new BlockStorage2(Material.IRON);
2016-05-08 11:13:21 +02:00
registerBlock(storage2, ItemBlockStorage2.class, "techreborn.storage2");
2016-11-28 13:54:44 +01:00
for (int i = 0; i < BlockStorage2.types.length; i++) {
Core.proxy.registerSubBlockInventoryLocation(storage2, i, "storage/storage", BlockStorage2.types[i]);
}
2016-03-25 10:47:34 +01:00
2016-12-05 10:40:55 +01:00
dragonEggEnergySiphoner = new BlockDragonEggSiphoner(Material.ROCK);
registerBlock(dragonEggEnergySiphoner, "dragoneggenergsiphon");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileDragonEggSiphoner.class, "TileDragonEggSiphonerTR");
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(dragonEggEnergySiphoner, "machines/generators/dragon_egg_syphon");
2016-03-25 10:47:34 +01:00
2016-12-05 10:40:55 +01:00
magicEnergeyConverter = new BlockMagicEnergyConverter(Material.ROCK);
registerBlock(magicEnergeyConverter, "magicenergyconverter");
Core.proxy.registerCustomBlockStateLocation(magicEnergeyConverter, "machines/generators/magic_energy_converter");
2016-11-28 13:54:44 +01:00
2016-12-05 10:40:55 +01:00
assemblyMachine = new BlockAssemblingMachine(Material.ROCK);
registerBlock(assemblyMachine, "assemblymachine");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileAssemblingMachine.class, "TileAssemblyMachineTR");
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(assemblyMachine, "machines/tier1_machines/assembly_machine");
2016-03-25 10:47:34 +01:00
2016-12-05 10:40:55 +01:00
dieselGenerator = new BlockDieselGenerator(Material.ROCK);
registerBlock(dieselGenerator, "dieselgenerator");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileDieselGenerator.class, "TileDieselGeneratorTR");
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(dieselGenerator, "machines/generators/diesel_generator");
2016-11-28 13:54:44 +01:00
2016-12-05 10:40:55 +01:00
industrialElectrolyzer = new BlockIndustrialElectrolyzer(Material.ROCK);
registerBlock(industrialElectrolyzer, "industrialelectrolyzer");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileIndustrialElectrolyzer.class, "TileIndustrialElectrolyzerTR");
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(industrialElectrolyzer, "machines/tier1_machines/industrial_electrolyzer");
2016-11-28 13:54:44 +01:00
2016-12-05 10:40:55 +01:00
magicalAbsorber = new BlockMagicEnergyAbsorber(Material.ROCK);
registerBlock(magicalAbsorber, "magicrnergyabsorber");
Core.proxy.registerCustomBlockStateLocation(magicalAbsorber, "machines/generators/magic_energy_absorber");
2016-03-25 10:47:34 +01:00
2016-12-05 10:40:55 +01:00
semiFluidGenerator = new BlockSemiFluidGenerator(Material.ROCK);
registerBlock(semiFluidGenerator, "semifluidgenerator");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileSemifluidGenerator.class, "TileSemifluidGeneratorTR");
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(semiFluidGenerator, "machines/generators/semi_fluid_generator");
2016-03-25 10:47:34 +01:00
2016-12-05 10:40:55 +01:00
gasTurbine = new BlockGasTurbine(Material.ROCK);
registerBlock(gasTurbine, "gasturbine");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileGasTurbine.class, "TileGassTurbineTR");
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(gasTurbine, "machines/generators/gas_turbine");
2016-03-25 10:47:34 +01:00
2016-12-05 10:40:55 +01:00
alloyFurnace = new BlockAlloyFurnace(Material.ROCK);
registerBlock(alloyFurnace, "alloyfurnace");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileAlloyFurnace.class, "TileAlloyFurnaceTR");
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(alloyFurnace, "machines/tier0_machines/alloy_furnace");
2016-03-25 10:47:34 +01:00
2016-12-05 10:40:55 +01:00
chemicalReactor = new BlockChemicalReactor(Material.ROCK);
registerBlock(chemicalReactor, "chemicalreactor");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileChemicalReactor.class, "TileChemicalReactorTR");
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(chemicalReactor, "machines/tier1_machines/chemical_reactor");
2016-03-25 10:47:34 +01:00
2016-12-05 10:40:55 +01:00
IDSU = new BlockIDSU();
registerBlock(IDSU, "idsu");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileIDSU.class, "TileIDSUTR");
2016-12-05 10:40:55 +01:00
AESU = new BlockAESU();
registerBlock(AESU, ItemBlockAesu.class, "aesu");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileAesu.class, "TileAesuTR");
2016-12-05 10:40:55 +01:00
LESU = new BlockLESU();
registerBlock(LESU, "lesu");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileLesu.class, "TileLesuTR");
2016-12-05 10:40:55 +01:00
LESUStorage = new BlockLESUStorage(Material.ROCK);
registerBlock(LESUStorage, "lesustorage");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileLesuStorage.class, "TileLesuStorageTR");
2016-11-28 13:54:44 +01:00
if (Core.proxy.isCTMAvailable()) {
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(LESUStorage, "machines/energy/ev_multi_storage_ctm");
2016-11-28 13:54:44 +01:00
} else {
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(LESUStorage, "machines/energy/ev_multi_storage");
2016-11-28 13:54:44 +01:00
}
2016-03-25 10:47:34 +01:00
2016-12-05 10:40:55 +01:00
distillationTower = new BlockDistillationTower(Material.ROCK);
registerBlock(distillationTower, "distillationtower");
Core.proxy.registerCustomBlockStateLocation(distillationTower, "machines/tier2_machines/distillation_tower");
2016-03-25 10:47:34 +01:00
2016-12-05 10:40:55 +01:00
vacuumFreezer = new BlockVacuumFreezer(Material.ROCK);
registerBlock(vacuumFreezer, "vacuumfreezer");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileVacuumFreezer.class, "TileVacuumFreezerTR");
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(vacuumFreezer, "machines/tier2_machines/vacuum_freezer");
2016-03-25 10:47:34 +01:00
2016-12-05 10:40:55 +01:00
fusionControlComputer = new BlockFusionControlComputer(Material.ROCK);
registerBlock(fusionControlComputer, "fusioncontrolcomputer");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileEntityFusionController.class, "TileEntityFustionControllerTR");
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(fusionControlComputer, "machines/generators/fusion_reactor");
2016-11-28 13:54:44 +01:00
2016-12-05 10:40:55 +01:00
fusionCoil = new BlockFusionCoil(Material.ROCK);
registerBlock(fusionCoil, "fusioncoil");
Core.proxy.registerCustomBlockStateLocation(fusionCoil, "machines/generators/fusion_coil");
2016-03-25 10:47:34 +01:00
2016-12-05 10:40:55 +01:00
lightningRod = new BlockLightningRod(Material.ROCK);
registerBlock(lightningRod, "lightningrod");
GameRegistry.registerTileEntity(TileLightningRod.class, "TileLightningRodTR");
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(lightningRod, "machines/generators/lightning_rod");
2016-03-25 10:47:34 +01:00
heatGenerator = new BlockHeatGenerator(Material.ROCK);
registerBlock(heatGenerator, "heatgenerator");
GameRegistry.registerTileEntity(TileHeatGenerator.class, "TileHeatGeneratorTR");
2016-03-25 10:47:34 +01:00
2016-05-06 23:13:24 +02:00
industrialSawmill = new BlockIndustrialSawmill(Material.ROCK);
2016-05-08 11:13:21 +02:00
registerBlock(industrialSawmill, "industrialSawmill");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileIndustrialSawmill.class, "TileIndustrialSawmillTR");
2016-11-28 13:54:44 +01:00
Core.proxy.registerCustomBlockStateLocation(industrialSawmill, "machines/tier2_machines/industrial_saw_mill");
2016-03-25 10:47:34 +01:00
2016-05-06 23:13:24 +02:00
machineframe = new BlockMachineFrame(Material.IRON);
2016-05-08 11:13:21 +02:00
registerBlock(machineframe, ItemBlockMachineFrame.class, "techreborn.machineFrame");
2016-12-05 11:17:39 +01:00
Core.proxy.registerCustomBlockStateLocation(machineframe, "machines/storage/machine_blocks");
2016-03-25 10:47:34 +01:00
2016-12-05 10:40:55 +01:00
grinder = new BlockGrinder(Material.IRON);
registerBlock(grinder, "techreborn.grinder");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileGrinder.class, "TileGrinderTR");
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(grinder, "machines/tier1_machines/grinder");
2016-03-25 10:47:34 +01:00
2016-12-05 10:40:55 +01:00
generator = new BlockGenerator();
registerBlock(generator, "techreborn.generator");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileGenerator.class, "TileGeneratorTR");
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(generator, "machines/generators/generator");
2016-03-25 10:47:34 +01:00
2016-12-05 10:40:55 +01:00
extractor = new BlockExtractor(Material.IRON);
registerBlock(extractor, "techreborn.extractor");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileExtractor.class, "TileExtractorTR");
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(extractor, "machines/tier1_machines/extractor");
2016-03-25 10:47:34 +01:00
2016-12-05 10:40:55 +01:00
compressor = new BlockCompressor(Material.IRON);
registerBlock(compressor, "techreborn.compressor");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileCompressor.class, "TileCompressorTR");
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(compressor, "machines/tier1_machines/compressor");
2016-03-25 10:47:34 +01:00
2016-12-05 10:40:55 +01:00
electricFurnace = new BlockElectricFurnace(Material.IRON);
registerBlock(electricFurnace, "techreborn.electricfurnace");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileElectricFurnace.class, "TileElectricFurnaceTR");
2016-12-05 10:40:55 +01:00
Core.proxy.registerCustomBlockStateLocation(electricFurnace, "machines/tier1_machines/electric_furnace");
2016-03-25 10:47:34 +01:00
solarPanel = new BlockSolarPanel();
2016-05-08 11:13:21 +02:00
registerBlock(solarPanel, "techreborn.solarpanel");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileSolarPanel.class, "TileSolarPanel");
2016-11-28 13:54:44 +01:00
Core.proxy.registerCustomBlockStateLocation(solarPanel, "machines/generators/solar_panel");
2016-03-25 10:47:34 +01:00
waterMill = new BlockWaterMill();
2016-05-08 11:13:21 +02:00
registerBlock(waterMill, "techreborn.watermill");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileWaterMill.class, "TileWaterMill");
2016-11-28 13:54:44 +01:00
Core.proxy.registerCustomBlockStateLocation(waterMill, "machines/generators/water_mill");
2016-03-25 10:47:34 +01:00
windMill = new BlockWindMill();
2016-05-08 11:13:21 +02:00
registerBlock(windMill, "techreborn.windmill");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileWindMill.class, "TileWindMill");
2016-11-28 13:54:44 +01:00
Core.proxy.registerCustomBlockStateLocation(windMill, "machines/generators/wind_mill");
2016-07-01 16:40:46 +02:00
GameRegistry.registerTileEntity(TileMachineBase.class, "TileMachineBaseTR");
2016-03-25 10:47:34 +01:00
rubberLog = new BlockRubberLog();
2016-05-08 11:13:21 +02:00
registerBlock(rubberLog, "rubberLog");
2016-03-25 10:47:34 +01:00
rubberPlanks = new BlockRubberPlank();
2016-05-08 11:13:21 +02:00
registerBlock(rubberPlanks, "rubberPlanks");
2016-03-25 10:47:34 +01:00
rubberLeaves = new BlockRubberLeaves();
2016-05-08 11:13:21 +02:00
registerBlock(rubberLeaves, "rubberLeaves");
2016-03-25 10:47:34 +01:00
rubberSapling = new BlockRubberSapling();
2016-05-08 11:13:21 +02:00
registerBlock(rubberSapling, ItemBlockRubberSapling.class, "rubberSapling");
2016-03-25 10:47:34 +01:00
ironFence = new BlockIronFence();
2016-05-08 11:13:21 +02:00
registerBlock(ironFence, "ironFence");
2016-03-25 10:47:34 +01:00
2016-05-06 23:13:24 +02:00
reinforcedglass = new BlockReinforcedGlass(Material.GLASS);
2016-05-08 11:13:21 +02:00
registerBlock(reinforcedglass, "reinforcedglass");
2016-03-25 10:47:34 +01:00
2016-05-06 23:13:24 +02:00
recycler = new BlockRecycler(Material.IRON);
2016-05-08 11:13:21 +02:00
registerBlock(recycler, "recycler");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileRecycler.class, "TileRecyclerTR");
2016-11-28 13:54:44 +01:00
Core.proxy.registerCustomBlockStateLocation(recycler, "machines/tier1_machines/recycler");
2016-03-25 10:47:34 +01:00
batBox = new BlockBatBox();
2016-05-08 11:13:21 +02:00
registerBlock(batBox, "batBox");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileBatBox.class, "TileBatBox");
2016-12-05 10:40:55 +01:00
MFE = new BlockMFE();
registerBlock(MFE, "MFE");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileMFE.class, "TileMFE");
2016-12-05 10:40:55 +01:00
MFSU = new BlockMFSU();
registerBlock(MFSU, "MFSU");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileMFSU.class, "TileMFSU");
2016-12-05 10:40:55 +01:00
LVT = new BlockLVTransformer();
registerBlock(LVT, "LVT");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileLVTransformer.class, "TileLVTransformer");
2016-12-05 10:40:55 +01:00
MVT = new BlockMVTransformer();
registerBlock(MVT, "MVT");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileMVTransformer.class, "TileMVTransformer");
2016-12-05 10:40:55 +01:00
HVT = new BlockHVTransformer();
registerBlock(HVT, "HVT");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileHVTransformer.class, "TileHVTransformer");
ironFurnace = new BlockIronFurnace();
2016-05-08 11:13:21 +02:00
registerBlock(ironFurnace, "ironfurnace");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileIronFurnace.class, "TileIronFurnaceTR");
2016-11-28 13:54:44 +01:00
Core.proxy.registerCustomBlockStateLocation(ironFurnace, "machines/tier0_machines/furnace");
2016-03-25 10:47:34 +01:00
nuke = new BlockNuke();
2016-05-08 11:13:21 +02:00
registerBlock(nuke, "nuke");
2016-03-25 10:47:34 +01:00
2016-05-06 23:13:24 +02:00
scrapboxinator = new BlockScrapboxinator(Material.IRON);
2016-05-08 11:13:21 +02:00
registerBlock(scrapboxinator, "scrapboxinator");
2016-03-25 10:47:34 +01:00
GameRegistry.registerTileEntity(TileScrapboxinator.class, "TileScrapboxinatorTR");
2016-11-28 13:54:44 +01:00
Core.proxy.registerCustomBlockStateLocation(scrapboxinator, "machines/tier1_machines/scrapboxinator");
2016-03-25 10:47:34 +01:00
//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();
2016-05-08 11:13:21 +02:00
block.setRegistryName(name);
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();
2016-05-08 11:13:21 +02:00
block.setRegistryName(name);
GameRegistry.register(block);
try {
ItemBlock itemBlock = itemclass.getConstructor(Block.class).newInstance(block);
itemBlock.setRegistryName(name);
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);
2016-03-25 10:47:34 +01:00
OreDictionary.registerOre("machineBasic", new ItemStack(machineframe, 1));
OreDictionary.registerOre("treeSapling", rubberSapling);
OreDictionary.registerOre("saplingRubber", rubberSapling);
OreDictionary.registerOre("logWood", new ItemStack(rubberLog, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("logRubber", new ItemStack(rubberLog, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("plankWood", new ItemStack(rubberPlanks, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("plankRubber", new ItemStack(rubberPlanks, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("treeLeaves", new ItemStack(rubberLeaves, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("leavesRubber", new ItemStack(rubberLeaves, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("fenceIron", ironFence);
2016-10-08 21:46:16 +02:00
2016-03-30 07:45:15 +02:00
OreDictionary.registerOre("machineBlockBasic", BlockMachineFrame.getFrameByName("machine", 1));
OreDictionary.registerOre("machineBlockAdvanced", BlockMachineFrame.getFrameByName("advancedMachine", 1));
OreDictionary.registerOre("machineBlockHighlyAdvanced", BlockMachineFrame.getFrameByName("highlyAdvancedMachine", 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
}