mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-28 07:35:47 +00:00
Update the butterfly mutations
This commit is contained in:
1 parent
5b42b5fbae
commit
39c6e52d73
10 files changed
+130
-9
No files matched your search
@@ -11,11 +11,19 @@
|
||||
package forestry.api.lepidopterology;
|
||||
|
||||
public class ButterflyManager {
|
||||
|
||||
|
||||
/**
|
||||
* Convenient access to AlleleManager.alleleRegistry.getSpeciesRoot("rootButterflies")
|
||||
*/
|
||||
public static IButterflyRoot butterflyRoot;
|
||||
|
||||
/**
|
||||
* Used to create new butterflies.
|
||||
*/
|
||||
public static IButterflyFactory butterflyFactory;
|
||||
|
||||
/**
|
||||
* Used to create new butterfly mutations.
|
||||
*/
|
||||
public static IButterflyMutationFactory butterflyMutationFactory;
|
||||
}
|
||||
@@ -56,7 +56,11 @@ public interface IButterfly extends IIndividualLiving {
|
||||
*/
|
||||
boolean isAcceptedEnvironment(World world, double x, double y, double z);
|
||||
|
||||
IButterfly spawnCaterpillar(IButterflyNursery nursery);
|
||||
/**
|
||||
* @param world
|
||||
* @return create a caterpillar with the two genome's from the nursery.
|
||||
*/
|
||||
IButterfly spawnCaterpillar(World world, IButterflyNursery nursery);
|
||||
|
||||
/**
|
||||
* @param entity
|
||||
|
||||
@@ -8,7 +8,8 @@ package forestry.api.lepidopterology;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IGenome;
|
||||
import forestry.api.genetics.IMutation;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IButterflyMutation extends IMutation {
|
||||
float getChance(IButterflyNursery housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1);
|
||||
float getChance(World world, IButterflyNursery housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.lepidopterology;
|
||||
|
||||
import forestry.api.genetics.IMutationCustom;
|
||||
|
||||
public interface IButterflyMutationCustom extends IButterflyMutation, IMutationCustom {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.lepidopterology;
|
||||
|
||||
import forestry.api.genetics.IAllele;
|
||||
|
||||
public interface IButterflyMutationFactory {
|
||||
/**
|
||||
* Creates a new butterfly mutation.
|
||||
* Automatically registered with ButterflyManager.butterflyRoot.registerMutation()
|
||||
* See IButterflyMutationCustom and IMutationCustom for adding additional properties to the returned mutation.
|
||||
*
|
||||
* @param parentTree0 A parent butterfly for this mutation
|
||||
* @param parentTree1 A parent butterfly for this mutation
|
||||
* @param result The resulting alleles for this mutation
|
||||
* @param chance The chance that breeding the two parent butterfly's will result in this mutation
|
||||
* @return a new tree mutation.
|
||||
*/
|
||||
IButterflyMutationCustom createMutation(IAlleleButterflySpecies parentButterfly0, IAlleleButterflySpecies parentButterfly1, IAllele[] result, int chance);
|
||||
}
|
||||
Reference in new issue
Block a user