Make SpeciesCustom classes into SpeciesBuilder

This commit is contained in:
mezz committed 2016-03-03 21:46:21 -08:00
1 parent efcab41e04
commit 5a901ffa36
20 files changed
+250 -191

No files matched your search

@@ -7,15 +7,18 @@ package forestry.api.arboriculture;
import net.minecraftforge.common.EnumPlantType;
import forestry.api.genetics.IAlleleSpeciesCustom;
import forestry.api.genetics.IAlleleSpeciesBuilder;
import forestry.api.genetics.IFruitFamily;
public interface IAlleleTreeSpeciesCustom extends IAlleleSpeciesCustom, IAlleleTreeSpecies {
public interface IAlleleTreeSpeciesBuilder extends IAlleleSpeciesBuilder {
@Override
IAlleleTreeSpecies build();
/** Add a fruit family for this tree. Trees can have multiple fruit families. */
IAlleleTreeSpeciesCustom addFruitFamily(IFruitFamily family);
IAlleleTreeSpeciesBuilder addFruitFamily(IFruitFamily family);
/** Set the minecraft plant type for this tree. Default is Plains. */
IAlleleTreeSpeciesCustom setPlantType(EnumPlantType type);
IAlleleTreeSpeciesBuilder setPlantType(EnumPlantType type);
}
@@ -13,7 +13,7 @@ public interface ITreeFactory {
/**
* Creates a new tree species.
* Automatically registered with AlleleManager.alleleRegistry.registerAllele()
* See IAlleleTreeSpeciesCustom and IAlleleSpeciesCustom for adding additional properties to the returned species.
* See IAlleleTreeSpeciesBuilder and IAlleleSpeciesBuilder for adding additional properties to the returned species.
*
* @param uid Unique Identifier for this species
* @param unlocalizedName Unlocalized name for this species
@@ -28,7 +28,7 @@ public interface ITreeFactory {
* @param generator The tree generator
* @return a new tree species allele.
*/
IAlleleTreeSpeciesCustom createSpecies(String uid, String unlocalizedName, String authority, String unlocalizedDescription, boolean dominant, IClassification branch, String binomial, String mdoelName, ILeafSpriteProvider leafSpriteProvider, IGermlingModelProvider germlingModelProvider, ITreeGenerator generator);
IAlleleTreeSpeciesBuilder createSpecies(String uid, String unlocalizedName, String authority, String unlocalizedDescription, boolean dominant, IClassification branch, String binomial, String mdoelName, ILeafSpriteProvider leafSpriteProvider, IGermlingModelProvider germlingModelProvider, ITreeGenerator generator);
/** Get one of the built-in Forestry leaf types. Default type is deciduous. */
ILeafSpriteProvider getLeafIconProvider(EnumLeafType enumLeafType, Color color, Color colorPollinated);