MineColonies

MineColonies

53M Downloads

Village happiness

Wetz1990 opened this issue ยท 7 comments

commented

Minecolonies version

Version: 1.12.2-0.10.159-Alpha

Expected behavior

Villager happines level hits 10, and everyone is all excited and gets "born" wiht good stats

Actual behaviour

Villager level goes from 9.9 till 10. But, instead of setting the villager happiness level to 10 inside the townhall it gets set to 1.
This results in all the villagers getting born with 1-1-1 stats.
This explains how it is possible to go from 9.9 happiness level to 1 over one night not chanching anything.

I manually checked all my villagers, and they are all green in they hapiness messure.

Steps to reproduce the problem

  1. build village
  2. get happiness to 10
  3. it gets set to 1 in the town hall
commented

๐Ÿ˜† ๐Ÿคฃ

commented

yay! I de-bugged code, without reading the code! ๐Ÿ’ƒ

commented

Did this get fixed in the latest version? 161-alpha

commented
commented

@Raycoms Some rounding derpage?

commented

oh a code derp, found it!
if (happinessTotal > HappinessData.MAX_HAPPINESS)
{
happinessTotal = HappinessData.MIN_HAPPINESS;
}

commented