mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-04-23 15:36:07 +00:00
Notably also adds some metadata files for NixOS * add support for linux clang cross compiles * add linux clang instructions * un-capitalize Mob.horse.* * update the description in flake.nix --------- Co-authored-by: Loki <lokirautio@gmail.com>
25 lines
763 B
C++
25 lines
763 B
C++
#include "stdafx.h"
|
|
#include "../../../Minecraft.World/Entity.h"
|
|
#include "../../../Minecraft.World/Level.h"
|
|
#include "../../../Minecraft.World/ItemInstance.h"
|
|
#include "UseItemTask.h"
|
|
|
|
UseItemTask::UseItemTask(const int itemId, Tutorial *tutorial, int descriptionId,
|
|
bool enablePreCompletion, vector<TutorialConstraint *> *inConstraints, bool bShowMinimumTime, bool bAllowFade, bool bTaskReminders)
|
|
: TutorialTask( tutorial, descriptionId, enablePreCompletion, inConstraints, bShowMinimumTime, bAllowFade, bTaskReminders ),
|
|
itemId( itemId )
|
|
{
|
|
}
|
|
|
|
bool UseItemTask::isCompleted()
|
|
{
|
|
return bIsCompleted;
|
|
}
|
|
|
|
void UseItemTask::useItem(shared_ptr<ItemInstance> item,bool bTestUseOnly)
|
|
{
|
|
if(bTestUseOnly) return;
|
|
|
|
if( item->id == itemId )
|
|
bIsCompleted = true;
|
|
} |