better nbt error message & dimensioncodec decoder
This commit is contained in:
@ -39,8 +39,8 @@ func (w *World) onPlayerSpawn(pk.Packet) error {
|
||||
|
||||
func (w *World) handleLevelChunkWithLightPacket(packet pk.Packet) error {
|
||||
var pos level.ChunkPos
|
||||
|
||||
chunk := level.EmptyChunk(int(w.p.WorldInfo.Dimension.Element.Height / 16))
|
||||
currentDimType := w.p.WorldInfo.DimensionCodec.DimensionType.Find(w.p.DimensionType)
|
||||
chunk := level.EmptyChunk(int(currentDimType.Height) / 16)
|
||||
if err := packet.Scan(&pos, chunk); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user