use of micdoodle8.mods.galacticraft.planets.mars.blocks.BlockSludge in project Galacticraft by micdoodle8.
the class MarsModule method preInit.
@Override
public void preInit(FMLPreInitializationEvent event) {
MinecraftForge.EVENT_BUS.register(new EventHandlerMars());
if (!FluidRegistry.isFluidRegistered("bacterialsludge")) {
ResourceLocation stillIcon = new ResourceLocation(GalacticraftPlanets.TEXTURE_PREFIX + "blocks/fluids/sludge_still");
ResourceLocation flowingIcon = new ResourceLocation(GalacticraftPlanets.TEXTURE_PREFIX + "blocks/fluids/sludge_flow");
sludgeGC = new Fluid("bacterialsludge", stillIcon, flowingIcon).setDensity(800).setViscosity(1500);
FluidRegistry.registerFluid(sludgeGC);
} else {
GCLog.info("Galacticraft sludge is not default, issues may occur.");
}
sludge = FluidRegistry.getFluid("bacterialsludge");
if (sludge.getBlock() == null) {
MarsBlocks.blockSludge = new BlockSludge("sludge");
((BlockSludge) MarsBlocks.blockSludge).setQuantaPerBlock(3);
MarsBlocks.registerBlock(MarsBlocks.blockSludge, ItemBlockDesc.class);
sludge.setBlock(MarsBlocks.blockSludge);
} else {
MarsBlocks.blockSludge = sludge.getBlock();
}
if (MarsBlocks.blockSludge != null) {
MarsItems.bucketSludge = new ItemBucketGC(MarsBlocks.blockSludge).setUnlocalizedName("bucket_sludge");
MarsItems.registerItem(MarsItems.bucketSludge);
FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("bacterialsludge", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(MarsItems.bucketSludge), new ItemStack(Items.bucket));
}
EventHandlerGC.bucketList.put(MarsBlocks.blockSludge, MarsItems.bucketSludge);
MarsBlocks.initBlocks();
MarsItems.initItems();
}
Aggregations