summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.h
diff options
context:
space:
mode:
authorKingCol13 <48412633+KingCol13@users.noreply.github.com>2020-10-01 23:33:32 +0200
committerGitHub <noreply@github.com>2020-10-01 23:33:32 +0200
commit8947147c25e2640519897bfdc8807e97ee291d70 (patch)
tree63eca1e5bd8ad29ac9beba5a780d466c9bb13849 /src/Entities/Player.h
parentAdd SetBlockMeta warning in documentation (#4943) (diff)
downloadcuberite-8947147c25e2640519897bfdc8807e97ee291d70.tar
cuberite-8947147c25e2640519897bfdc8807e97ee291d70.tar.gz
cuberite-8947147c25e2640519897bfdc8807e97ee291d70.tar.bz2
cuberite-8947147c25e2640519897bfdc8807e97ee291d70.tar.lz
cuberite-8947147c25e2640519897bfdc8807e97ee291d70.tar.xz
cuberite-8947147c25e2640519897bfdc8807e97ee291d70.tar.zst
cuberite-8947147c25e2640519897bfdc8807e97ee291d70.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Player.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Entities/Player.h b/src/Entities/Player.h
index ba219a84d..568929f44 100644
--- a/src/Entities/Player.h
+++ b/src/Entities/Player.h
@@ -263,6 +263,13 @@ public:
// tolua_end
+ /** Get a copy of the PRNG for enchanting related generation, don't use this for other purposes.
+ The PRNG's state is initialised with an internal seed, such that until PermuteEnchantmentSeed is called, this function returns the same PRNG. */
+ MTRand GetEnchantmentRandomProvider();
+
+ /** Permute the seed for enchanting related PRNGs, don't use this for other purposes. */
+ void PermuteEnchantmentSeed();
+
/** Returns the SharedPtr to client handle associated with the player. */
cClientHandlePtr GetClientHandlePtr(void) const { return m_ClientHandle; }
@@ -718,6 +725,7 @@ protected:
/** Player Xp level */
int m_LifetimeTotalXp;
int m_CurrentXp;
+ unsigned int m_EnchantmentSeed;
// flag saying we need to send a xp update to client
bool m_bDirtyExperience;