mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
refactor Content
This commit is contained in:
parent
f3c5afa1ab
commit
ee9f1639e9
25 changed files with 180 additions and 209 deletions
|
|
@ -22,7 +22,7 @@ bool ItemStack::accepts(const ItemStack& other) const {
|
|||
}
|
||||
|
||||
void ItemStack::move(ItemStack& item, const ContentIndices* indices) {
|
||||
auto def = indices->getItemDef(item.getItemId());
|
||||
auto def = indices->items.get(item.getItemId());
|
||||
int count = std::min(item.count, def->stackSize-this->count);
|
||||
if (isEmpty()) {
|
||||
set(ItemStack(item.getItemId(), count));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue