Add cocoons and fix bugs

This commit is contained in:
Nedelosk committed 2016-03-26 00:50:51 +01:00
1 parent c4f447aa67
commit 5b42b5fbae
37 files changed
+831 -54

No files matched your search

@@ -66,6 +66,11 @@ public interface IAlleleButterflySpecies extends IAlleleSpecies {
ISpriteProvider getSpriteProvider();
/**
* @return the IButterflyCocoonProvider
*/
IButterflyCocoonProvider getCocoonProvider();
/**
* @return The modid from the mod of the species.
*/
@@ -0,0 +1,25 @@
/*******************************************************************************
* Copyright (c) 2011-2014 SirSengir.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v3
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/lgpl-3.0.txt
*
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.api.lepidopterology;
import forestry.api.genetics.IHousing;
public interface IButterflyCocoon extends IHousing{
IButterfly getCaterpillar();
void setCaterpillar(IButterfly butterfly);
IButterflyNursery getNursery();
void setNursery(IButterflyNursery nursery);
}
@@ -0,0 +1,17 @@
/*******************************************************************************
* Copyright (c) 2011-2014 SirSengir.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v3
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/lgpl-3.0.txt
*
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.api.lepidopterology;
public interface IButterflyCocoonProvider {
String getCocoonTexture(int age);
}
@@ -25,12 +25,13 @@ public interface IButterflyFactory {
* @param authority Authority for the binomial name, e.g. "Sengir" on species of base Forestry.
* @param unlocalizedDescription Unlocalized description for this species
* @param modID The modID form the mod of the butterfly
* @param texturePath String texture path for this butterfly e.g. "forestry:textures/entities/butterfly/..."
* @param texturePath String texture path for this butterfly e.g. "forestry:butterfly/..."
* @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 serumColour The color of this butterfly's serum.
* @param cocoonProvider A IButterflyCocoonProvider for the butterfly
* @return a new butterfly species allele.
*/
IAlleleButterflySpeciesBuilder createSpecies(String uid, String unlocalizedName, String authority, String unlocalizedDescription, String modID, String texturePath, boolean dominant, IClassification branch, String binomial, Color serumColour);
IAlleleButterflySpeciesBuilder createSpecies(String uid, String unlocalizedName, String authority, String unlocalizedDescription, String modID, String texturePath, boolean dominant, IClassification branch, String binomial, Color serumColour, IButterflyCocoonProvider cocoonProvider);
}
@@ -53,6 +53,8 @@ public interface IButterflyRoot extends ISpeciesRoot {
* @return butterfly entity on success, null otherwise.
*/
EntityLiving spawnButterflyInWorld(World world, IButterfly butterfly, double x, double y, double z);
boolean plantCocoon(World world, IButterflyNursery nursery, GameProfile owner);
/**
* @return true if passed item is mated.
@@ -26,4 +26,8 @@ public interface IEntityButterfly extends IAnimals {
ITree getPollen();
void setPollen(ITree pollen);
boolean canMateWith(IEntityButterfly butterfly);
boolean canMate();
}