Bukkit/Bukkit — pull request #1020 by ltcyx (2014-01-31 01:40:37+00:00)
Title: [B+C] Add special event for breeding. Adds BUKKIT-5357

The Issue:

It could be interesting to have a special even for when a new LivingEntity is spawned because of breeding. It should contain references to both parents so that, for example, wool colour from both can be used in detemining the colour for the offspring.

Justification for this PR:

This adds CreatureBreedSpawnEvent, which extends CreatureSpawnEvent and is fired when a new creature is spawned because of breeding. This new event contains references to both parents, which can then be examined to alter the offspring or modified themselves.

PR Breakdown:

This adds CreatureBreedSpawnEvent.

Testing Results and Materials:

A custom CraftBukkit server was built with this, and a plugin was created with the patched Bukkit lib. This plugin captures this new event and, if the new entity is a sheep, it colours the wool according to the colour of the parents, blending it sort of like you get when mixing dyes in a workbench

Relevant PR(s):

TBD

JIRA Ticket:

BUKKIT-5357 https://bukkit.atlassian.net/browse/BUKKIT-5357