Carpet

Carpet

2M Downloads

Fake players trigger raids 1 gametick later than real players if using TNT or firework looting

Youmiel opened this issue · 0 comments

commented

Fake players trigger raids 1 gametick later than real players in 1 dimensional TNT or firework looting raid farm. As 1.18+ raid farm requires precise timing of triggering raid, this difference makes fake players unusable in these farms.

Here is the micro-timing analysis:
Real players:

  • Gametick 0:
    • Entity ticking phase:
      1. ServerPlayer::tick() is called, but it doesn't call super.tick()
      2. TNT (or firework) explodes, kills raiders, and applies the player(killer) with Bad Omen effect
    • Network update phase:
      1. ServerPlayer::doTick() is called. And it calls super.tick(), where the Bad Omen efffect will be ticked. So the player triggers raid

Fake players:

  • Gametick 0:
    • Entity ticking phase:
      1. EntityPlayerMPFake::tick() is called, as the fake player's entity id here is smaller than the TNTs' and fireworks'
      2. TNT (or firework) explodes, kills raiders, and applies the player(killer) Bad Omen effect
    • Network update phase:
      1. (nothing important happened)
  • Gametick 1:
    • Entity ticking phase:
      1. EntityPlayerMPFake::tick() is called, which calls both ServerPlayer::tick() and ServerPlayer::doTick(), where the Bad Omen efffect will be ticked. So the player triggers raid

Note: if the players are in the overworld and TNTs in the Nether, then there is no difference, as the whole Nether dimension is ticked later than the Overworld.

Edit 1:

  • “there is no issue“ -> "there is no difference”

Edit 2:

  • "Entity update phase" -> "Entity ticking phase"
  • Delete "Note" as I'm not 100% sure about this
  • Added the names of functions being called(Mojang mapping) in micro-timing analysis