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

Method SetSelectedItemSlot

server/player/state/playerEntity.go:104–112  ·  view source on GitHub ↗

if negative, set to 0 and if over 8, set to 8

(slot int32)

Source from the content-addressed store, hash-verified

102
103// if negative, set to 0 and if over 8, set to 8
104func (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
114func (p *PlayerEntity) sync() {
115 x, y, z := p.Position()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected