Don't mess with NBT when creating signed books

This commit is contained in:
Dylan K. Taylor 2019-07-16 17:59:39 +01:00
parent 73a847123b
commit 8f64d6b053

View File

@ -640,10 +640,11 @@ class InGamePacketHandler extends PacketHandler{
break;
case BookEditPacket::TYPE_SIGN_BOOK:
/** @var WrittenBook $newBook */
$newBook = VanillaItems::WRITTEN_BOOK()->setNamedTag($oldBook->getNamedTag());
$newBook->setAuthor($packet->author);
$newBook->setTitle($packet->title);
$newBook->setGeneration(WrittenBook::GENERATION_ORIGINAL);
$newBook = VanillaItems::WRITTEN_BOOK()
->setPages($oldBook->getPages())
->setAuthor($packet->author)
->setTitle($packet->title)
->setGeneration(WrittenBook::GENERATION_ORIGINAL);
break;
default:
return false;