summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Pioch <lukas@zgow.de>2017-08-03 13:43:54 +0200
committerLukas Pioch <lukas@zgow.de>2017-08-27 14:54:43 +0200
commitfd5eb01ec69875fdc9011fc665ab7b96417cc6d4 (patch)
tree99d08c2ed908d6649299d9c61548199e6d323a51
parentPass cBookContent as const, clear pages before setting them, corrected fnc name (diff)
downloadcuberite-fd5eb01ec69875fdc9011fc665ab7b96417cc6d4.tar
cuberite-fd5eb01ec69875fdc9011fc665ab7b96417cc6d4.tar.gz
cuberite-fd5eb01ec69875fdc9011fc665ab7b96417cc6d4.tar.bz2
cuberite-fd5eb01ec69875fdc9011fc665ab7b96417cc6d4.tar.lz
cuberite-fd5eb01ec69875fdc9011fc665ab7b96417cc6d4.tar.xz
cuberite-fd5eb01ec69875fdc9011fc665ab7b96417cc6d4.tar.zst
cuberite-fd5eb01ec69875fdc9011fc665ab7b96417cc6d4.zip
-rw-r--r--Server/Plugins/APIDump/APIDesc.lua2
-rw-r--r--src/WorldStorage/NBTChunkSerializer.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/Server/Plugins/APIDump/APIDesc.lua b/Server/Plugins/APIDump/APIDesc.lua
index 01bd5f42e..80f3d9161 100644
--- a/Server/Plugins/APIDump/APIDesc.lua
+++ b/Server/Plugins/APIDump/APIDesc.lua
@@ -6938,7 +6938,7 @@ These ItemGrids are available in the API and can be manipulated by the plugins,
{
m_BookContent =
{
- Type = "cBookContent",
+ Type = "{{cBookContent}}",
Notes = "If it's a written or a writeable book, it contains the information of the book: Author, title and pages",
},
m_CustomName =
diff --git a/src/WorldStorage/NBTChunkSerializer.cpp b/src/WorldStorage/NBTChunkSerializer.cpp
index d2356b71b..702439133 100644
--- a/src/WorldStorage/NBTChunkSerializer.cpp
+++ b/src/WorldStorage/NBTChunkSerializer.cpp
@@ -106,7 +106,8 @@ void cNBTChunkSerializer::AddItem(const cItem & a_Item, int a_Slot, const AStrin
// Write the tag compound (for enchantment, firework, custom name and repair cost):
if (
(!a_Item.m_Enchantments.IsEmpty()) ||
- ((a_Item.m_ItemType == E_ITEM_FIREWORK_ROCKET) || (a_Item.m_ItemType == E_ITEM_FIREWORK_STAR) || (a_Item.m_ItemType == E_ITEM_WRITTEN_BOOK)) || (a_Item.m_ItemType == E_ITEM_BOOK_AND_QUILL) ||
+ ((a_Item.m_ItemType == E_ITEM_FIREWORK_ROCKET) || (a_Item.m_ItemType == E_ITEM_FIREWORK_STAR) ||
+ (a_Item.m_ItemType == E_ITEM_WRITTEN_BOOK)) || (a_Item.m_ItemType == E_ITEM_BOOK_AND_QUILL) ||
(a_Item.m_RepairCost > 0) ||
(a_Item.m_CustomName != "") ||
(!a_Item.m_LoreTable.empty())