aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/EnchantedBookItem.h
diff options
context:
space:
mode:
authordaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
committerdaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
commitb691c43c44ff180d10e7d4a9afc83b98551ff586 (patch)
tree3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.World/EnchantedBookItem.h
parentdef8cb415354ac390b7e89052a50605285f1aca9 (diff)
Initial commit
Diffstat (limited to 'Minecraft.World/EnchantedBookItem.h')
-rw-r--r--Minecraft.World/EnchantedBookItem.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/Minecraft.World/EnchantedBookItem.h b/Minecraft.World/EnchantedBookItem.h
new file mode 100644
index 00000000..c67f208f
--- /dev/null
+++ b/Minecraft.World/EnchantedBookItem.h
@@ -0,0 +1,25 @@
+#pragma once
+
+#include "Item.h"
+
+class EnchantmentInstance;
+
+class EnchantedBookItem : public Item
+{
+public:
+ static const wstring TAG_STORED_ENCHANTMENTS;
+
+ EnchantedBookItem(int id);
+
+ bool isFoil(shared_ptr<ItemInstance> itemInstance);
+ bool isEnchantable(shared_ptr<ItemInstance> itemInstance);
+ const Rarity *getRarity(shared_ptr<ItemInstance> itemInstance);
+ ListTag<CompoundTag> *getEnchantments(shared_ptr<ItemInstance> item);
+ void appendHoverText(shared_ptr<ItemInstance> itemInstance, shared_ptr<Player> player, vector<wstring> *lines, bool advanced, vector<wstring> &unformattedStrings);
+ void addEnchantment(shared_ptr<ItemInstance> item, EnchantmentInstance *enchantment);
+ shared_ptr<ItemInstance> createForEnchantment(EnchantmentInstance *enchant);
+ void createForEnchantment(Enchantment *enchant, vector<shared_ptr<ItemInstance> > *items);
+ shared_ptr<ItemInstance> createForRandomLoot(Random *random);
+ WeighedTreasure *createForRandomTreasure(Random *random);
+ WeighedTreasure *createForRandomTreasure(Random *random, int minCount, int maxCount, int weight);
+}; \ No newline at end of file