mcMMO-Dev/mcMMO — comment on commit 1c866a52e5b073f4088eb11ec70b0d0d25ef4edc
File:  line 0
By bm01:

Maybe it works since maxNoDamageTicks is equal 20, but I think this is how it should be done (one of both): http://justpaste.it/rwi
When hit, noDamageTicks is set to maxNoDamageTicks. noDamageTicks is decremented on each tick.
So the invulnerability should be between maxNoDamageTicks and maxNoDamageTicks / 2. Here, it is between 0 and maxNoDamageTicks / 2.