summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.h
diff options
context:
space:
mode:
authorTobias Wilken <TooAngel@TooAngel.de>2020-07-14 18:56:42 +0200
committerGitHub <noreply@github.com>2020-07-14 18:56:42 +0200
commit36eab1b3237dbeeaaf5b48808bf0d47eb4bd32e9 (patch)
tree04c224231a800002692a296131af4988dd465845 /src/Entities/Player.h
parentCustom command depend is automatic (diff)
downloadcuberite-36eab1b3237dbeeaaf5b48808bf0d47eb4bd32e9.tar
cuberite-36eab1b3237dbeeaaf5b48808bf0d47eb4bd32e9.tar.gz
cuberite-36eab1b3237dbeeaaf5b48808bf0d47eb4bd32e9.tar.bz2
cuberite-36eab1b3237dbeeaaf5b48808bf0d47eb4bd32e9.tar.lz
cuberite-36eab1b3237dbeeaaf5b48808bf0d47eb4bd32e9.tar.xz
cuberite-36eab1b3237dbeeaaf5b48808bf0d47eb4bd32e9.tar.zst
cuberite-36eab1b3237dbeeaaf5b48808bf0d47eb4bd32e9.zip
Diffstat (limited to 'src/Entities/Player.h')
-rw-r--r--src/Entities/Player.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Entities/Player.h b/src/Entities/Player.h
index 11d448b11..c52d6bbdc 100644
--- a/src/Entities/Player.h
+++ b/src/Entities/Player.h
@@ -600,6 +600,10 @@ public:
/** get player explosion exposure rate */
virtual float GetExplosionExposureRate(Vector3d a_ExplosionPosition, float a_ExlosionPower) override;
+ /** Adds an Item to the list of known items.
+ If the item is already known, does nothing. */
+ void AddKnownItem(const cItem & a_Item);
+
protected:
typedef std::vector<std::vector<AString> > AStringVectorVector;
@@ -753,6 +757,12 @@ protected:
/** The main hand of the player */
eMainHand m_MainHand;
+ /** List on known recipes as Ids */
+ std::set<UInt32> m_KnownRecipes;
+
+ /** List of known items as Ids */
+ std::set<cItem, cItem::sItemCompare> m_KnownItems;
+
virtual void DoMoveToWorld(const cEntity::sWorldChangeInfo & a_WorldChangeInfo) override;
/** Sets the speed and sends it to the client, so that they are forced to move so. */
@@ -795,4 +805,8 @@ private:
If he is not on ground it also gets divided by 5. */
float GetDigSpeed(BLOCKTYPE a_Block);
+ /** Add the recipe Id to the known recipes.
+ If the recipe is already known, does nothing. */
+ void AddKnownRecipe(UInt32 RecipeId);
+
} ; // tolua_export