public boolean onRandomLeafTick(ITree tree, World world, int biomeId, int x, int y, int z, boolean isDestroyed) {
if(world.rand.nextFloat() >= tree.getGenome().getSappiness() * tree.getGenome().getYield())
return false;
IButterfly spawn = PluginLepidopterology.butterflyInterface.getIndividualTemplates().get(world.rand.nextInt(PluginLepidopterology.butterflyInterface.getIndividualTemplates().size()));
if(world.rand.nextFloat() >= spawn.getGenome().getPrimary().getRarity() * 0.5f)
return false;
if(world.countEntities(EntityButterfly.class) > PluginLepidopterology.spawnConstraint)
return false;
if(!spawn.canSpawn(world, x, y, z))
return false;
if(world.isAirBlock(x - 1, y, z)) {
attemptButterflySpawn(world, spawn, x - 1, y, z);
} else if(world.isAirBlock(x + 1, y, z)) {