fix nether/end joining in 1.16+

This commit is contained in:
Bixilon 2021-04-22 19:33:29 +02:00
parent d83b2e5b0e
commit 52046de8ab
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
2 changed files with 3 additions and 2 deletions

View File

@ -37,7 +37,7 @@ public class PacketTimeUpdate extends PlayS2CPacket {
@Override
public void log() {
Log.protocol(String.format("[IN] Time Update packet received. Time is now %st (total %st, moving=%s)", Math.abs(this.timeOfDay), this.worldAge, this.timeOfDay > 0));
Log.protocol(String.format("[IN] Time update packet received. Time is now %st (total %st, moving=%s)", Math.abs(this.timeOfDay), this.worldAge, this.timeOfDay > 0));
}
public long getWorldAge() {

View File

@ -18,13 +18,14 @@ import de.bixilon.minosoft.data.world.light.ChunkLightAccessor
import de.bixilon.minosoft.data.world.light.LightAccessor
import de.bixilon.minosoft.protocol.protocol.PlayInByteBuffer
import de.bixilon.minosoft.protocol.protocol.ProtocolVersions
import de.bixilon.minosoft.protocol.protocol.ProtocolVersions.V_1_16
import java.util.*
object LightUtil {
fun readLightPacket(buffer: PlayInByteBuffer, skyLightMask: BitSet, blockLightMask: BitSet, dimension: Dimension): LightAccessor {
// ToDo
val skyLight = if (dimension.hasSkyLight) {
val skyLight = if (dimension.hasSkyLight || buffer.versionId > V_1_16) { // ToDo: find out version
readLightArray(buffer, skyLightMask, dimension)
} else {
mutableMapOf()