Commit graph

12 commits

Author SHA1 Message Date
Nassim Jahnke
ec909b2144 Fix moveToWorld worldserver reference (#3929) 2020-07-17 18:44:39 +02:00
Spottedleaf
cfd598512a even even even even even even more work 2020-06-25 18:53:21 -07:00
Aikar
93655fce88 Ensure we load chunks for Entity getCubes
Was some other code paths missing the set for loading chunks

Fixes #3582
Fixes #3368

Probably helps with "falling through world" issues too.
2020-06-20 05:22:09 -04:00
Aikar
7ead67800e Fix collision checks on spawning hanging entities and null on async chunk loads
getCubes will now always load chunks
getChunk with gen false will now not throw error

Fixes #3368
Fixes #3364
2020-05-14 04:58:47 -04:00
Aikar
924d46ea01 Add a TELEPORT ticket when changing dimensions
This should fix any remaining issues around collision issues on
chunk edges when changing dimensions sending to Y 256
2020-05-10 23:58:04 -04:00
Spottedleaf
aff206ef81 Optimize WorldBorder collision checks and air
Port part of leafs changes from Tuinity, will worry about rest later with larger changes coming
2020-05-10 22:49:58 -04:00
Aikar
a26aabf9d0 Fix teleporting onto a chunk line
Obscure detail in that if you teleport right on a chunk line, it
adds +1 to your collision check and will check the unloaded neighbor.

but the call to load the chunk then returned null if it was pending unload, such
as the load we did in Player List

However we want gen=true for players here anyways, so use getType
2020-05-10 05:36:35 -04:00
Aikar
bd2a5095d3 Don't use our modified chunk checks for collision in world gen
Fixes issues with errors in logs on generating chunks
2020-05-10 02:26:21 -04:00
Aikar
5eea746c78 Allow loading entities current chunk if needed to fix collision checks
Having trouble reproducing this myself, but this should do it.
2020-05-10 01:04:45 -04:00
Aikar
04becc8a1c Ensure chunks loaded on respawn for suffocation check 2020-05-09 21:13:30 -04:00
Aikar
f36b2a2c05 Remove some Streams usage in Entity Collision
While there is more down the collision system, remove some of the wrapping
Spliterator stuff as even this wrapper stream has shown up in profiling.

With other collision optimizations, we might also even avoid inner streams too.
2020-05-09 19:18:26 -04:00
Aikar
f0b502d564 Optimize Collision to not load chunks
The collision code takes an AABB and generates a cuboid of checks rather
than a cylinder, so at high velocity this can generate a lot of chunk checks.

Treat an unloaded chunk as a collision for entities, and also for players if
the "prevent moving into unloaded chunks" setting is enabled.

If that setting is not enabled, collisions will be ignored for players, since
movement will load only the chunk the player enters anyways and avoids loading
massive amounts of surrounding chunks due to large AABB lookups.

Fixes #3321
2020-05-09 15:47:08 -04:00