MCPcopy Create free account
hub / github.com/cuberite/cuberite / SetEquippedSlotNum

Method SetEquippedSlotNum

src/Inventory.cpp:319–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317
318
319void cInventory::SetEquippedSlotNum(int a_SlotNum)
320{
321 if ((a_SlotNum < 0) || (a_SlotNum >= invHotbarCount))
322 {
323 LOGWARNING("%s: requesting invalid slot index: %d out of %d. Setting 0 instead.", __FUNCTION__, a_SlotNum, invHotbarCount - 1);
324 m_EquippedSlotNum = 0;
325 }
326 else
327 {
328 m_EquippedSlotNum = a_SlotNum;
329 }
330}
331
332
333

Callers 1

HandleSlotSelectedMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected