summaryrefslogtreecommitdiffstats
path: root/Server
diff options
context:
space:
mode:
authorLane Kolbly <lane@rscheme.org>2017-07-28 19:00:20 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2017-07-28 19:00:20 +0200
commit790e15f2e64badf62d9ba62421776c4ba0e771ed (patch)
treeb0e9c8a6100ae0b06847b7cbfaddf94586a4490e /Server
parentCheck for intersection between placed blocks and entities. (#3850) (diff)
downloadcuberite-790e15f2e64badf62d9ba62421776c4ba0e771ed.tar
cuberite-790e15f2e64badf62d9ba62421776c4ba0e771ed.tar.gz
cuberite-790e15f2e64badf62d9ba62421776c4ba0e771ed.tar.bz2
cuberite-790e15f2e64badf62d9ba62421776c4ba0e771ed.tar.lz
cuberite-790e15f2e64badf62d9ba62421776c4ba0e771ed.tar.xz
cuberite-790e15f2e64badf62d9ba62421776c4ba0e771ed.tar.zst
cuberite-790e15f2e64badf62d9ba62421776c4ba0e771ed.zip
Diffstat (limited to 'Server')
-rw-r--r--Server/Plugins/APIDump/APIDesc.lua64
1 files changed, 62 insertions, 2 deletions
diff --git a/Server/Plugins/APIDump/APIDesc.lua b/Server/Plugins/APIDump/APIDesc.lua
index 134a36d7b..9e920d429 100644
--- a/Server/Plugins/APIDump/APIDesc.lua
+++ b/Server/Plugins/APIDump/APIDesc.lua
@@ -2696,6 +2696,23 @@ local Hash = cCryptoHash.sha1HexString("DataToHash")
},
Notes = "Returns the level of the specified enchantment stored in this object; 0 if not stored",
},
+ CanAddEnchantment =
+ {
+ Params =
+ {
+ {
+ Name = "EnchantmentNumID",
+ Type = "number",
+ },
+ },
+ Returns =
+ {
+ {
+ Type = "boolean"
+ },
+ },
+ Notes = "Returns true if the specified enchantment is not mutually exclusive with any of the enchantments stored by the object.",
+ },
IsEmpty =
{
Returns =
@@ -6599,6 +6616,49 @@ These ItemGrids are available in the API and can be manipulated by the plugins,
},
Notes = "Adds the specified amount to the item count. Returns self (useful for chaining).",
},
+ AddEnchantment =
+ {
+ Params =
+ {
+ {
+ Name = "Enchantment ID",
+ Type = "number",
+ },
+ {
+ Name = "Level",
+ Type = "number",
+ },
+ {
+ Name = "FromBook",
+ Type = "boolean",
+ },
+ },
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Adds the given enchantment at the given level to this item, following anvil enchantment combining rules. Returns the XP level cost of the addition. FromBook specifies whether to use the XP multiplier for books or the multiplier used for other items, if true it uses the multiplier for books.",
+ },
+ AddEnchantmentsFromItem =
+ {
+ Params =
+ {
+ {
+ Name = "Additive",
+ Type = "cItem",
+ },
+ },
+ Returns =
+ {
+ {
+ Name = "LevelCost",
+ Type = "number",
+ },
+ },
+ Notes = "Adds the enchantments from the specified item to this item, returning the cost as if this were an anvil.",
+ },
Clear =
{
Notes = "Resets the instance to an empty item",
@@ -6803,7 +6863,7 @@ These ItemGrids are available in the API and can be manipulated by the plugins,
Type = "number",
},
{
- Name = "WithBook",
+ Name = "FromBook",
Type = "boolean",
},
},
@@ -6813,7 +6873,7 @@ These ItemGrids are available in the API and can be manipulated by the plugins,
Type = "boolean",
},
},
- Notes = "Returns true if the specified item type is enchantable. If WithBook is true, the function is used in the anvil inventory with book enchantments. So it checks the \"only book enchantments\" too. Example: You can only enchant a hoe with a book.",
+ Notes = "Returns true if the specified item type is enchantable. If FromBook is true, the function is used in the anvil inventory with book enchantments. So it checks the \"only book enchantments\" too. Example: You can only enchant a hoe with a book.",
},
IsEqual =
{