Add support for protocol version 1.21.100 (#12)
This commit is contained in:
@@ -2,10 +2,11 @@ package internal
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/df-mc/worldupgrader/blockupgrader"
|
||||
"sort"
|
||||
"strings"
|
||||
"unsafe"
|
||||
|
||||
"github.com/df-mc/worldupgrader/blockupgrader"
|
||||
)
|
||||
|
||||
// StateHash is a struct that may be used as a map key for block states. It contains the name of the block state
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package chunk
|
||||
|
||||
import (
|
||||
"github.com/df-mc/dragonfly/server/block/cube"
|
||||
"sync"
|
||||
|
||||
"github.com/df-mc/dragonfly/server/block/cube"
|
||||
)
|
||||
|
||||
// Chunk is a segment in the world with a size of 16x16x256 blocks. A chunk contains multiple sub chunks
|
||||
|
||||
@@ -3,6 +3,7 @@ package chunk
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
|
||||
"github.com/df-mc/dragonfly/server/block/cube"
|
||||
)
|
||||
|
||||
|
||||
@@ -2,8 +2,9 @@ package chunk
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"github.com/df-mc/dragonfly/server/block/cube"
|
||||
"sync"
|
||||
|
||||
"github.com/df-mc/dragonfly/server/block/cube"
|
||||
)
|
||||
|
||||
// pool is used to pool byte buffers used for encoding chunks.
|
||||
|
||||
@@ -4,9 +4,10 @@ import (
|
||||
"bytes"
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"github.com/akmalfairuz/legacy-version/mapping"
|
||||
"strings"
|
||||
|
||||
"github.com/akmalfairuz/legacy-version/mapping"
|
||||
|
||||
"github.com/df-mc/dragonfly/server/block/cube"
|
||||
"github.com/df-mc/worldupgrader/blockupgrader"
|
||||
"github.com/sandertv/gophertunnel/minecraft/nbt"
|
||||
|
||||
@@ -4,12 +4,13 @@ import (
|
||||
"bytes"
|
||||
"embed"
|
||||
"encoding/json"
|
||||
"github.com/df-mc/worldupgrader/blockupgrader"
|
||||
"github.com/sandertv/gophertunnel/minecraft/nbt"
|
||||
"github.com/sandertv/gophertunnel/minecraft/protocol"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strconv"
|
||||
|
||||
"github.com/df-mc/worldupgrader/blockupgrader"
|
||||
"github.com/sandertv/gophertunnel/minecraft/nbt"
|
||||
"github.com/sandertv/gophertunnel/minecraft/protocol"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
13
internal/pool.go
Normal file
13
internal/pool.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package internal
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"sync"
|
||||
)
|
||||
|
||||
// BufferPool is a sync.Pool for buffers used to write compressed data to.
|
||||
var BufferPool = sync.Pool{
|
||||
New: func() any {
|
||||
return bytes.NewBuffer(make([]byte, 0, 256))
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user