ActuallyAdditions/src/main/java/ellpeck/actuallyadditions/blocks/InitBlocks.java

230 lines
11 KiB
Java
Raw Normal View History

2015-08-29 14:33:25 +02:00
/*
* 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://github.com/Ellpeck/ActuallyAdditions/blob/master/README.md
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
2015-11-02 20:55:19 +01:00
* © 2015 Ellpeck
2015-08-29 14:33:25 +02:00
*/
2015-03-07 12:51:28 +01:00
package ellpeck.actuallyadditions.blocks;
2015-01-05 22:14:01 +01:00
import ellpeck.actuallyadditions.blocks.base.BlockFluidFlowing;
import ellpeck.actuallyadditions.blocks.base.BlockPlant;
import ellpeck.actuallyadditions.blocks.base.BlockStair;
import ellpeck.actuallyadditions.blocks.base.BlockWallAA;
2015-06-18 13:14:57 +02:00
import ellpeck.actuallyadditions.config.values.ConfigBoolValues;
2015-06-28 03:12:32 +02:00
import ellpeck.actuallyadditions.util.CompatUtil;
import ellpeck.actuallyadditions.util.ModUtil;
import net.minecraft.block.Block;
2015-05-20 22:39:43 +02:00
import net.minecraft.block.material.Material;
import net.minecraft.item.EnumRarity;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
2015-01-05 22:14:01 +01:00
public class InitBlocks{
public static Block blockCompost;
public static Block blockMisc;
2015-06-28 03:12:32 +02:00
public static Block blockWildPlant;
public static Block blockFeeder;
public static Block blockGiantChest;
public static Block blockGrinder;
public static Block blockGrinderDouble;
public static Block blockFurnaceDouble;
2015-03-19 21:27:56 +01:00
public static Block blockInputter;
public static Block blockInputterAdvanced;
2015-03-30 15:08:19 +02:00
public static Block blockFishingNet;
public static Block blockFurnaceSolar;
2015-03-31 20:37:55 +02:00
public static Block blockHeatCollector;
2015-04-02 12:06:42 +02:00
public static Block blockItemRepairer;
2015-04-19 01:50:02 +02:00
public static Block blockGreenhouseGlass;
2015-05-04 17:26:50 +02:00
2015-04-19 01:50:02 +02:00
public static Block blockBreaker;
public static Block blockPlacer;
2015-05-04 17:26:50 +02:00
public static Block blockDropper;
2015-04-26 20:07:57 +02:00
2015-05-20 22:39:43 +02:00
public static Block blockRice;
public static Block blockCanola;
2015-06-06 01:25:53 +02:00
public static Block blockFlax;
public static Block blockCoffee;
2015-05-20 22:39:43 +02:00
public static Fluid fluidCanolaOil;
public static Block blockCanolaOil;
public static Fluid fluidOil;
public static Block blockOil;
public static Block blockCanolaPress;
public static Block blockFermentingBarrel;
public static Block blockCoalGenerator;
public static Block blockOilGenerator;
public static Block blockPhantomface;
2015-05-27 21:57:53 +02:00
public static Block blockPhantomPlacer;
public static Block blockPhantomBreaker;
public static Block blockPhantomLiquiface;
public static Block blockPhantomEnergyface;
2015-05-20 22:39:43 +02:00
2015-05-30 17:47:57 +02:00
public static Block blockFluidPlacer;
public static Block blockFluidCollector;
2015-06-06 01:25:53 +02:00
public static Block blockLavaFactoryController;
public static Block blockCoffeeMachine;
public static Block blockPhantomBooster;
2015-06-06 01:25:53 +02:00
2015-06-21 02:28:49 +02:00
public static Block blockEnergizer;
public static Block blockEnervator;
2015-06-28 03:12:32 +02:00
public static Block blockTestifiBucksGreenWall;
public static Block blockTestifiBucksWhiteWall;
public static Block blockTestifiBucksGreenStairs;
public static Block blockTestifiBucksWhiteStairs;
public static Block blockTestifiBucksGreenSlab;
2015-06-28 21:28:58 +02:00
public static Block blockTestifiBucksWhiteSlab;
2015-11-08 18:29:05 +01:00
public static Block blockTestifiBucksGreenFence;
public static Block blockTestifiBucksWhiteFence;
2015-06-28 21:28:58 +02:00
public static Block blockColoredLamp;
public static Block blockColoredLampOn;
public static Block blockLampPowerer;
2015-06-28 03:12:32 +02:00
2015-07-10 13:08:20 +02:00
public static Block blockTreasureChest;
2015-07-15 01:53:04 +02:00
public static Block blockXPSolidifier;
2015-07-13 23:44:33 +02:00
public static Block blockSmileyCloud;
2015-09-30 21:03:43 +02:00
public static Block blockLeafGenerator;
2015-10-05 16:53:28 +02:00
public static Block blockDirectionalBreaker;
2015-10-10 02:51:06 +02:00
public static Block blockRangedCollector;
2015-09-30 21:03:43 +02:00
public static Block blockLaserRelay;
2015-10-18 19:21:32 +02:00
2015-11-03 16:30:13 +01:00
public static Block blockBlackLotus;
public static Block blockCrystal;
public static Block blockAtomicReconstructor;
2015-11-03 16:30:13 +01:00
2015-11-24 19:59:33 +01:00
public static Block blockBookletStand;
public static Block blockMiner;
2015-11-24 19:59:33 +01:00
2015-01-05 22:14:01 +01:00
public static void init(){
2015-07-01 21:32:48 +02:00
ModUtil.LOGGER.info("Initializing Blocks...");
blockMiner = new BlockMiner("blockMiner");
blockBookletStand = new BlockBookletStand("blockBookStand");
blockAtomicReconstructor = new BlockAtomicReconstructor("blockAtomicReconstructor");
blockCrystal = new BlockCrystal("blockCrystal");
blockBlackLotus = new BlockBlackLotus("blockBlackLotus");
blockLaserRelay = new BlockLaserRelay("blockLaserRelay");
blockRangedCollector = new BlockRangedCollector("blockRangedCollector");
blockDirectionalBreaker = new BlockDirectionalBreaker("blockDirectionalBreaker");
blockLeafGenerator = new BlockLeafGenerator("blockLeafGenerator");
blockSmileyCloud = new BlockSmileyCloud("blockSmileyCloud");
blockXPSolidifier = new BlockXPSolidifier("blockXPSolidifier");
2015-06-28 03:12:32 +02:00
blockTestifiBucksGreenWall = new BlockGeneric("blockTestifiBucksGreenWall");
blockTestifiBucksWhiteWall = new BlockGeneric("blockTestifiBucksWhiteWall");
blockTestifiBucksGreenStairs = new BlockStair(blockTestifiBucksGreenWall, "blockTestifiBucksGreenStairs");
blockTestifiBucksWhiteStairs = new BlockStair(blockTestifiBucksWhiteWall, "blockTestifiBucksWhiteStairs");
blockTestifiBucksGreenSlab = new BlockSlabs("blockTestifiBucksGreenSlab", blockTestifiBucksGreenWall);
2015-06-28 21:28:58 +02:00
blockTestifiBucksWhiteSlab = new BlockSlabs("blockTestifiBucksWhiteSlab", blockTestifiBucksWhiteWall);
2015-11-08 18:29:05 +01:00
blockTestifiBucksGreenFence = new BlockWallAA("blockTestifiBucksGreenFence", blockTestifiBucksGreenWall);
blockTestifiBucksWhiteFence = new BlockWallAA("blockTestifiBucksWhiteFence", blockTestifiBucksWhiteWall);
blockColoredLamp = new BlockColoredLamp(false, "blockColoredLamp");
blockColoredLampOn = new BlockColoredLamp(true, "blockColoredLampOn");
blockLampPowerer = new BlockLampPowerer("blockLampPowerer");
blockTreasureChest = new BlockTreasureChest("blockTreasureChest");
blockEnergizer = new BlockEnergizer(true, "blockEnergizer");
blockEnervator = new BlockEnergizer(false, "blockEnervator");
blockLavaFactoryController = new BlockLavaFactoryController("blockLavaFactoryController");
blockCanolaPress = new BlockCanolaPress("blockCanolaPress");
blockPhantomface = new BlockPhantom(BlockPhantom.Type.FACE, "blockPhantomface");
blockPhantomPlacer = new BlockPhantom(BlockPhantom.Type.PLACER, "blockPhantomPlacer");
blockPhantomLiquiface = new BlockPhantom(BlockPhantom.Type.LIQUIFACE, "blockPhantomLiquiface");
blockPhantomEnergyface = new BlockPhantom(BlockPhantom.Type.ENERGYFACE, "blockPhantomEnergyface");
blockPhantomBreaker = new BlockPhantom(BlockPhantom.Type.BREAKER, "blockPhantomBreaker");
blockCoalGenerator = new BlockCoalGenerator("blockCoalGenerator");
blockOilGenerator = new BlockOilGenerator("blockOilGenerator");
blockFermentingBarrel = new BlockFermentingBarrel("blockFermentingBarrel");
2015-06-06 01:25:53 +02:00
blockRice = new BlockPlant("blockRice", 6, 1, 2);
2015-06-28 03:12:32 +02:00
CompatUtil.registerMFRPlant(blockRice);
2015-06-06 01:25:53 +02:00
blockCanola = new BlockPlant("blockCanola", 4, 3, 3);
2015-06-28 03:12:32 +02:00
CompatUtil.registerMFRPlant(blockCanola);
2015-06-06 01:25:53 +02:00
blockFlax = new BlockPlant("blockFlax", 6, 2, 4);
2015-06-28 03:12:32 +02:00
CompatUtil.registerMFRPlant(blockFlax);
blockCoffee = new BlockPlant("blockCoffee", 6, 2, 2);
2015-06-28 03:12:32 +02:00
CompatUtil.registerMFRPlant(blockCoffee);
blockCompost = new BlockCompost("blockCompost");
blockMisc = new BlockMisc("blockMisc");
blockFeeder = new BlockFeeder("blockFeeder");
blockGiantChest = new BlockGiantChest("blockGiantChest");
blockGrinder = new BlockGrinder(false, "blockGrinder");
blockGrinderDouble = new BlockGrinder(true, "blockGrinderDouble");
blockFurnaceDouble = new BlockFurnaceDouble("blockFurnaceDouble");
blockInputter = new BlockInputter(false, "blockInputter");
blockInputterAdvanced = new BlockInputter(true, "blockInputterAdvanced");
blockFishingNet = new BlockFishingNet("blockFishingNet");
blockFurnaceSolar = new BlockFurnaceSolar("blockFurnaceSolar");
blockHeatCollector = new BlockHeatCollector("blockHeatCollector");
blockItemRepairer = new BlockItemRepairer("blockItemRepairer");
blockGreenhouseGlass = new BlockGreenhouseGlass("blockGreenhouseGlass");
blockBreaker = new BlockBreaker(false, "blockBreaker");
blockPlacer = new BlockBreaker(true, "blockPlacer");
blockDropper = new BlockDropper("blockDropper");
blockFluidPlacer = new BlockFluidCollector(true, "blockFluidPlacer");
blockFluidCollector = new BlockFluidCollector(false, "blockFluidCollector");
blockCoffeeMachine = new BlockCoffeeMachine("blockCoffeeMachine");
blockPhantomBooster = new BlockPhantomBooster("blockPhantomBooster");
blockWildPlant = new BlockWildPlant("blockWild");
2015-06-28 03:12:32 +02:00
registerFluids();
}
public static void registerFluids(){
2015-06-28 03:12:32 +02:00
//Canola Fluid
String canolaOil = "canolaoil";
2015-06-18 13:14:57 +02:00
if(!FluidRegistry.isFluidRegistered(canolaOil) || ConfigBoolValues.PREVENT_CANOLA_OVERRIDE.isEnabled()){
fluidCanolaOil = new FluidAA(canolaOil).setRarity(EnumRarity.uncommon);
FluidRegistry.registerFluid(fluidCanolaOil);
}
else{
errorAlreadyRegistered("Canola Oil Fluid");
}
fluidCanolaOil = FluidRegistry.getFluid(canolaOil);
2015-06-28 03:12:32 +02:00
//Canola Block
2015-06-18 13:14:57 +02:00
if(fluidCanolaOil.getBlock() == null || ConfigBoolValues.PREVENT_CANOLA_BLOCK_OVERRIDE.isEnabled()){
blockCanolaOil = new BlockFluidFlowing(fluidCanolaOil, Material.water, "blockCanolaOil");
}
else{
errorAlreadyRegistered("Canola Oil Block");
}
blockCanolaOil = fluidCanolaOil.getBlock();
2015-06-28 03:12:32 +02:00
//Oil Fluid
String oil = "oil";
2015-06-18 13:14:57 +02:00
if(!FluidRegistry.isFluidRegistered(oil) || ConfigBoolValues.PREVENT_OIL_OVERRIDE.isEnabled()){
fluidOil = new FluidAA(oil).setRarity(EnumRarity.uncommon);
FluidRegistry.registerFluid(fluidOil);
}
else{
errorAlreadyRegistered("Oil Fluid");
2015-06-22 18:09:00 +02:00
}
fluidOil = FluidRegistry.getFluid(oil);
2015-06-28 03:12:32 +02:00
//Oil Block
2015-06-18 13:14:57 +02:00
if(fluidOil.getBlock() == null || ConfigBoolValues.PREVENT_OIL_BLOCK_OVERRIDE.isEnabled()){
blockOil = new BlockFluidFlowing(fluidOil, Material.water, "blockOil");
}
else{
errorAlreadyRegistered("Oil Block");
}
blockOil = fluidOil.getBlock();
}
public static void errorAlreadyRegistered(String str){
2015-09-21 23:49:49 +02:00
ModUtil.LOGGER.warn(str+" from "+ModUtil.NAME+" is not getting used as it has already been registered by another Mod! If this causes Issues (which it shouldn't!), you can turn this off in the Config File!");
}
}