Fake player’s first login causes a lot of lag.
yikerman opened this issue · 6 comments
When using /player someone spawn
, if 'someone' has never logged in, in some circumstances it can freeze a tick.
My guess is the player’s GameProfile is not in the cache so the game will fetch the information. If the connection to Mojang’s server is lagging it can get stuck.
I suppose so, in which case I don't see how it can be fixed, because getting the GameProfile is obligatory for servers which aren't on offline mode... unless im mistaken?
in which case I don't see how it can be fixed
@Ghoulboy78 Maybe we can move the networking stuff into a separate thread. (It shouldn’t block the ticking thread from the very beginning.)
Does a regular player logging in cause the same? (for the first time at least if you believe it's related to caching)
@altrisi The server is in offline mod so I have no idea whether this is the case.
@xiaoyu2006 具体可以看我的fork
See my fork for details
https://github.com/mocksonline/fabric-carpet-force-offline-fakeplayer
@xiaoyu2006 直接修改GameProfile profile = new GameProfile(UUIDUtil.createOfflinePlayerUUID(playerName), playerName);就行了,正版验证部分注释掉就行