Closed secondfry closed 8 years ago
Setup information:
Examples of prime species:
Code in question: https://github.com/OpenMods/OpenPeripheral-Integration/blob/master/src/main/java/openperipheral/integration/forestry/AdapterBeeHousing.java#L95
@ScriptCallable(returnTypes = ReturnType.TABLE, description = "Get all known bees mutations") public List<Map<String, String>> listAllSpecies(IBeeHousing housing) { ISpeciesRoot beeRoot = AlleleManager.alleleRegistry.getSpeciesRoot("rootBees"); if (beeRoot == null) return null; List<Map<String, String>> result = Lists.newArrayList(); for (IMutation mutation : beeRoot.getMutations(false)) { IAllele[] template = mutation.getTemplate(); if (template != null && template.length > 0) { IAllele allele = template[0]; if (allele instanceof IAlleleSpecies) result.add(serializeSpecies((IAlleleSpecies)allele)); } } return result; }
If it's intended (as pointed in description 'get ... mutations'), why function is named listAllSpecies?
Setup information:
Examples of prime species:
Code in question: https://github.com/OpenMods/OpenPeripheral-Integration/blob/master/src/main/java/openperipheral/integration/forestry/AdapterBeeHousing.java#L95
If it's intended (as pointed in description 'get ... mutations'), why function is named listAllSpecies?