Add Flower Definition and Add Flower Factory

This commit is contained in:
Nedelosk committed 2016-10-22 03:39:42 +02:00
1 parent 4cca08af79
commit fd7c73c354
28 files changed
+1350 -685

No files matched your search

@@ -7,10 +7,6 @@ public enum EnumAcidity implements IStringSerializable {
Neutral,
Alkaline;
public String getID() {
return this.name().toLowerCase();
}
@Override
public String getName() {
return this.name().toLowerCase();
@@ -1,7 +1,6 @@
package binnie.botany.api;
import forestry.api.genetics.ISpeciesType;
import forestry.arboriculture.genetics.TreeRoot;
public enum EnumFlowerStage implements ISpeciesType {
FLOWER("Flower"),
@@ -7,10 +7,6 @@ public enum EnumMoisture implements IStringSerializable {
Normal,
Damp;
public String getID() {
return this.name().toLowerCase();
}
@Override
public String getName() {
return name().toLowerCase();
@@ -0,0 +1,15 @@
package binnie.botany.api;
public class FlowerManager {
/**
* Convenient access to AlleleManager.alleleRegistry.getSpeciesRoot("rootFlowers")
*/
public static IFlowerRoot flowerRoot;
/**
* Used to create new flowers.
*/
public static IFlowerFactory flowerFactory;
}
@@ -0,0 +1,14 @@
package binnie.botany.api;
import forestry.api.genetics.IAlleleSpeciesBuilder;
public interface IAlleleFlowerSpeciesBuilder extends IAlleleSpeciesBuilder{
@Override
IAlleleFlowerSpecies build();
IAlleleFlowerSpeciesBuilder setPH(EnumAcidity acidity);
IAlleleFlowerSpeciesBuilder setMoisture(EnumMoisture moisture);
}
+4 -3
View File
@@ -1,6 +1,7 @@
package binnie.botany.api;
import forestry.api.genetics.IIndividual;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public interface IFlower extends IIndividual {
@@ -9,15 +10,15 @@ public interface IFlower extends IIndividual {
IFlowerGenome getMate();
void mate(final IFlower p0);
void mate(final IFlower flower);
int getAge();
void age();
void setAge(final int p0);
void setAge(final int age);
IFlower getOffspring(final World p0);
IFlower getOffspring(final World world, final BlockPos pos);
int getMaxAge();
@@ -0,0 +1,16 @@
package binnie.botany.api;
import forestry.core.genetics.IGeneticDefinition;
import net.minecraft.item.ItemStack;
public interface IFlowerDefinition extends IGeneticDefinition {
@Override
IFlowerGenome getGenome();
@Override
IFlower getIndividual();
ItemStack getMemberStack(EnumFlowerStage flowerStage);
}
@@ -0,0 +1,16 @@
package binnie.botany.api;
import javax.annotation.Nonnull;
import forestry.api.genetics.IAllele;
import forestry.api.genetics.IClassification;
public interface IFlowerFactory {
@Nonnull
IAlleleFlowerSpeciesBuilder createSpecies(@Nonnull String uid, @Nonnull String unlocalizedName, @Nonnull String authority, @Nonnull String unlocalizedDescription, boolean isDominant, @Nonnull IClassification branch, @Nonnull String binomial, @Nonnull IFlowerType flowerType);
@Nonnull
IFlowerMutationBuilder createMutation(@Nonnull IAlleleFlowerSpecies parentFlower0, @Nonnull IAlleleFlowerSpecies parentFlower1, @Nonnull IAllele[] result, int chance);
}
@@ -1,9 +1,12 @@
package binnie.botany.api;
import forestry.api.genetics.IAllele;
import forestry.api.genetics.IGenome;
import forestry.api.genetics.IMutation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public interface IFlowerMutation extends IMutation {
float getChance(final IAllele p0, final IAllele p1, final IGenome p2, final IGenome p3);
@Override
IFlowerRoot getRoot();
float getChance(final World world, final BlockPos pos, final IAlleleFlowerSpecies p0, final IAlleleFlowerSpecies p1, final IFlowerGenome p2, final IFlowerGenome p3);
}
@@ -0,0 +1,7 @@
package binnie.botany.api;
import forestry.api.genetics.IMutationBuilder;
public interface IFlowerMutationBuilder extends IMutationBuilder {
}
@@ -3,7 +3,6 @@ package binnie.botany.api;
import com.mojang.authlib.GameProfile;
import forestry.api.genetics.IAllele;
import forestry.api.genetics.ISpeciesRoot;
import forestry.api.genetics.ISpeciesType;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;