Implement multiplayer persistence and vanilla lighting

This commit is contained in:
Master290 2026-07-21 09:21:44 +03:00
parent 8f7cacf9d9
commit cae06eb97e
47 changed files with 3784 additions and 465 deletions

View file

@ -31,11 +31,11 @@ const (
// Login, clientbound.
const (
LoginDisconnectID = 0x00
EncryptionRequest = 0x01
LoginSuccessID = 0x02
SetCompressionID = 0x03
LoginPluginReq = 0x04
LoginDisconnectID = 0x00
EncryptionRequest = 0x01
LoginSuccessID = 0x02
SetCompressionID = 0x03
LoginPluginReq = 0x04
CookieRequestLogin = 0x05
)
@ -53,12 +53,12 @@ const (
// Configuration, clientbound.
const (
ConfigCookieRequest = 0x00
ConfigCustomPayloadCB = 0x01
ConfigDisconnect = 0x02
ConfigFinishClientbound = 0x03
ConfigKeepAliveCB = 0x04
ConfigPing = 0x05
ConfigCookieRequest = 0x00
ConfigCustomPayloadCB = 0x01
ConfigDisconnect = 0x02
ConfigFinishClientbound = 0x03
ConfigKeepAliveCB = 0x04
ConfigPing = 0x05
ConfigRegistryData = 0x07
ConfigUpdateEnabledFeatures = 0x0c
ConfigUpdateTags = 0x0d
@ -74,42 +74,46 @@ const (
PlayDefaultSpawnPos = 0x61
PlayChunkCacheCenter = 0x5e
PlayLevelChunk = 0x2d
PlayForgetLevelChunk = 0x25
PlayAbilities = 0x40
PlaySetHeldSlot = 0x69
PlayDisconnect = 0x20
PlayBlockUpdate = 0x08
PlayBlockChangedAck = 0x04
PlaySystemChat = 0x79
PlayLightUpdate = 0x30
PlayPlayerInfoRemove = 0x45
PlayPlayerInfoUpdate = 0x46
// Entity packets
PlayAddEntity = 0x01
PlayTeleportEntity = 0x7D
PlayTeleportEntity = 0x7d
PlayMoveEntityPos = 0x35
PlayMoveEntityPosRot = 0x36
PlayMoveEntityRot = 0x38
PlaySetEntityMotion = 0x65
PlayRemoveEntities = 0x4D
PlayRemoveEntities = 0x4d
PlaySetEntityData = 0x63
PlaySetEquipment = 0x66
)
// Play, serverbound (protocol 775).
const (
PlayAcceptTeleport = 0x00
PlayKeepAliveServer = 0x1c
PlayClientTickEnd = 0x0d
PlayClientInformation = 0x0e
PlayCustomPayload = 0x16
PlayMovePos = 0x1e
PlayMovePosRot = 0x1f
PlayMoveRot = 0x20
PlayMoveStatusOnly = 0x21
PlayPlayerLoaded = 0x2c
PlayPlayerAction = 0x29
PlayUseItemOn = 0x42
PlaySetCreativeSlot = 0x38
PlaySetCarriedItem = 0x35
PlayChatMessage = 0x09
PlayAcceptTeleport = 0x00
PlayKeepAliveServer = 0x1c
PlayClientTickEnd = 0x0d
PlayClientInformation = 0x0e
PlayCustomPayload = 0x16
PlayMovePos = 0x1e
PlayMovePosRot = 0x1f
PlayMoveRot = 0x20
PlayMoveStatusOnly = 0x21
PlayPlayerLoaded = 0x2c
PlayPlayerAction = 0x29
PlayUseItemOn = 0x42
PlaySetCreativeSlot = 0x38
PlaySetCarriedItem = 0x35
PlayChatMessage = 0x09
)
// GameEvent sub-IDs carried by the clientbound game_event packet.