Update packetid.go
This commit is contained in:
@ -97,7 +97,7 @@ func pingAndList(addr string, conn *mcnet.Conn) ([]byte, time.Duration, error) {
|
||||
//PING
|
||||
startTime := time.Now()
|
||||
err = conn.WritePacket(pk.Marshal(
|
||||
packetid.StatusPing,
|
||||
packetid.StatusPingRequest,
|
||||
pk.Long(startTime.Unix()),
|
||||
))
|
||||
if err != nil {
|
||||
|
@ -19,13 +19,13 @@ const (
|
||||
// Status Clientbound
|
||||
const (
|
||||
StatusResponse = iota
|
||||
StatusPong
|
||||
StatusPongResponse
|
||||
)
|
||||
|
||||
// Game Serverbound
|
||||
// Status Serverbound
|
||||
const (
|
||||
StatusRequest = iota
|
||||
StatusPing
|
||||
StatusPingRequest
|
||||
)
|
||||
|
||||
// Game Clientbound
|
||||
@ -64,16 +64,16 @@ const (
|
||||
ClientboundHorseScreenOpen
|
||||
ClientboundInitializeBorder
|
||||
ClientboundKeepAlive
|
||||
ClientboundLevelChunk
|
||||
ClientboundLevelChunkWithLight
|
||||
ClientboundLevelEvent
|
||||
ClientboundLevelParticles
|
||||
ClientboundLightUpdate
|
||||
ClientboundLogin
|
||||
ClientboundMapItemData
|
||||
ClientboundMerchantOffers
|
||||
ClientboundEntityPosition
|
||||
ClientboundEntityPositionAndRotation
|
||||
ClientboundEntityRotation
|
||||
ClientboundMoveEntityPos
|
||||
ClientboundMoveEntityPosRot
|
||||
ClientboundMoveEntityRot
|
||||
ClientboundMoveVehicle
|
||||
ClientboundOpenBook
|
||||
ClientboundOpenScreen
|
||||
@ -117,7 +117,7 @@ const (
|
||||
ClientboundSetPassengers
|
||||
ClientboundSetPlayerTeam
|
||||
ClientboundSetScore
|
||||
ClientboundUpdateSimulationDistance
|
||||
ClientboundSetSimulationDistance
|
||||
ClientboundSetSubtitleText
|
||||
ClientboundSetTime
|
||||
ClientboundSetTitleText
|
||||
@ -139,6 +139,7 @@ const (
|
||||
// Game Serverbound
|
||||
const (
|
||||
ServerboundAcceptTeleportation = iota
|
||||
ServerboundBlockEntityTagQuery
|
||||
ServerboundChangeDifficulty
|
||||
ServerboundChat
|
||||
ServerboundClientCommand
|
||||
@ -149,10 +150,15 @@ const (
|
||||
ServerboundContainerClose
|
||||
ServerboundCustomPayload
|
||||
ServerboundEditBook
|
||||
ServerboundEntityTagQuery
|
||||
ServerboundInteract
|
||||
ServerboundJigsawGenerate
|
||||
ServerboundKeepAlive
|
||||
ServerboundLockDifficulty
|
||||
ServerboundMovePlayerPos
|
||||
ServerboundMovePlayerPosRot
|
||||
ServerboundMovePlayerRot
|
||||
ServerboundMovePlayerStatusOnly
|
||||
ServerboundMoveVehicle
|
||||
ServerboundPaddleBoat
|
||||
ServerboundPickItem
|
||||
|
@ -40,7 +40,7 @@ func (s *Server) acceptListPing(conn *net.Conn) {
|
||||
break
|
||||
}
|
||||
err = conn.WritePacket(pk.Marshal(0x00, pk.String(resp)))
|
||||
case packetid.StatusPong: //Ping
|
||||
case packetid.StatusPongResponse: //Ping
|
||||
err = conn.WritePacket(p)
|
||||
}
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user