Affects Version/s: Minecraft 14w02b, Minecraft 14w04b, Minecraft 14w08a, Minecraft 14w11b, Minecraft 1.8.9, Minecraft 1.9 Pre-Release 2, Minecraft 1.11.2, Minecraft 17w13b, Minecraft 18w11a, Minecraft 1.13.1, 1.15.1, 1.15.2 Pre-release 2
Fix Version/s: None
Steps to Reproduce:
- Spawn or breed a baby sheep.
- Feed that sheep wheat continuously. Observe the green particles. Do not let the sheep eat any grass.
- The sheep will mature very quickly (this is a new feature).
- Observe that the newly-matured sheep is able to breed immediately, if you feed it more wheat.
- Spawn or breed another baby sheep.
- Feed this sheep wheat exactly 29 times. It now has around 56 seconds remaining until maturity, assuming you fed it at a reasonably quick pace (don't be slow!).
- Allow the sheep to eat grass. It must eat grass for this to work.
- Observe that the sheep immediately matures after eating grass.
- Attempt to feed it more wheat, and observe that it will not accept it. In fact, it will take around 19 minutes before the sheep is able to breed.
The above steps 1-4 will work for any passive mob players can breed. However, the correct behavior (step 9) only occurs for sheep which matured the moment they ate grass.
ForcedAge is a new tag which increments when baby animals are fed. It increments by the same amount that Age is incremented by when they are fed by players. Negative Age values mean a mob is a baby, while positive values mean they cannot mate. When the Age is negative, it gradually increases. When it is positive, it gradually decreases. When it is 0, the mob can mate.
Explanation of the bug:
ForcedAge is meant to compensate for the new baby-feeding feature: when a baby mob matures, its Age is supposed to be set to ForcedAge. In effect, a mob would not be able to mate until 20 minutes after it is born, regardless of whether a player has fed it to accelerate its growth.
However, there is a bug: the game only sets Age to ForcedAge if eating is the cause of the mob's maturing to adulthood. If the player shaves 19.75 minutes off a mob's growth time, and waits the remaining 15 seconds, there will be no penalty and the mob can breed immediately.
In fact, because feeding a baby mob shaves 10% off their remaining time, and the removed time is rounded to integer seconds (not gameticks, but seconds), feeding a mob when they are 9 seconds away from adulthood yields no effect, and the penalty will not occur even if you feed a mob continuously until it matures. The only way I have found of incurring the ForcedAge penalty is to have a baby sheep eat grass within the last minute, causing it to mature (baby sheep eating grass have their Age incremented by 60 seconds, without incrementing ForcedAge).