initial commit
This commit is contained in:
32
legacyver/proto/id.go
Normal file
32
legacyver/proto/id.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package proto
|
||||
|
||||
import "github.com/sandertv/gophertunnel/minecraft/protocol"
|
||||
|
||||
const (
|
||||
ID766 = 766
|
||||
ID748 = 748
|
||||
ID729 = 729
|
||||
ID712 = 712
|
||||
ID686 = 686
|
||||
ID685 = 685
|
||||
)
|
||||
|
||||
func IsProtoGTE(io protocol.IO, proto int32) bool {
|
||||
return io.(IO).ProtocolID() >= proto
|
||||
}
|
||||
|
||||
func IsProtoLTE(io protocol.IO, proto int32) bool {
|
||||
return io.(IO).ProtocolID() <= proto
|
||||
}
|
||||
|
||||
func IsProtoLT(io protocol.IO, proto int32) bool {
|
||||
return io.(IO).ProtocolID() < proto
|
||||
}
|
||||
|
||||
func IsProtoGT(io protocol.IO, proto int32) bool {
|
||||
return io.(IO).ProtocolID() > proto
|
||||
}
|
||||
|
||||
func FetchProtoID(io protocol.IO) int32 {
|
||||
return io.(IO).ProtocolID()
|
||||
}
|
||||
Reference in New Issue
Block a user