mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-20 12:09:39 +00:00
Add ILeafProvider
This commit is contained in:
1 parent
6cb3b73200
commit
7b340fdb49
8 files changed
+119
-10
No files matched your search
@@ -43,6 +43,8 @@ public interface IAlleleTreeSpecies extends IAlleleSpecies, IAlleleProperty<IAll
|
||||
String getModID();
|
||||
|
||||
IWoodProvider getWoodProvider();
|
||||
|
||||
ILeafProvider getLeafProvider();
|
||||
|
||||
/* MODELS AND OVERRIDES */
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface ILeafProvider {
|
||||
|
||||
void init(IAlleleTreeSpecies treeSpecies);
|
||||
|
||||
ItemStack getDecorativeLeaves();
|
||||
|
||||
}
|
||||
@@ -31,6 +31,27 @@ public interface ITreeFactory {
|
||||
*/
|
||||
IAlleleTreeSpeciesBuilder createSpecies(String uid, String unlocalizedName, String authority, String unlocalizedDescription, boolean dominant, IClassification branch, String binomial, String modID, ILeafSpriteProvider leafSpriteProvider, IGermlingModelProvider germlingModelProvider, IWoodProvider woodProvider, ITreeGenerator generator);
|
||||
|
||||
/**
|
||||
* Creates a new tree species.
|
||||
* Automatically registered with AlleleManager.alleleRegistry.registerAllele()
|
||||
* 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
|
||||
* @param authority Authority for the binomial name, e.g. "Sengir" on species of base Forestry.
|
||||
* @param unlocalizedDescription Unlocalized description for this species
|
||||
* @param dominant Whether this species is genetically dominant (false means it is recessive)
|
||||
* @param branch Classification of this species
|
||||
* @param binomial Binomial name of the species sans genus. "humboldti" will have the bee species flavour name be "Apis humboldti". Feel free to use fun names or null.
|
||||
* @param modID The modID from the mod of the species
|
||||
* @param leafSpriteProvider The leaf sprite provider for this species
|
||||
* @param germlingModelProvider The germling model provider for this species
|
||||
* @param woodProvider The wood texture provider. It is used to get wood textures for the charcoal pile.
|
||||
* @param generator The tree generator
|
||||
* @return a new tree species allele.
|
||||
*/
|
||||
IAlleleTreeSpeciesBuilder createSpecies(String uid, String unlocalizedName, String authority, String unlocalizedDescription, boolean dominant, IClassification branch, String binomial, String modID, ILeafSpriteProvider leafSpriteProvider, IGermlingModelProvider germlingModelProvider, IWoodProvider woodProvider, ITreeGenerator generator, ILeafProvider leafProvider);
|
||||
|
||||
/**
|
||||
* Get one of the built-in Forestry leaf types. Default type is deciduous.
|
||||
*/
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import forestry.api.genetics.IGenome;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface ITreeGenome extends IGenome {
|
||||
|
||||
@@ -37,4 +38,10 @@ public interface ITreeGenome extends IGenome {
|
||||
int getGirth();
|
||||
|
||||
IAlleleLeafEffect getEffect();
|
||||
|
||||
/**
|
||||
*
|
||||
* @return A ItemStack that is used in getPickBlock of the leave block.
|
||||
*/
|
||||
ItemStack getDecorativeLeaves();
|
||||
}
|
||||
Reference in new issue
Block a user