Hello, guys! I'm fighting with this problem for weeks, and feel absolutly stuck whith it and really need your advice how to solve that issue. I am running a mini-games server. Player taps on the wall-sign and then he teleported to the game arena (on the same level). After catching player's PlayerInteractEvent I do simply $player->teleport($pos); Here goes the first problem: Everyone sees the player on the previous position, (like he was not teleported!) until he makes a move. How to make him appear immediately on the place he was teleported to? When he finally makes any move he don't simply dissapear in one place and appear in the new positions. It looks like he moves very fast from the teleportation source position to the teleportation target point. And here goes the trouble that really makes me crazy: looks like that when he moves through the chunk that not loaded on his client, the player stuks in the void, glitching and twitching without possibility to make any move until he relogs! I was thinking that the problem with the chunk of the teleportation target and try to force it to be loaded by player: PHP: //try to avoid tp glitch$lvl->loadChunk($pos->getX()>>4, $pos->getZ()>>4); $lvl->requestChunk($pos->getX()>>4, $pos->getZ()>>4, $player); Didn't help. Do I really have to trace every chunks through which player will be teleported?! and force them to be loaded by player?! Sounds very odd, its teleportation afrer all, not a moving! I replaced teleport with teleportImmediate - nothing changed! Please help, how to safely teleport a player!? How to avoid stucking in unload chunks? In advance thank you very much, I believe in your wisdom and experience!
Initially I do thought that m.b. my world is broken, but how can I check it? I've converted the world from mcregion to anvil format. I've iterated over all world blocks and fixed all lost tiles (tiles without corresponding tiles-blocks and tiles-blocks without corresponding tiles) How else could be tested the world? Now I can reproduce that glitch for 100%, and I starting to think that its a game client unloading chunk, not server reconnect to the server in my world player spawns in the chunk x=7 z = 9 (115 65 159) tp to the chunk x=-2 z=-8 (/tp -32 65 -128) tp back to the spawn (/tp 115 65 159) tp AGAIN to the chunk x=-2 z=-8 (/tp -32 65 -128) - BOOM! stuks in the void, glitching and twitching! Other players could be on the same world position in the same time without any glitching During all this teleportation I do not see that server unloads chunk -2/-8, ChunkUnloadEvent was not fired Can it be that a client unloads it? how to deal with it? Can it be something connected with config settings ? Code: chunk-sending.per-tick = 4 chunk-sending.max-chunks = 32 chunk-sending.spawn-threshold = 56 chunk-sending.cache-chunks = true I played with them but nothing changed My game client is 0.15.6, but the same bug was and with older versions I dont really know how to resolve this issue. Make the world smaller?! Is there really limitations of teleportation distance? Please help anyone! Thank you in advance. PS: And yes, I'm using the latest Genisys. Hope, it not a genisys-only issue
If im not wrong, chunk-sending.max-chunks need to be more than chunk-sending.spawn-threshold, can you try that out?
I've put back default Code: max-chunks: 192 spawn-threshold: 56 I've even removed all plugins! But nothing changes, still stuck and glitch 100%
may be that after teleport you can move PHP: setMotion(new Vector3(0, 0.1, 0)); maybe it works or not, I do not know. but it could solve the problem of player block to the sign?