mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-17 21:21:53 +00:00
refactor: flatten app/ and util/ directory structure
This commit is contained in:
18
targets/app/common/Tutorial/Tasks/PickupTask.cpp
Normal file
18
targets/app/common/Tutorial/Tasks/PickupTask.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "PickupTask.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "minecraft/world/item/ItemInstance.h"
|
||||
|
||||
void PickupTask::onTake(std::shared_ptr<ItemInstance> item,
|
||||
unsigned int invItemCountAnyAux,
|
||||
unsigned int invItemCountThisAux) {
|
||||
if (item->id == m_itemId) {
|
||||
if (m_auxValue == -1 && invItemCountAnyAux >= m_quantity) {
|
||||
bIsCompleted = true;
|
||||
} else if (m_auxValue == item->getAuxValue() &&
|
||||
invItemCountThisAux >= m_quantity) {
|
||||
bIsCompleted = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user