Skip to content
Permalink
Browse files

Animal Cleanup.

Added getters and setters for almost all private fields. Sorted members.
  • Loading branch information...
Kittychanley committed Nov 16, 2015
1 parent c6a4812 commit dd5c34a7d28b6ae68aa1826b003dc46de83602d4
@@ -21,107 +21,121 @@
public static final InteractionEnum[] INTERACTIONS = {MOUNT,SHEAR,MILK,BREED, NAME, TOLERATEPLAYER};
}

GenderEnum getGender();
boolean canFamiliarize();

boolean canMateWith(IAnimal animal);

boolean checkFamiliarity(InteractionEnum interaction, EntityPlayer player);

EntityAgeable createChildTFC(EntityAgeable entityageable);

/**
* Represents interaction with the animal that makes the animal happy, thus increasing it's familiarization
* @param ep
*/
void familiarize(EntityPlayer ep);

int getAge();

/**
* @return Aggression modifier of the animal. Used for rendering and various other purposes.
* Aggression affects how likely an animal is to attack another player or animal and the ferocity of which it does so.
*/
float getAggressionMod();

int getAnimalTypeID();

Vec3 getAttackedVec();

int getBirthDay();

int getDueDay();

EntityLiving getEntity();

/**
* Represents how familiar the animal is with players. This is used for most human interaction.
* @return familiarity
*/
int getFamiliarity();

boolean getFamiliarizedToday();

Entity getFearSource();

GenderEnum getGender();

int getHunger();

// It would be nice to call this isInLove() except that would shadow
// EntityAnimal.isInLove() causing MCP to obfuscate this method, which
// we don't want because the callers won't be obfuscated.
//
boolean getInLove();
/**
* @return The length of time (in days) until this type of animal reatures maturity
*/
int getNumberOfDaysToAdult();

boolean isAdult();
/**
* @return Obedience modifier of the animal. Used for rendering and various other purposes.
* Obedience affects how well the animal responds to player commands and how willingly it does so.
* Obedience and Aggression collectively determine whether an animal is domesticated.
*/
float getObedienceMod();

//public int getSex();
/**
* @return Size modifier of the animal. Used for rendering and various other purposes.
* Size is primarilly affected by the area the animal lives in; forests generally have smaller animals, as do colder climates.
*/
float getSize();
float getSizeMod();

/**
* @return Strength modifier of the animal. Used for rendering and various other purposes.
* Absolute strength is affected by size, but inherant musculature also plays a roll.
*/
float getStrength();
float getStrengthMod();

/**
* @return Aggression modifier of the animal. Used for rendering and various other purposes.
* Aggression affects how likely an animal is to attack another player or animal and the ferocity of which it does so.
* Used to calculate whether an animal should become more familiar or less familiar with players
*/
float getAggression();

void handleFamiliarityUpdate();

boolean isAdult();

/**
* separate from isBreedingItem, this just determines if an animal would eat from an itemstack.
* @param item the item
* @return see desc.
*/
boolean isFood(ItemStack item);

/**
* @return Obedience modifier of the animal. Used for rendering and various other purposes.
* Obedience affects how well the animal responds to player commands and how willingly it does so.
* Obedience and Aggression collectively determine whether an animal is domesticated.
*/
float getObedience();

boolean isPregnant();

EntityAgeable createChildTFC(EntityAgeable entityageable);

// It would be nice to call this isInLove() except that would shadow
// EntityAnimal.isInLove() causing MCP to obfuscate this method, which
// we don't want because the callers won't be obfuscated.
//
boolean getInLove();

void setInLove(boolean b);

EntityLiving getEntity();

boolean canMateWith(IAnimal animal);

void mate(IAnimal animal);

void setAge(int par1);
void setAge(int age);

int getHunger();

Vec3 getAttackedVec();
void setAggressionMod(float aggression);

void setAttackedVec(Vec3 attackedVec);

Entity getFearSource();

void setBirthDay(int day);

void setFamiliarity(int f);

void setFearSource(Entity fearSource);

void setHunger(int h);

int getAnimalTypeID();

boolean trySetName(String name, EntityPlayer player);

/**
* Represents how familiar the animal is with players. This is used for most human interaction.
* @return familiarity
*/
int getFamiliarity();
/**
* Used to calculate whether an animal should become more familiar or less familiar with players
*/
void handleFamiliarityUpdate();
void setInLove(boolean b);

/**
* Represents interaction with the animal that makes the animal happy, thus increasing it's familiarization
* @param ep
*/
void familiarize(EntityPlayer ep);
void setObedienceMod(float obedience);

boolean checkFamiliarity(InteractionEnum interaction, EntityPlayer player);
void setSizeMod(float size);

boolean getFamiliarizedToday();
void setStrengthMod(float strength);

boolean canFamiliarize();
boolean trySetName(String name, EntityPlayer player);
}

0 comments on commit dd5c34a

Please sign in to comment.
You can’t perform that action at this time.