github.com/df-mc/dragonfly@v0.9.13/server/world/mcdb/leveldat/version.go (about)

     1  package leveldat
     2  
     3  import (
     4  	"github.com/sandertv/gophertunnel/minecraft/protocol"
     5  	"strconv"
     6  	"strings"
     7  )
     8  
     9  // Version is the current version stored in level.dat files.
    10  const Version = 10
    11  
    12  // minimumCompatibleClientVersion is the minimum compatible client version,
    13  // required by the latest Minecraft data provider.
    14  var minimumCompatibleClientVersion []int32
    15  
    16  // init initializes the minimum compatible client version.
    17  func init() {
    18  	fullVersion := append(strings.Split(protocol.CurrentVersion, "."), "0", "0")
    19  	for _, v := range fullVersion {
    20  		i, _ := strconv.Atoi(v)
    21  		minimumCompatibleClientVersion = append(minimumCompatibleClientVersion, int32(i))
    22  	}
    23  }