Search in sources :

Example 1 with CropHandlerReeds

use of buildcraft.core.crops.CropHandlerReeds in project BuildCraft by BuildCraft.

the class BuildCraftCore method postInit.

@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event) {
    BCLog.logger.info("BuildCraft's fake player: UUID = " + gameProfile.getId().toString() + ", name = '" + gameProfile.getName() + "'!");
    BCRegistry.INSTANCE.save();
    for (Object o : Block.blockRegistry) {
        Block block = (Block) o;
        if (block instanceof BlockFluidBase || block instanceof BlockLiquid || block instanceof IPlantable) {
            BuildCraftAPI.softBlocks.add(block);
        }
    }
    BuildCraftAPI.softBlocks.add(Blocks.snow);
    BuildCraftAPI.softBlocks.add(Blocks.vine);
    BuildCraftAPI.softBlocks.add(Blocks.fire);
    CropManager.setDefaultHandler(new CropHandlerPlantable());
    CropManager.registerHandler(new CropHandlerReeds());
    BuildCraftAPI.registerWorldProperty("replaceable", new WorldPropertyIsReplaceable());
    BuildCraftAPI.registerWorldProperty("soft", new WorldPropertyIsSoft());
    BuildCraftAPI.registerWorldProperty("wood", new WorldPropertyIsWood());
    BuildCraftAPI.registerWorldProperty("leaves", new WorldPropertyIsLeaf());
    for (int i = 0; i < 4; i++) {
        BuildCraftAPI.registerWorldProperty("ore@hardness=" + i, new WorldPropertyIsOre(i));
    }
    BuildCraftAPI.registerWorldProperty("harvestable", new WorldPropertyIsHarvestable());
    BuildCraftAPI.registerWorldProperty("farmland", new WorldPropertyIsFarmland());
    BuildCraftAPI.registerWorldProperty("shoveled", new WorldPropertyIsShoveled());
    BuildCraftAPI.registerWorldProperty("dirt", new WorldPropertyIsDirt());
    BuildCraftAPI.registerWorldProperty("fluidSource", new WorldPropertyIsFluidSource());
    BuildCraftAPI.registerWorldProperty("freepath", new WorldPropertyIsFreePath());
    // Landmarks are often caught incorrectly, making building them counter-productive.
    SchematicRegistry.INSTANCE.registerSchematicBlock(markerBlock, SchematicIgnore.class);
    SchematicRegistry.INSTANCE.registerSchematicBlock(pathMarkerBlock, SchematicIgnore.class);
    ColorUtils.initialize();
    actionControl = new IActionExternal[IControllable.Mode.values().length];
    for (IControllable.Mode mode : IControllable.Mode.values()) {
        if (mode != IControllable.Mode.Unknown && mode != IControllable.Mode.Mode) {
            actionControl[mode.ordinal()] = new ActionMachineControl(mode);
        }
    }
    MinecraftForge.EVENT_BUS.register(ListOreDictionaryCache.INSTANCE);
    for (String s : OreDictionary.getOreNames()) {
        ListOreDictionaryCache.INSTANCE.registerName(s);
    }
    ListRegistry.registerHandler(new ListMatchHandlerOreDictionary());
}
Also used : IPlantable(net.minecraftforge.common.IPlantable) IControllable(buildcraft.api.tiles.IControllable) CropHandlerReeds(buildcraft.core.crops.CropHandlerReeds) BlockLiquid(net.minecraft.block.BlockLiquid) BlockFluidBase(net.minecraftforge.fluids.BlockFluidBase) Block(net.minecraft.block.Block) CropHandlerPlantable(buildcraft.core.crops.CropHandlerPlantable)

Aggregations

IControllable (buildcraft.api.tiles.IControllable)1 CropHandlerPlantable (buildcraft.core.crops.CropHandlerPlantable)1 CropHandlerReeds (buildcraft.core.crops.CropHandlerReeds)1 Block (net.minecraft.block.Block)1 BlockLiquid (net.minecraft.block.BlockLiquid)1 IPlantable (net.minecraftforge.common.IPlantable)1 BlockFluidBase (net.minecraftforge.fluids.BlockFluidBase)1