Revert "Use generics for Chromosome type, begin unifying code"

This reverts commit 43e41034f6.

Conflicts:
	src/main/java/forestry/api/arboriculture/IAlleleTreeSpecies.java
	src/main/java/forestry/api/genetics/IAlleleSpeciesCustom.java
	src/main/java/forestry/core/proxy/ProxyRenderClient.java
This commit is contained in:
mezz committed 2016-03-03 20:50:38 -08:00
1 parent 87f2dc0a0a
commit efcab41e04
217 files changed
+2408 -3136

No files matched your search

@@ -5,17 +5,8 @@
******************************************************************************/
package forestry.api.genetics;
import com.google.common.collect.ImmutableMap;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.Collection;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import forestry.api.core.INbtWritable;
/**
* Individuals can be seeded either as hive drops or as mutation results.
*
@@ -23,43 +14,38 @@ import forestry.api.core.INbtWritable;
*
* @author SirSengir
*/
public interface IMutation<C extends IChromosomeType> extends INbtWritable {
public interface IMutation {
/**
* @return {@link ISpeciesRoot} this mutation is associated with.
*/
@Nonnull
ISpeciesRoot<C> getRoot();
ISpeciesRoot getRoot();
/**
* @return first of the alleles implementing IAlleleSpecies required for this mutation.
*/
@Nonnull
IAlleleSpecies<C> getSpecies0();
IAlleleSpecies getAllele0();
/**
* @return second of the alleles implementing IAlleleSpecies required for this mutation.
*/
@Nonnull
IAlleleSpecies<C> getSpecies1();
IAlleleSpecies getAllele1();
/**
* @return The full default genome of the mutated side.
* @return Array of {@link IAllele} representing the full default genome of the mutated side.
*
* Make sure to return a proper array for the species class. Returning an allele of the wrong type will cause cast errors on runtime.
*/
@Nonnull
ImmutableMap<C, IAllele> getResultTemplate();
IAllele[] getTemplate();
/**
* @return Unmodified base chance for mutation to fire.
*/
float getBaseChance();
float getChance(World world, BlockPos pos, IAlleleSpecies<C> species0, IAlleleSpecies<C> species1, IGenome<C> genome0, IGenome<C> genome1);
/**
* @return Collection of localized, human-readable strings describing special mutation conditions, if any.
*/
@Nonnull
Collection<String> getSpecialConditions();
/**
@@ -72,7 +58,6 @@ public interface IMutation<C extends IChromosomeType> extends INbtWritable {
* @param allele
* @return the other allele which was not passed as argument.
*/
@Nullable
IAllele getPartner(IAllele allele);
/**