Skip to content

Animal feeding improvements #1025

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
May 16, 2019
Merged

Animal feeding improvements #1025

merged 20 commits into from
May 16, 2019

Conversation

Pr0methean
Copy link
Contributor

@Pr0methean Pr0methean commented Feb 26, 2019

  • Implements use of food for taming, horse healing, growth, or to set Love Mode.
  • Animals won't consume food when it has none of these effects.
  • GlowAbstractHorse.canBreed() can no longer return true if untamed.
  • Implements the duration limit and the particle effect for Love Mode.

@Pr0methean Pr0methean requested a review from aramperes February 26, 2019 01:50
@aramperes
Copy link
Member

What kind of live testing is required for this? Could you describe some testing steps?

@Pr0methean
Copy link
Contributor Author

Pr0methean commented Mar 10, 2019

Test that:

  • Animals descending from GlowAbstractHorse eventually become tamed when fed repeatedly
  • Baby animals grow when fed
  • Injured animals heal when fed
  • Adult animals, except untamed GlowAbstractHorse, enter Love Mode when fed (currently doesn't affect behavior, but should create heart particles)
  • More than one of those things can happen with the same piece of food
  • Food isn't consumed if none of those things can happen
  • Love Mode eventually expires

@FlorentClarret
Copy link
Member

FlorentClarret commented Apr 25, 2019

I tried your test and actually noticed some stuff:

  • Heart particles are indeed created when an animal is fed, but the particles appear on their feet instead of above them, which looks a bit strange.
  • Food is still consumed even if nothing else happens. I think it's because the canBreed method return always true if the animal is adult. I tested on cows and pigs.

The other things seem to work, I will also try to take a look soon to improve animal feeding

@Pr0methean
Copy link
Contributor Author

Pr0methean commented Apr 26, 2019

@FlorentClarret For your test where food was falsely consumed, would the cow and pig have been expected to enter Love Mode? If not, why not?

@FlorentClarret
Copy link
Member

I just gave wheat to a cow, which was not in love mode and the cow entered in love mode as expected, but after that the wheat is still consumed if I keep giving it wheat. I tried on vanilla an it's not the case, the wheat is not consumed if the cow is already in love mode.

- Heart particles should now spawn above the mob's head.
- Food won't be consumed to refresh love mode if already active.
@Pr0methean
Copy link
Contributor Author

Both issues should be fixed now.

Copy link
Member

@FlorentClarret FlorentClarret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now. Thanks @Pr0methean

Copy link
Member

@aramperes aramperes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work! Sorry for the delay.

@mastercoms mastercoms merged commit 9696b2f into dev May 16, 2019
@mastercoms mastercoms deleted the animalFeeding branch May 16, 2019 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants