mirror of
https://git.stillkill.net/MinecraftLeak/MinecraftConsoles-141217.git
synced 2026-10-23 21:42:20 +01:00
Initial commit
This commit is contained in:
commit
2dfcaaa842
5375 files changed
+978475
No files matched your search
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include "Behavior.h"
|
||||
|
||||
class ItemInstance;
|
||||
class BlockSource;
|
||||
|
||||
class DispenseItemBehavior : public Behavior
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* The 'do nothing' behavior.
|
||||
*/
|
||||
static DispenseItemBehavior *NOOP;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param source The source of this call (the dispenser that calls it)
|
||||
* @param dispensed The ItemInstance which is being dispensed
|
||||
* @return The ItemInstance that should is 'left over'
|
||||
*/
|
||||
virtual shared_ptr<ItemInstance> dispense(BlockSource *source, shared_ptr<ItemInstance> dispensed) = 0;
|
||||
};
|
||||
|
||||
class NoOpDispenseItemBehavior : public DispenseItemBehavior
|
||||
{
|
||||
public:
|
||||
shared_ptr<ItemInstance> dispense(BlockSource *source, shared_ptr<ItemInstance> dispensed);
|
||||
};
|
||||
Reference in new issue
Block a user