Skip to content
This repository has been archived by the owner on Sep 12, 2021. It is now read-only.

Chunks not loading when the player is teleported #178

Closed
SrBedrock opened this issue Aug 23, 2020 · 27 comments
Closed

Chunks not loading when the player is teleported #178

SrBedrock opened this issue Aug 23, 2020 · 27 comments
Assignees
Labels
bug Something isn't working normal-priority

Comments

@SrBedrock
Copy link

SrBedrock commented Aug 23, 2020

Describe the bug

Chunk where the player is teleported does not load, only the chunks around him.

To Reproduce

Using a plugin that teleports the player such as essentialx, teleport to a location that is not loaded.
Player command: /home test

Plugins

Plugins (7): Essentials, EssentialsSpawn, GriefPrevention, LuckPerms, mcMMO, WorldEdit, WorldGuard

Version

This server is running Tuinity version git-Tuinity-"8608126" (MC: 1.16.1) (Implementing API version 1.16.1-R0.1-SNAPSHOT)

Misc

Player Teleport:

2020-08-23_20 35 57

Seconds later:

2020-08-23_20 36 07

Player Teleport:

image

Seconds later:

image

Player Teleport:

2020-08-23_20 49 10
2020-08-23_20 49 11

Seconds later:

2020-08-23_20 49 16
2020-08-23_20 49 17

Player Teleport:

image
...

@SrBedrock SrBedrock added the bug Something isn't working label Aug 23, 2020
@Gilthunderx
Copy link

It occurs on my server too, the chunks where you tp'ed doesn't load but the chunks around it does, I guess when tps is low when this usually happens.

@Spottedleaf
Copy link
Member

I suspect there's something weird going on with the way chunk tickets are added and how the priority system is scheduling loads. Hard to tell given there's no debug tools we have to figure it out.
I'll be looking at the chunk system extensively when I finish the light / scheduling changes I have locally, so hopefully I catch it there.

@PaulBGD
Copy link
Contributor

PaulBGD commented Sep 9, 2020

I wrote a small player botter that sends 75 players to the server and separates them 1k blocks apart, once they've all joined and loaded some chunks it was very easy to teleport to them and see the chunks around them in this unloaded state. This is without any plugins except the one to spawn players at different locations.

@SrBedrock
Copy link
Author

Problem probably solved by PaperMC/Paper@b2381db

@Spottedleaf
Copy link
Member

I doubt the issue will be fixed by that commit, but I've just updated upstream so you can check for yourself if it does.

@SrBedrock
Copy link
Author

I doubt the issue will be fixed by that commit, but I've just updated upstream so you can check for yourself if it does.

Yep, problem persists after the update. 😢

@RocketManKian
Copy link

Please fix this urgently

@LucidAPs
Copy link

Oh my god I thought I was gonna go crazy trying to figure out why this was happening! Finally this issue will be addressed.

@SrBedrock
Copy link
Author

SrBedrock commented Jan 19, 2021

Any news about this problem?
This is the worst possible bug, with 20 to 18 TPS it is literally unplayable, the world just doesn't load.

image

@SrBedrock
Copy link
Author

Would it be better to open a report issue in PaperMC? I believe that this problem also occurs on servers using Paper.

@12emin34
Copy link

It would be but test it first

@Spottedleaf
Copy link
Member

Spottedleaf commented Jan 21, 2021

I'm pretty sure some of their changes are causing this, so as long as you can produce it on paper you're OK to report it to them as well (if you cannot let me know).

Latest should alleviate this issue a bit due to the light engine changes.

@Ultrajungleboy
Copy link

Ultrajungleboy commented Jan 22, 2021

While trying to rewrite a plugin for paper and 1.16.5(cpcamerastudioreborn)
I also noticed this issue but in a different form, when the player is teleported every tick it doesnt load ANY chunks around the player, this also happens on spigot.

However, I added debug to tell me if the server says the chunks are loaded where the player is and its returning true

Maybe a packet problem?

Also I've tried force loading the chunks when the player is teleported and using asyncteleport and normal teleport

@Spottedleaf
Copy link
Member

Spottedleaf commented Jan 22, 2021

The problem is chunk load order is way off and it makes the client very confused so it wont render the chunks (you can see entities, but not the chunk)

@Ultrajungleboy
Copy link

Ultrajungleboy commented Jan 22, 2021

Actually with the testing I've done with my plugin you cant see entites-- heres a clip of it in progress the way that im getting the chunks to load is by pausing the player every 400 ticks thats why you can see the blocks but no entity https://streamable.com/xerwbu

@Ultrajungleboy
Copy link

When im connected to the server via localhost this is what it looks like https://streamable.com/xqpfpb

@SrBedrock
Copy link
Author

When im connected to the server via localhost this is what it looks like streamable.com/xqpfpb

I can't identify any problems with the video.

@SrBedrock
Copy link
Author

That's the real problem, entities are loaded as spottedleaf explained above.

chunk-bug.mp4

@SrBedrock
Copy link
Author

image

@Ultrajungleboy
Copy link

When im connected to the server via localhost this is what it looks like streamable.com/xqpfpb

I can't identify any problems with the video.

thats because im connected via localhost which means i have almost no latency

@Ultrajungleboy
Copy link

Also if you look at the first video I sent you can see that the entities arent loaded, this issue might be an entirely different issue but resolving this issue might fix your issue as well. I also posted this as an issue in the paper github

@Spottedleaf
Copy link
Member

I've since pushed a dev branch, dev/playerchunkloading, that is aimed to generally fix this issue. Please note that it is a dev branch and therefore only really suitable for testing purposes, as with all dev branches.

@Ultrajungleboy
Copy link

I've since pushed a dev branch, dev/playerchunkloading, that is aimed to generally fix this issue. Please note that it is a dev branch and therefore only really suitable for testing purposes, as with all dev branches.

Hey, great job looks as if my issue has been fixed when I built and tested your dev branch! Thank you for the fast work :)

@Ultrajungleboy
Copy link

Chunks no longer load when the player is constantly teleported every tick as of the last commit in the main branch. however this did work in the fix frustrum commit

@Spottedleaf
Copy link
Member

Spottedleaf commented Jan 27, 2021

try now (f8c0db4)

@Ultrajungleboy
Copy link

Ultrajungleboy commented Jan 27, 2021

I downloaded the master branch jar from Jenkins and I still get the same result no chunks loading when the player is constantly teleported if you would like to test this yourself there's a plugin called cpcamerastudioreborn that can mimic this for you and I have yet to experience a crash using the frustum update

Although you need to test it with some latency - you cant use localhost or they will always load regardless

UPDATE -- with higher latency like 150ms on the version before it was merged to main. when the player is teleported every tick sometimes a teleport is skipped resulting in something along the lines of 8-12 teleports a second when it should be 20--I cannot confirm if the new master branch fixes this as the chunks no longer load. ALSO the lower the latency the more teleports go through -- for example, for me, it looks perfect

Video of it running on a connected player:
https://streamable.com/h0wbw5

EDIT: now FIXED and chunks are loading on most recent commit for dev/playerchunkloading
2830324
although the entities don't load this is an entirely different issue

@JRoy
Copy link
Member

JRoy commented May 21, 2021

fixed as of dev/playerchunkloading merged

@JRoy JRoy closed this as completed May 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working normal-priority
Projects
None yet
Development

No branches or pull requests

9 participants