summaryrefslogtreecommitdiffstats
path: root/src/Enchantments.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-12-21 19:48:29 +0100
committerMattes D <github@xoft.cz>2014-12-21 19:48:29 +0100
commit9e9459a36735b768f647a4cb5013c2928464a6eb (patch)
tree1ce4f6138e5258f1c265411fc31cf0750403f7ae /src/Enchantments.h
parentFixed crash on restart (diff)
downloadcuberite-9e9459a36735b768f647a4cb5013c2928464a6eb.tar
cuberite-9e9459a36735b768f647a4cb5013c2928464a6eb.tar.gz
cuberite-9e9459a36735b768f647a4cb5013c2928464a6eb.tar.bz2
cuberite-9e9459a36735b768f647a4cb5013c2928464a6eb.tar.lz
cuberite-9e9459a36735b768f647a4cb5013c2928464a6eb.tar.xz
cuberite-9e9459a36735b768f647a4cb5013c2928464a6eb.tar.zst
cuberite-9e9459a36735b768f647a4cb5013c2928464a6eb.zip
Diffstat (limited to '')
-rw-r--r--src/Enchantments.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Enchantments.h b/src/Enchantments.h
index e4390a5f2..31226b5c2 100644
--- a/src/Enchantments.h
+++ b/src/Enchantments.h
@@ -128,8 +128,10 @@ public:
/** Gets random enchantment from Vector and returns it */
static cEnchantments GetRandomEnchantmentFromVector(cWeightedEnchantments & a_Enchantments);
- /** Returns an enchantment from a Vector using cNoise. Mostly used for generators.*/
- static cEnchantments GenerateEnchantmentFromVector(cWeightedEnchantments & a_Enchantments, int a_Seed);
+ /** Selects one enchantment from a Vector using cNoise. Mostly used for generators.
+ Uses the enchantments' weights for the random distribution.
+ If a_Enchantments is empty, returns an empty enchantment. */
+ static cEnchantments SelectEnchantmentFromVector(const cWeightedEnchantments & a_Enchantments, int a_Seed);
/** Returns true if a_Other doesn't contain exactly the same enchantments and levels */
bool operator !=(const cEnchantments & a_Other) const;