Based on reddit post "[::] It knows when you are trying to pause the game, and it will find you..."
The the integrated server (when playing singleplayer) continues to handle packets when the game is paused. This allows the enter_block advancement trigger to continue running commands if a reward command teleports the player.
Note: The client continues to handle packets while paused as well, which might be intended for multiplayer. It could however cause problems when it receives a GUI packet while the pause menu is open.
- Download the attached advancement enter_block_advancement.json and place it in the following directory of your world folder
- Download the attached function enter_block_function.mcfunction and place it in the following directory of your world folder
- Open the world an pause it
- Look at the log
→ You will see that "Triggered" is still printed
Based on 1.11.2 decompiled using MCP 9.35 rc1 and 17w17a decompiled using CFR
Teleporting a player sends a SPacketPlayerPosLook packet to the client. As a response it sends a CPacketConfirmTeleport and a CPacketPlayer.PositionRotation packet back. The latter one then causes the method net.minecraft.network.NetHandlerPlayServer.processPlayer(CPacketPlayer) to move the player and do block collisions, which then triggers the enter_block trigger.
The server continues to handle packets because the method net.minecraft.server.integrated.IntegratedServer.tick() continues to run the tasks in the net.minecraft.server.MinecraftServer.futureTaskQueue which contains the packets as well.