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

Method SetSlot

src/UI/Window.cpp:90–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88
89
90void cWindow::SetSlot(cPlayer & a_Player, int a_SlotNum, const cItem & a_Item)
91{
92 // Set the item to the specified slot for the specified player
93 int LocalSlotNum = 0;
94 cSlotArea * Area = GetSlotArea(a_SlotNum, LocalSlotNum);
95 if (Area == NULL)
96 {
97 LOGWARNING("%s: requesting write to an invalid SlotArea (SlotNum %d), ignoring.", __FUNCTION__, a_SlotNum);
98 return;
99 }
100 Area->SetSlot(LocalSlotNum, a_Player, a_Item);
101}
102
103
104

Callers 4

DistributeItemToSlotsMethod · 0.45
LoadItemGridFromNBTMethod · 0.45
LoadFurnaceFromNBTMethod · 0.45
LoadMinecartCFromNBTMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected