Remove the genetics dependency on botany-api

This commit is contained in:
mezz committed 2017-08-13 21:53:59 -07:00
1 parent 8fa3d5ece8
commit 7de1c86d29
13 files changed
+116 -61

No files matched your search

@@ -5,12 +5,15 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import binnie.genetics.api.acclimatiser.IAcclimatiserManager;
import forestry.api.genetics.IIndividual;
public class GeneticsApi {
private static Collection<IAnalystPagePlugin> analystPagePlugins = new ArrayList<>();
private static Collection<IProducePlugin> producePlugins = new ArrayList<>();
public static IAcclimatiserManager acclimatiserManager;
public static void registerAnalystPagePlugin(IAnalystPagePlugin<?> analystPageFactory) {
analystPagePlugins.add(analystPageFactory);
}
@@ -0,0 +1,11 @@
package binnie.genetics.api.acclimatiser;
import forestry.api.genetics.IChromosomeType;
public interface IAcclimatiserManager {
void addTolerance(final IChromosomeType chromosome, final IToleranceType type);
IToleranceType getTemperatureToleranceType();
IToleranceType getHumidityToleranceType();
}
@@ -0,0 +1,11 @@
package binnie.genetics.api.acclimatiser;
import net.minecraft.item.ItemStack;
public interface IToleranceType {
float getEffect(final ItemStack stack);
default boolean hasEffect(final ItemStack stack) {
return this.getEffect(stack) != 0.0f;
}
}