if (housing == null) {
Proxies.log.warning("Failed to produce in an apiary because the beehousing was null.");
return null;
}
IBeekeepingMode mode = PluginApiculture.beeInterface.getBeekeepingMode(housing.getWorld());
if (mode == null) {
Proxies.log.warning("Failed to produce in an apiary because the beekeeping mode was null.");
return null;
}
ArrayList<ItemStack> products = new ArrayList<ItemStack>();
IAlleleBeeSpecies primary = genome.getPrimary();
IAlleleBeeSpecies secondary = genome.getSecondary();
// All work and no play makes queen a dull girl.
if(mode.isOverworked(this, housing))
setIsNatural(false);
// Bee genetic speed * beehousing * beekeeping mode
float speed = genome.getSpeed() * housing.getProductionModifier(genome, 1f) * mode.getProductionModifier(genome, 1f);
// / Primary Products
for (Map.Entry<ItemStack, Integer> entry : primary.getProducts().entrySet())
if (housing.getWorld().rand.nextInt(100) < entry.getValue() * speed)
products.add(entry.getKey().copy());