remove jitpack badge, fix some chunk preparing bugs

This commit is contained in:
Bixilon 2022-01-14 12:10:39 +01:00
parent 2f8a144965
commit 610389f65d
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
2 changed files with 3 additions and 6 deletions

View File

@ -3,7 +3,6 @@
Minosoft is an open source minecraft client, written from scratch in kotlin (and java). It aims to bring more functionality and stability.
[![pipeline status](https://gitlab.bixilon.de/bixilon/minosoft/badges/master/pipeline.svg)](https://gitlab.bixilon.de/bixilon/minosoft/-/commits/master)
[![](https://jitpack.io/v/de.bixilon.gitlab.bixilon/minosoft.svg)](https://jitpack.io/#de.bixilon.gitlab.bixilon/minosoft)
<h2><span style="color:red">Notice: I am **not** responsible for anti cheat banned accounts, this project is heavily in development!</span></h2>

View File

@ -72,6 +72,7 @@ import de.bixilon.minosoft.util.KUtil.toResourceLocation
import de.bixilon.minosoft.util.chunk.ChunkUtil
import de.bixilon.minosoft.util.chunk.ChunkUtil.isInViewDistance
import de.bixilon.minosoft.util.chunk.ChunkUtil.loaded
import de.bixilon.minosoft.util.chunk.ChunkUtil.received
import glm_.vec2.Vec2i
import glm_.vec3.Vec3
import glm_.vec3.Vec3i
@ -477,17 +478,14 @@ class WorldRenderer(
if (!chunk.isFullyLoaded || section.blocks.isEmpty) { // ToDo: Unload if empty
return false
}
/*
// ToDo: The chunk needs to be fully loaded!
val neighbours = world.getChunkNeighbours(chunkPosition)
if(!neighbours.loaded){
if (!neighbours.received) {
return false
}
*/
val visible = ignoreFrustum || isSectionVisible(chunkPosition, sectionHeight, section.blocks.minPosition, section.blocks.maxPosition, true)
if (visible) {
val item = WorldQueueItem(chunkPosition, sectionHeight, chunk, section, Vec3i.of(chunkPosition, sectionHeight).toVec3() + CHUNK_CENTER, null)
val item = WorldQueueItem(chunkPosition, sectionHeight, chunk, section, Vec3i.of(chunkPosition, sectionHeight).toVec3() + CHUNK_CENTER, ChunkUtil.getDirectNeighbours(neighbours.unsafeCast(), chunk, sectionHeight))
queueLock.lock()
queue.removeAll { it == item } // Prevent duplicated entries (to not prepare the same chunk twice (if it changed and was not prepared yet or ...)
if (chunkPosition == cameraChunkPosition) {