(fovModifier float32)
| 206 | } |
| 207 | |
| 208 | func (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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected