mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-25 15:53:37 +00:00
14 lines
335 B
C++
14 lines
335 B
C++
#include "BookItem.h"
|
|
|
|
#include <memory>
|
|
|
|
#include "minecraft/world/item/Item.h"
|
|
#include "minecraft/world/item/ItemInstance.h"
|
|
|
|
BookItem::BookItem(int id) : Item(id) {}
|
|
|
|
bool BookItem::isEnchantable(std::shared_ptr<ItemInstance> itemInstance) {
|
|
return itemInstance->count == 1;
|
|
}
|
|
|
|
int BookItem::getEnchantmentValue() { return 1; } |