ETTreeDefinition(String branch, String binomial, EnumLeafType leafType, Color leafColor, Color leafPollinatedColor, EnumSaplingType saplingType, IWoodType woodType, Color woodColor) { this.binomial = binomial; this.leafType = leafType; this.leafColor = leafColor; this.leafPollinatedColor = leafPollinatedColor; this.leafSpriteProvider = TreeManager.treeFactory.getLeafIconProvider(leafType, leafColor, leafPollinatedColor); this.saplingType = saplingType; this.woodType = woodType; this.woodProvider = new WoodProvider(woodType); this.woodColor = woodColor; this.branchName = branch; }
TreeDefinition(TreeBranchDefinition branch, String speciesName, String binomial, boolean dominant, EnumLeafType leafType, Color primary, Color secondary, IWoodType woodType) { String uid = Constants.MOD_ID + ".tree" + this; String unlocalizedDescription = "for.description.tree" + this; String unlocalizedName = "for.trees.species." + speciesName; this.branch = branch; ILeafSpriteProvider leafIconProvider = TreeManager.treeFactory.getLeafIconProvider(leafType, primary, secondary); IGermlingModelProvider germlingIconProvider = ModelProviderFactory.create(woodType, uid, leafIconProvider); IWoodProvider woodProvider = WoodProviderFactory.create(woodType); ILeafProvider leafProvider = new LeafProvider(); IAlleleTreeSpeciesBuilder speciesBuilder = TreeManager.treeFactory.createSpecies(uid, unlocalizedName, "Sengir", unlocalizedDescription, dominant, branch.getBranch(), binomial, Constants.MOD_ID, leafIconProvider, germlingIconProvider, woodProvider, this, leafProvider); setSpeciesProperties(speciesBuilder); this.species = speciesBuilder.build(); this.woodType = woodType; }
public void preInit() { final String scientific = StringUtils.capitalize(branchName); final String uid = "trees." + branchName; branch = AlleleManager.alleleRegistry.getClassification("genus." + uid); if (branch == null) { branch = AlleleManager.alleleRegistry.createAndRegisterClassification(IClassification.EnumClassLevel.GENUS, uid, scientific); } IAlleleTreeSpeciesBuilder speciesBuilder = TreeManager.treeFactory.createSpecies(getUID(), String.format(unlocalizedName, getUID()), getAuthority(), String.format(unlocalizedDesc, getUID()), isDominant(), branch, getBinomial(), Constants.EXTRA_TREES_MOD_ID, leafSpriteProvider, saplingType.getGermlingModelProvider(leafColor, woodColor), woodProvider, this, new ETLeafProvider() ); setSpeciesProperties(speciesBuilder); species = speciesBuilder.build(); branch.addMemberSpecies(species); }