mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-14 01:48:04 -04:00
physics: fix movement into unloaded chunks
This commit is contained in:
parent
cd0885a56c
commit
7be7124013
@ -213,7 +213,7 @@ abstract class Entity(
|
|||||||
val result = VoxelShape()
|
val result = VoxelShape()
|
||||||
for (blockPosition in blockPositions) {
|
for (blockPosition in blockPositions) {
|
||||||
val chunk = connection.world.getChunk(blockPosition.chunkPosition)
|
val chunk = connection.world.getChunk(blockPosition.chunkPosition)
|
||||||
if (chunk == null && !ignoreUnloadedChunks) {
|
if ((chunk == null || !chunk.isFullyLoaded) && !ignoreUnloadedChunks) {
|
||||||
// chunk is not loaded
|
// chunk is not loaded
|
||||||
result.add(VoxelShape.FULL + blockPosition)
|
result.add(VoxelShape.FULL + blockPosition)
|
||||||
continue
|
continue
|
||||||
@ -284,7 +284,7 @@ abstract class Entity(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
velocity?.let {
|
velocity?.let {
|
||||||
move(it * deltaTime)
|
move(it * deltaTime, false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user