MCPcopy Create free account
hub / github.com/ZeppelinMC/Zeppelin / Encode

Method Encode

server/world/level/playerdata.go:208–228  ·  view source on GitHub ↗
(fovModifier float32)

Source from the content-addressed store, hash-verified

206}
207
208func (a PlayerAbilities) Encode(fovModifier float32) *play.PlayerAbilitiesClientbound {
209 var flags int8
210 if a.Invulnerable {
211 flags |= 0x01
212 }
213 if a.Flying {
214 flags |= 0x02
215 }
216 if a.MayFly {
217 flags |= 0x04
218 }
219 if a.Instabuild {
220 flags |= 0x08
221 }
222
223 return &play.PlayerAbilitiesClientbound{
224 Flags: flags,
225 FlyingSpeed: a.FlySpeed,
226 FOVModifier: fovModifier,
227 }
228}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected