use of buildcraft.core.crops.CropHandlerPlantable 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());
}
Aggregations