if negative, set to 0 and if over 8, set to 8
(slot int32)
| 102 | |
| 103 | // if negative, set to 0 and if over 8, set to 8 |
| 104 | func (p *PlayerEntity) SetSelectedItemSlot(slot int32) { |
| 105 | if slot < 0 { |
| 106 | slot = 0 |
| 107 | } |
| 108 | if slot > 8 { |
| 109 | slot = 8 |
| 110 | } |
| 111 | p.selectedItemSlot.Store(slot) |
| 112 | } |
| 113 | |
| 114 | func (p *PlayerEntity) sync() { |
| 115 | x, y, z := p.Position() |
nothing calls this directly
no outgoing calls
no test coverage detected