Search in sources :

Example 1 with HiveRegistry

use of forestry.apiculture.worldgen.HiveRegistry in project ForestryMC by ForestryMC.

the class ModuleApiculture method createHives.

private static void createHives() {
    HiveRegistry hiveRegistry = getHiveRegistry();
    hiveRegistry.registerHive(HiveType.FOREST.getHiveUid(), HiveDescription.FOREST);
    hiveRegistry.registerHive(HiveType.MEADOWS.getHiveUid(), HiveDescription.MEADOWS);
    hiveRegistry.registerHive(HiveType.DESERT.getHiveUid(), HiveDescription.DESERT);
    hiveRegistry.registerHive(HiveType.JUNGLE.getHiveUid(), HiveDescription.JUNGLE);
    hiveRegistry.registerHive(HiveType.END.getHiveUid(), HiveDescription.END);
    hiveRegistry.registerHive(HiveType.SNOW.getHiveUid(), HiveDescription.SNOW);
    hiveRegistry.registerHive(HiveType.SWAMP.getHiveUid(), HiveDescription.SWAMP);
}
Also used : HiveRegistry(forestry.apiculture.worldgen.HiveRegistry)

Example 2 with HiveRegistry

use of forestry.apiculture.worldgen.HiveRegistry in project ForestryMC by ForestryMC.

the class ModuleApiculture method registerBeehiveDrops.

private static void registerBeehiveDrops() {
    ItemRegistryApiculture items = getItems();
    ItemStack honeyComb = items.beeComb.get(EnumHoneyComb.HONEY, 1);
    HiveRegistry hiveRegistry = getHiveRegistry();
    hiveRegistry.addDrops(HiveType.FOREST.getHiveUid(), new HiveDrop(0.80, BeeDefinition.FOREST, honeyComb).setIgnobleShare(0.7), new HiveDrop(0.08, BeeDefinition.FOREST.getRainResist(), honeyComb), new HiveDrop(0.03, BeeDefinition.VALIANT, honeyComb));
    hiveRegistry.addDrops(HiveType.MEADOWS.getHiveUid(), new HiveDrop(0.80, BeeDefinition.MEADOWS, honeyComb).setIgnobleShare(0.7), new HiveDrop(0.03, BeeDefinition.VALIANT, honeyComb));
    ItemStack parchedComb = items.beeComb.get(EnumHoneyComb.PARCHED, 1);
    hiveRegistry.addDrops(HiveType.DESERT.getHiveUid(), new HiveDrop(0.80, BeeDefinition.MODEST, parchedComb).setIgnobleShare(0.7), new HiveDrop(0.03, BeeDefinition.VALIANT, parchedComb));
    ItemStack silkyComb = items.beeComb.get(EnumHoneyComb.SILKY, 1);
    hiveRegistry.addDrops(HiveType.JUNGLE.getHiveUid(), new HiveDrop(0.80, BeeDefinition.TROPICAL, silkyComb).setIgnobleShare(0.7), new HiveDrop(0.03, BeeDefinition.VALIANT, silkyComb));
    ItemStack mysteriousComb = items.beeComb.get(EnumHoneyComb.MYSTERIOUS, 1);
    hiveRegistry.addDrops(HiveType.END.getHiveUid(), new HiveDrop(0.90, BeeDefinition.ENDED, mysteriousComb));
    ItemStack frozenComb = items.beeComb.get(EnumHoneyComb.FROZEN, 1);
    hiveRegistry.addDrops(HiveType.SNOW.getHiveUid(), new HiveDrop(0.80, BeeDefinition.WINTRY, frozenComb).setIgnobleShare(0.5), new HiveDrop(0.03, BeeDefinition.VALIANT, frozenComb));
    ItemStack mossyComb = items.beeComb.get(EnumHoneyComb.MOSSY, 1);
    hiveRegistry.addDrops(HiveType.SWAMP.getHiveUid(), new HiveDrop(0.80, BeeDefinition.MARSHY, mossyComb).setIgnobleShare(0.4), new HiveDrop(0.03, BeeDefinition.VALIANT, mossyComb));
}
Also used : HiveDrop(forestry.apiculture.genetics.HiveDrop) ItemRegistryApiculture(forestry.apiculture.items.ItemRegistryApiculture) HiveRegistry(forestry.apiculture.worldgen.HiveRegistry) ItemStack(net.minecraft.item.ItemStack)

Example 3 with HiveRegistry

use of forestry.apiculture.worldgen.HiveRegistry in project ForestryMC by ForestryMC.

the class ModuleApiculture method setupAPI.

@Override
public void setupAPI() {
    HiveManager.hiveRegistry = hiveRegistry = new HiveRegistry();
    HiveManager.genHelper = new HiveGenHelper();
    FlowerManager.flowerRegistry = new FlowerRegistry();
    BeeManager.commonVillageBees = new ArrayList<>();
    BeeManager.uncommonVillageBees = new ArrayList<>();
    BeeManager.beeFactory = new BeeFactory();
    BeeManager.beeMutationFactory = new BeeMutationFactory();
    BeeManager.jubilanceFactory = new JubilanceFactory();
    BeeManager.armorApiaristHelper = new ArmorApiaristHelper();
    // Init bee interface
    BeeManager.beeRoot = new BeeRoot();
    AlleleManager.alleleRegistry.registerSpeciesRoot(BeeManager.beeRoot);
    // Modes
    BeeManager.beeRoot.registerBeekeepingMode(BeekeepingMode.easy);
    BeeManager.beeRoot.registerBeekeepingMode(BeekeepingMode.normal);
    BeeManager.beeRoot.registerBeekeepingMode(BeekeepingMode.hard);
    BeeManager.beeRoot.registerBeekeepingMode(BeekeepingMode.hardcore);
    BeeManager.beeRoot.registerBeekeepingMode(BeekeepingMode.insane);
    // Capabilities
    CapabilityManager.INSTANCE.register(IArmorApiarist.class, new NullStorage<>(), () -> ArmorApiarist.INSTANCE);
}
Also used : BeeFactory(forestry.apiculture.genetics.BeeFactory) JubilanceFactory(forestry.apiculture.genetics.JubilanceFactory) FlowerRegistry(forestry.apiculture.flowers.FlowerRegistry) HiveGenHelper(forestry.apiculture.worldgen.HiveGenHelper) BeeMutationFactory(forestry.apiculture.genetics.BeeMutationFactory) HiveRegistry(forestry.apiculture.worldgen.HiveRegistry) BeeRoot(forestry.apiculture.genetics.BeeRoot)

Aggregations

HiveRegistry (forestry.apiculture.worldgen.HiveRegistry)3 FlowerRegistry (forestry.apiculture.flowers.FlowerRegistry)1 BeeFactory (forestry.apiculture.genetics.BeeFactory)1 BeeMutationFactory (forestry.apiculture.genetics.BeeMutationFactory)1 BeeRoot (forestry.apiculture.genetics.BeeRoot)1 HiveDrop (forestry.apiculture.genetics.HiveDrop)1 JubilanceFactory (forestry.apiculture.genetics.JubilanceFactory)1 ItemRegistryApiculture (forestry.apiculture.items.ItemRegistryApiculture)1 HiveGenHelper (forestry.apiculture.worldgen.HiveGenHelper)1 ItemStack (net.minecraft.item.ItemStack)1