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

Method SelectedItemSlot

server/player/state/playerEntity.go:92–101  ·  view source on GitHub ↗

if negative, returns 0 and if over 8, returns 8

()

Source from the content-addressed store, hash-verified

90
91// if negative, returns 0 and if over 8, returns 8
92func (p *PlayerEntity) SelectedItemSlot() int32 {
93 slot := p.selectedItemSlot.Load()
94 if slot < 0 {
95 slot = 0
96 }
97 if slot > 8 {
98 slot = 8
99 }
100 return slot
101}
102
103// if negative, set to 0 and if over 8, set to 8
104func (p *PlayerEntity) SetSelectedItemSlot(slot int32) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected