mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 11:24:56 -04:00
fix nether/end joining in 1.16+
This commit is contained in:
parent
d83b2e5b0e
commit
52046de8ab
@ -37,7 +37,7 @@ public class PacketTimeUpdate extends PlayS2CPacket {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void log() {
|
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() {
|
public long getWorldAge() {
|
||||||
|
@ -18,13 +18,14 @@ import de.bixilon.minosoft.data.world.light.ChunkLightAccessor
|
|||||||
import de.bixilon.minosoft.data.world.light.LightAccessor
|
import de.bixilon.minosoft.data.world.light.LightAccessor
|
||||||
import de.bixilon.minosoft.protocol.protocol.PlayInByteBuffer
|
import de.bixilon.minosoft.protocol.protocol.PlayInByteBuffer
|
||||||
import de.bixilon.minosoft.protocol.protocol.ProtocolVersions
|
import de.bixilon.minosoft.protocol.protocol.ProtocolVersions
|
||||||
|
import de.bixilon.minosoft.protocol.protocol.ProtocolVersions.V_1_16
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
object LightUtil {
|
object LightUtil {
|
||||||
|
|
||||||
fun readLightPacket(buffer: PlayInByteBuffer, skyLightMask: BitSet, blockLightMask: BitSet, dimension: Dimension): LightAccessor {
|
fun readLightPacket(buffer: PlayInByteBuffer, skyLightMask: BitSet, blockLightMask: BitSet, dimension: Dimension): LightAccessor {
|
||||||
// ToDo
|
// ToDo
|
||||||
val skyLight = if (dimension.hasSkyLight) {
|
val skyLight = if (dimension.hasSkyLight || buffer.versionId > V_1_16) { // ToDo: find out version
|
||||||
readLightArray(buffer, skyLightMask, dimension)
|
readLightArray(buffer, skyLightMask, dimension)
|
||||||
} else {
|
} else {
|
||||||
mutableMapOf()
|
mutableMapOf()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user