use of forestry.lepidopterology.ButterflySpawner in project ForestryMC by ForestryMC.
the class PluginLepidopterology method doInit.
@Override
public void doInit() {
config = new Configuration();
Property property = config.get("entities.spawn.limit", CONFIG_CATEGORY, spawnConstraint);
property.comment = "determines the global butterfly entity count above which natural spawning of butterflies ceases.";
spawnConstraint = Integer.parseInt(property.value);
property = config.get("entities.maximum.allowed", CONFIG_CATEGORY, entityConstraint);
property.comment = "determines the global butterfly entity count above which butterflies will stay in item form and will not take flight anymore.";
entityConstraint = Integer.parseInt(property.value);
property = config.get("entities.pollination.allowed", CONFIG_CATEGORY, allowPollination);
property.comment = "determines whether butterflies can pollinate leaves.";
allowPollination = Boolean.parseBoolean(property.value);
config.save();
PluginCore.rootCommand.addChildCommand(new CommandButterfly());
Utils.registerEntity(EntityButterfly.class, "butterflyGE", 0, 0x000000, 0xffffff, 50, 1, true);
proxy.initializeRendering();
registerTemplates();
BlockBase lepidopterology = ((BlockBase) ForestryBlock.lepidopterology.block());
definitionChest = lepidopterology.addDefinition((new MachineDefinition(Defaults.DEFINITION_LEPICHEST_META, "forestry.LepiChest", TileLepidopteristChest.class, ShapedRecipeCustom.createShapedRecipe(ForestryBlock.lepidopterology.getItemStack(1, Defaults.DEFINITION_LEPICHEST_META), " # ", "XYX", "XXX", '#', Blocks.glass, 'X', ForestryItem.butterflyGE.getItemStack(1, Defaults.WILDCARD), 'Y', Blocks.chest)).setFaces(0, 1, 2, 3, 4, 4, 0, 7)));
definitionChest.register();
((ITreeRoot) AlleleManager.alleleRegistry.getSpeciesRoot("rootTrees")).registerLeafTickHandler(new ButterflySpawner());
RecipeSorter.register("forestry:lepidopterologymating", MatingRecipe.class, RecipeSorter.Category.SHAPELESS, "before:minecraft:shapeless");
}
Aggregations