When looking at ServerPlayer in Minecraft, you really wouldn't think much about it, because it doesn't look like it calls Player#tick in ServerPlayer#tick. However, just below it in ServerPlayer#doTick, it does in fact call Player#tick in there, and as such, it ends up running twice in one tick.
I've been trying to figure out why things were going so fast in a mod I was porting, and turns out, PlayerTickEvents runs twice!
https://github.com/Fabricators-of-Create/Porting-Lib/blob/1.20.1/modules/entity/src/main/java/io/github/fabricators_of_create/porting_lib/entity/mixin/common/ServerPlayerMixin.java#L99-L107 https://github.com/Fabricators-of-Create/Porting-Lib/blob/1.20.1/modules/entity/src/main/java/io/github/fabricators_of_create/porting_lib/entity/mixin/common/PlayerMixin.java#L52-L60
When looking at
ServerPlayer
in Minecraft, you really wouldn't think much about it, because it doesn't look like it callsPlayer#tick
inServerPlayer#tick
. However, just below it inServerPlayer#doTick
, it does in fact callPlayer#tick
in there, and as such, it ends up running twice in one tick.