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-12-30 22:02:15 +01:00
package de.ellpeck.actuallyadditions.blocks ;
2015-01-05 22:14:01 +01:00
2015-12-30 22:02:15 +01:00
import de.ellpeck.actuallyadditions.blocks.base.BlockFluidFlowing ;
import de.ellpeck.actuallyadditions.blocks.base.BlockPlant ;
import de.ellpeck.actuallyadditions.blocks.base.BlockStair ;
import de.ellpeck.actuallyadditions.blocks.base.BlockWallAA ;
import de.ellpeck.actuallyadditions.blocks.metalists.TheMiscBlocks ;
import de.ellpeck.actuallyadditions.config.values.ConfigBoolValues ;
import de.ellpeck.actuallyadditions.util.ModUtil ;
2016-01-02 02:16:11 +01:00
import de.ellpeck.actuallyadditions.util.compat.CompatUtil ;
2015-02-09 17:25:05 +01:00
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-02-09 17:25:05 +01:00
2015-01-05 22:14:01 +01:00
public class InitBlocks {
2015-02-09 17:25:05 +01:00
public static Block blockCompost ;
2015-02-17 16:15:16 +01:00
public static Block blockMisc ;
2015-06-28 03:12:32 +02:00
public static Block blockWildPlant ;
2015-02-17 16:15:16 +01:00
public static Block blockFeeder ;
2015-02-20 22:45:33 +01:00
public static Block blockGiantChest ;
2015-02-09 17:25:05 +01:00
2015-03-07 02:23:31 +01:00
public static Block blockGrinder ;
public static Block blockGrinderDouble ;
public static Block blockFurnaceDouble ;
2015-03-19 21:27:56 +01:00
public static Block blockInputter ;
2015-04-04 05:20:19 +02:00
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 ;
2015-06-12 19:12:06 +02:00
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 ;
2015-05-29 18:17:28 +02:00
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 ;
2015-06-12 19:12:06 +02:00
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 ;
2015-07-07 11:31:13 +02:00
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
2015-08-23 23:41:46 +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
2015-10-19 17:50: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 ;
2015-11-14 14:30:35 +01:00
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 ;
2015-12-06 02:16:52 +01:00
public static Block blockMiner ;
2015-11-24 19:59:33 +01:00
2015-12-13 17:32:06 +01:00
public static Block blockFireworkBox ;
2015-12-19 10:30:39 +01:00
2015-12-17 20:18:22 +01:00
public static Block blockQuartzWall ;
public static Block blockQuartzStair ;
public static Block blockQuartzSlab ;
public static Block blockChiseledQuartzWall ;
public static Block blockChiseledQuartzStair ;
public static Block blockChiseledQuartzSlab ;
public static Block blockPillarQuartzWall ;
public static Block blockPillarQuartzStair ;
public static Block blockPillarQuartzSlab ;
2015-12-13 17:32:06 +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... " ) ;
2015-02-09 17:25:05 +01:00
2015-12-13 17:32:06 +01:00
blockFireworkBox = new BlockFireworkBox ( " blockFireworkBox " ) ;
2015-12-06 02:16:52 +01:00
blockMiner = new BlockMiner ( " blockMiner " ) ;
2015-12-03 20:15:07 +01:00
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 ) ;
2015-12-03 20:15:07 +01:00
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-12-22 17:54:55 +01:00
blockCanola = new BlockPlant ( " blockCanola " , 4 , 5 , 5 ) ;
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 ) ;
2015-06-12 19:12:06 +02:00
blockCoffee = new BlockPlant ( " blockCoffee " , 6 , 2 , 2 ) ;
2015-06-28 03:12:32 +02:00
CompatUtil . registerMFRPlant ( blockCoffee ) ;
2015-12-03 20:15:07 +01:00
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-12-17 20:18:22 +01:00
blockQuartzWall = new BlockWallAA ( " blockQuartzWall " , blockMisc , TheMiscBlocks . QUARTZ . ordinal ( ) ) ;
blockChiseledQuartzWall = new BlockWallAA ( " blockChiseledQuartzWall " , blockMisc , TheMiscBlocks . QUARTZ_CHISELED . ordinal ( ) ) ;
blockPillarQuartzWall = new BlockWallAA ( " blockPillarQuartzWall " , blockMisc , TheMiscBlocks . QUARTZ_PILLAR . ordinal ( ) ) ;
blockQuartzStair = new BlockStair ( blockMisc , " blockQuartzStair " , TheMiscBlocks . QUARTZ . ordinal ( ) ) ;
blockChiseledQuartzStair = new BlockStair ( blockMisc , " blockChiseledQuartzStair " , TheMiscBlocks . QUARTZ_CHISELED . ordinal ( ) ) ;
blockPillarQuartzStair = new BlockStair ( blockMisc , " blockPillarQuartzStair " , TheMiscBlocks . QUARTZ_PILLAR . ordinal ( ) ) ;
blockQuartzSlab = new BlockSlabs ( " blockQuartzSlab " , blockMisc , TheMiscBlocks . QUARTZ . ordinal ( ) ) ;
blockChiseledQuartzSlab = new BlockSlabs ( " blockChiseledQuartzSlab " , blockMisc , TheMiscBlocks . QUARTZ_CHISELED . ordinal ( ) ) ;
blockPillarQuartzSlab = new BlockSlabs ( " blockPillarQuartzSlab " , blockMisc , TheMiscBlocks . QUARTZ_PILLAR . ordinal ( ) ) ;
2015-06-28 03:12:32 +02:00
2015-06-12 19:12:06 +02:00
registerFluids ( ) ;
}
public static void registerFluids ( ) {
2015-06-28 03:12:32 +02:00
//Canola Fluid
2015-06-12 19:12:06 +02:00
String canolaOil = " canolaoil " ;
2015-06-18 13:14:57 +02:00
if ( ! FluidRegistry . isFluidRegistered ( canolaOil ) | | ConfigBoolValues . PREVENT_CANOLA_OVERRIDE . isEnabled ( ) ) {
2015-07-19 01:48:05 +02:00
fluidCanolaOil = new FluidAA ( canolaOil ) . setRarity ( EnumRarity . uncommon ) ;
2015-06-12 19:12:06 +02:00
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 ( ) ) {
2015-06-12 19:12:06 +02:00
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
2015-06-12 19:12:06 +02:00
String oil = " oil " ;
2015-06-18 13:14:57 +02:00
if ( ! FluidRegistry . isFluidRegistered ( oil ) | | ConfigBoolValues . PREVENT_OIL_OVERRIDE . isEnabled ( ) ) {
2015-07-19 01:48:05 +02:00
fluidOil = new FluidAA ( oil ) . setRarity ( EnumRarity . uncommon ) ;
2015-06-12 19:12:06 +02:00
FluidRegistry . registerFluid ( fluidOil ) ;
}
else {
errorAlreadyRegistered ( " Oil Fluid " ) ;
2015-06-22 18:09:00 +02:00
}
2015-06-12 19:12:06 +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 ( ) ) {
2015-06-12 19:12:06 +02:00
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! " ) ;
2015-02-17 16:15:16 +01:00
}
2015-02-20 22:45:33 +01:00
}