the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 761 lines 21 kB view raw
1#pragma once 2 3using namespace std; 4 5#include "Container.h" 6#include "UseAnim.h" 7#include "Rarity.h" 8 9class MapItem; 10class Mob; 11class Player; 12class Random; 13class Level; 14class ShearsItem; 15class PotionItem; 16class HitResult; 17class IconRegister; 18class Icon; 19class ArmorItem; 20class BowItem; 21class FishingRodItem; 22class EnchantedBookItem; 23class EmptyMapItem; 24 25#define ITEM_ICON_COLUMNS 16 26 27 28class Item : public enable_shared_from_this<Item> 29{ 30protected: 31 //static const UUID BASE_ATTACK_DAMAGE_UUID; 32 33public: 34 static const int ITEM_NUM_COUNT = 32000; 35 36 static void staticCtor(); 37 static void staticInit(); 38 39 // 4J-PB - added for new crafting menu 40 enum 41 { 42 eMaterial_undefined=0, 43 eMaterial_wood, 44 eMaterial_stone, 45 eMaterial_iron, 46 eMaterial_gold, 47 eMaterial_diamond, 48 eMaterial_cloth, 49 eMaterial_chain, // 4J Stu - It's available in creative in 1.8 50 eMaterial_detector, 51 eMaterial_lapis, 52 eMaterial_music, 53 eMaterial_dye, 54 eMaterial_sand, 55 eMaterial_brick, 56 eMaterial_clay, 57 eMaterial_snow, 58 eMaterial_bow, 59 eMaterial_arrow, 60 eMaterial_compass, 61 eMaterial_clock, 62 eMaterial_map, 63 eMaterial_pumpkin, 64 eMaterial_glowstone, 65 eMaterial_water, 66 eMaterial_trap, 67 eMaterial_flintandsteel, 68 eMaterial_shears, 69 eMaterial_piston, 70 eMaterial_stickypiston, 71 eMaterial_gate, 72 eMaterial_stoneSmooth, 73 eMaterial_netherbrick, 74 eMaterial_ender, 75 eMaterial_glass, 76 eMaterial_blaze, 77 eMaterial_magic, 78 eMaterial_melon, 79 eMaterial_setfire, 80 eMaterial_sprucewood, 81 eMaterial_birchwood, 82 eMaterial_junglewood, 83 eMaterial_emerald, 84 eMaterial_quartz, 85 eMaterial_apple, 86 eMaterial_carrot, 87 eMaterial_redstone, 88 eMaterial_coal, 89 eMaterial_paper, 90 eMaterial_book, 91 eMaterial_bookshelf, 92 eMaterial_wheat, 93 94 } 95 eMaterial; 96 97 enum 98 { 99 eBaseItemType_undefined=0, 100 eBaseItemType_sword, 101 eBaseItemType_shovel, 102 eBaseItemType_pickaxe, 103 eBaseItemType_hatchet, 104 eBaseItemType_hoe, 105 eBaseItemType_door, 106 eBaseItemType_helmet, 107 eBaseItemType_chestplate, 108 eBaseItemType_leggings, 109 eBaseItemType_boots, 110 eBaseItemType_ingot, 111 eBaseItemType_rail, 112 eBaseItemType_block, 113 eBaseItemType_pressureplate, 114 eBaseItemType_stairs, 115 eBaseItemType_cloth, 116 eBaseItemType_dyepowder, 117 eBaseItemType_structwoodstuff, 118 eBaseItemType_structblock, 119 eBaseItemType_slab, 120 eBaseItemType_halfslab, 121 eBaseItemType_torch, 122 eBaseItemType_bow, 123 eBaseItemType_pockettool, 124 eBaseItemType_utensil, 125 eBaseItemType_piston, 126 eBaseItemType_devicetool, 127 eBaseItemType_fence, 128 eBaseItemType_device, 129 eBaseItemType_treasure, 130 eBaseItemType_seed, 131 eBaseItemType_HangingItem, 132 eBaseItemType_button, 133 eBaseItemType_chest, 134 eBaseItemType_rod, 135 eBaseItemType_giltFruit, 136 eBaseItemType_carpet, 137 eBaseItemType_clay, 138 eBaseItemType_glass, 139 eBaseItemType_redstoneContainer, 140 eBaseItemType_fireworks, 141 eBaseItemType_lever, 142 eBaseItemType_paper, 143 eBaseItemType_MAXTYPES, 144 } 145 eBaseItemType; 146 147protected: 148 static const int ICON_COLUMNS = ITEM_ICON_COLUMNS; 149 static wstring ICON_DESCRIPTION_PREFIX; // 4J Stu - Was const but we have to static initialise it outside of this class 150 151public: 152 153 class Tier 154 { 155 public: 156 static const Tier *WOOD; // 157 static const Tier *STONE; // 158 static const Tier *IRON; // 159 static const Tier *DIAMOND; // 160 static const Tier *GOLD; 161 162 private: 163 const int level; 164 const int uses; 165 const float speed; 166 const float damage; 167 const int enchantmentValue; 168 169 // 4J Stu - Had to make this public but was protected 170 // We shouldn't be creating these except the static initialisation 171 public: 172 Tier(int level, int uses, float speed, float damage, int enchantmentValue); 173 174 public: 175 int getUses() const; 176 float getSpeed() const; 177 float getAttackDamageBonus() const; 178 int getLevel() const; 179 int getEnchantmentValue() const; 180 int getTierItemId() const; 181 }; 182 183protected: 184 static Random *random; 185 186private: 187 static const int MAX_STACK_SIZE = Container::LARGE_MAX_STACK_SIZE; 188 189public: 190 static ItemArray items; 191 192 static Item *shovel_iron; 193 static Item *pickAxe_iron; 194 static Item *hatchet_iron; 195 static Item *flintAndSteel; 196 static Item *apple; 197 static BowItem *bow; 198 static Item *arrow; 199 static Item *coal; 200 static Item *diamond; 201 static Item *ironIngot; 202 static Item *goldIngot; 203 static Item *sword_iron; 204 205 static Item *sword_wood; 206 static Item *shovel_wood; 207 static Item *pickAxe_wood; 208 static Item *hatchet_wood; 209 210 static Item *sword_stone; 211 static Item *shovel_stone; 212 static Item *pickAxe_stone; 213 static Item *hatchet_stone; 214 215 static Item *sword_diamond; 216 static Item *shovel_diamond; 217 static Item *pickAxe_diamond; 218 static Item *hatchet_diamond; 219 220 static Item *stick; 221 static Item *bowl; 222 static Item *mushroomStew; 223 224 static Item *sword_gold; 225 static Item *shovel_gold; 226 static Item *pickAxe_gold; 227 static Item *hatchet_gold; 228 229 static Item *string; 230 static Item *feather; 231 static Item *gunpowder; 232 233 static Item *hoe_wood; 234 static Item *hoe_stone; 235 static Item *hoe_iron; 236 static Item *hoe_diamond; 237 static Item *hoe_gold; 238 239 static Item *seeds_wheat; 240 static Item *wheat; 241 static Item *bread; 242 243 static ArmorItem *helmet_leather; 244 static ArmorItem *chestplate_leather; 245 static ArmorItem *leggings_leather; 246 static ArmorItem *boots_leather; 247 248 static ArmorItem *helmet_chain; 249 static ArmorItem *chestplate_chain; 250 static ArmorItem *leggings_chain; 251 static ArmorItem *boots_chain; 252 253 static ArmorItem *helmet_iron; 254 static ArmorItem *chestplate_iron; 255 static ArmorItem *leggings_iron; 256 static ArmorItem *boots_iron; 257 258 static ArmorItem *helmet_diamond; 259 static ArmorItem *chestplate_diamond; 260 static ArmorItem *leggings_diamond; 261 static ArmorItem *boots_diamond; 262 263 static ArmorItem *helmet_gold; 264 static ArmorItem *chestplate_gold; 265 static ArmorItem *leggings_gold; 266 static ArmorItem *boots_gold; 267 268 static Item *flint; 269 static Item *porkChop_raw; 270 static Item *porkChop_cooked; 271 static Item *painting; 272 273 static Item *apple_gold; 274 275 static Item *sign; 276 static Item *door_wood; 277 278 static Item *bucket_empty; 279 static Item *bucket_water; 280 static Item *bucket_lava; 281 282 static Item *minecart; 283 static Item *saddle; 284 static Item *door_iron; 285 static Item *redStone; 286 static Item *snowBall; 287 288 static Item *boat; 289 290 static Item *leather; 291 static Item *bucket_milk; 292 static Item *brick; 293 static Item *clay; 294 static Item *reeds; 295 static Item *paper; 296 static Item *book; 297 static Item *slimeBall; 298 static Item *minecart_chest; 299 static Item *minecart_furnace; 300 static Item *egg; 301 static Item *compass; 302 static FishingRodItem *fishingRod; 303 static Item *clock; 304 static Item *yellowDust; 305 static Item *fish_raw; 306 static Item *fish_cooked; 307 308 static Item *dye_powder; 309 static Item *bone; 310 static Item *sugar; 311 static Item *cake; 312 313 static Item *bed; 314 315 static Item *repeater; 316 static Item *cookie; 317 318 static MapItem *map; 319 320 static ShearsItem *shears; 321 322 static Item *melon; 323 324 static Item *seeds_pumpkin; 325 static Item *seeds_melon; 326 327 static Item *beef_raw; 328 static Item *beef_cooked; 329 static Item *chicken_raw; 330 static Item *chicken_cooked; 331 static Item *rotten_flesh; 332 333 static Item *enderPearl; 334 335 static Item *blazeRod; 336 static Item *ghastTear; 337 static Item *goldNugget; 338 339 static Item *netherwart_seeds; 340 341 static PotionItem *potion; 342 static Item *glassBottle; 343 344 static Item *spiderEye; 345 static Item *fermentedSpiderEye; 346 347 static Item *blazePowder; 348 static Item *magmaCream; 349 350 static Item *brewingStand; 351 static Item *cauldron; 352 static Item *eyeOfEnder; 353 static Item *speckledMelon; 354 355 static Item *spawnEgg; 356 357 static Item *expBottle; 358 359 static Item *skull; 360 361 static Item *record_01; 362 static Item *record_02; 363 static Item *record_03; 364 static Item *record_04; 365 static Item *record_05; 366 static Item *record_06; 367 static Item *record_07; 368 static Item *record_08; 369 static Item *record_09; 370 static Item *record_10; 371 static Item *record_11; 372 static Item *record_12; 373 374 // TU9 375 static Item *fireball; 376 static Item *frame; 377 378 // TU14 379 //static Item writingBook; 380 //static Item writtenBook; 381 382 static Item *emerald; 383 384 static Item *flowerPot; 385 386 static Item *carrots; 387 static Item *potato; 388 static Item *potatoBaked; 389 static Item *potatoPoisonous; 390 391 static EmptyMapItem *emptyMap; 392 393 static Item *carrotGolden; 394 395 static Item *carrotOnAStick; 396 static Item *netherStar; 397 static Item *pumpkinPie; 398 399 static Item *fireworks; 400 static Item *fireworksCharge; 401 static Item *netherQuartz; 402 403 static Item *comparator; 404 static Item *netherbrick; 405 static EnchantedBookItem *enchantedBook; 406 static Item *minecart_tnt; 407 static Item *minecart_hopper; 408 409 static Item *horseArmorMetal; 410 static Item *horseArmorGold; 411 static Item *horseArmorDiamond; 412 static Item *lead; 413 static Item *nameTag; 414 415 416 static const int shovel_iron_Id = 256; 417 static const int pickAxe_iron_Id = 257; 418 static const int hatchet_iron_Id = 258; 419 static const int flintAndSteel_Id = 259; 420 static const int apple_Id = 260; 421 static const int bow_Id = 261; 422 static const int arrow_Id = 262; 423 static const int coal_Id = 263; 424 static const int diamond_Id = 264; 425 static const int ironIngot_Id = 265; 426 static const int goldIngot_Id = 266; 427 static const int sword_iron_Id = 267; 428 static const int sword_wood_Id = 268; 429 static const int shovel_wood_Id = 269; 430 static const int pickAxe_wood_Id = 270; 431 static const int hatchet_wood_Id = 271; 432 static const int sword_stone_Id = 272; 433 static const int shovel_stone_Id = 273; 434 static const int pickAxe_stone_Id = 274; 435 static const int hatchet_stone_Id = 275; 436 static const int sword_diamond_Id = 276; 437 static const int shovel_diamond_Id = 277; 438 static const int pickAxe_diamond_Id = 278; 439 static const int hatchet_diamond_Id = 279; 440 static const int stick_Id = 280; 441 static const int bowl_Id = 281; 442 static const int mushroomStew_Id = 282; 443 static const int sword_gold_Id = 283; 444 static const int shovel_gold_Id = 284; 445 static const int pickAxe_gold_Id = 285; 446 static const int hatchet_gold_Id = 286; 447 static const int string_Id = 287; 448 static const int feather_Id = 288; 449 static const int gunpowder_Id = 289; 450 static const int hoe_wood_Id = 290; 451 static const int hoe_stone_Id = 291; 452 static const int hoe_iron_Id = 292; 453 static const int hoe_diamond_Id = 293; 454 static const int hoe_gold_Id = 294; 455 static const int seeds_wheat_Id = 295; 456 static const int wheat_Id = 296; 457 static const int bread_Id = 297; 458 459 static const int helmet_leather_Id = 298; 460 static const int chestplate_leather_Id = 299; 461 static const int leggings_leather_Id = 300; 462 static const int boots_leather_Id = 301; 463 464 static const int helmet_chain_Id = 302; 465 static const int chestplate_chain_Id = 303; 466 static const int leggings_chain_Id = 304; 467 static const int boots_chain_Id = 305; 468 469 static const int helmet_iron_Id = 306; 470 static const int chestplate_iron_Id = 307; 471 static const int leggings_iron_Id = 308; 472 static const int boots_iron_Id = 309; 473 474 static const int helmet_diamond_Id = 310; 475 static const int chestplate_diamond_Id = 311; 476 static const int leggings_diamond_Id = 312; 477 static const int boots_diamond_Id = 313; 478 479 static const int helmet_gold_Id = 314; 480 static const int chestplate_gold_Id = 315; 481 static const int leggings_gold_Id = 316; 482 static const int boots_gold_Id = 317; 483 484 static const int flint_Id = 318; 485 static const int porkChop_raw_Id = 319; 486 static const int porkChop_cooked_Id = 320; 487 static const int painting_Id = 321; 488 static const int apple_gold_Id = 322; 489 static const int sign_Id = 323; 490 static const int door_wood_Id = 324; 491 static const int bucket_empty_Id = 325; 492 static const int bucket_water_Id = 326; 493 static const int bucket_lava_Id = 327; 494 static const int minecart_Id = 328; 495 static const int saddle_Id = 329; 496 static const int door_iron_Id = 330; 497 static const int redStone_Id = 331; 498 static const int snowBall_Id = 332; 499 static const int boat_Id = 333; 500 static const int leather_Id = 334; 501 static const int bucket_milk_Id = 335; 502 static const int brick_Id = 336; 503 static const int clay_Id = 337; 504 static const int reeds_Id = 338; 505 static const int paper_Id = 339; 506 static const int book_Id = 340; 507 static const int slimeBall_Id = 341; 508 static const int minecart_chest_Id = 342; 509 static const int minecart_furnace_Id = 343; 510 static const int egg_Id = 344; 511 static const int compass_Id = 345; 512 static const int fishingRod_Id = 346; 513 static const int clock_Id = 347; 514 static const int yellowDust_Id = 348; 515 static const int fish_raw_Id = 349; 516 static const int fish_cooked_Id = 350; 517 static const int dye_powder_Id = 351; 518 static const int bone_Id = 352; 519 static const int sugar_Id = 353; 520 static const int cake_Id = 354; 521 static const int bed_Id = 355; 522 static const int repeater_Id = 356; 523 static const int cookie_Id = 357; 524 static const int map_Id = 358; 525 526 // 1.7.3 527 static const int shears_Id = 359; 528 529 // 1.8.2 530 static const int melon_Id = 360; 531 static const int seeds_pumpkin_Id = 361; 532 static const int seeds_melon_Id = 362; 533 static const int beef_raw_Id = 363; 534 static const int beef_cooked_Id = 364; 535 static const int chicken_raw_Id = 365; 536 static const int chicken_cooked_Id = 366; 537 static const int rotten_flesh_Id = 367; 538 static const int enderPearl_Id = 368; 539 540 // 1.0.1 541 static const int blazeRod_Id = 369; 542 static const int ghastTear_Id = 370; 543 static const int goldNugget_Id = 371; 544 static const int netherwart_seeds_Id = 372; 545 static const int potion_Id = 373; 546 static const int glassBottle_Id = 374; 547 static const int spiderEye_Id = 375; 548 static const int fermentedSpiderEye_Id = 376; 549 static const int blazePowder_Id = 377; 550 static const int magmaCream_Id = 378; 551 static const int brewingStand_Id = 379; 552 static const int cauldron_Id = 380; 553 static const int eyeOfEnder_Id = 381; 554 static const int speckledMelon_Id = 382; 555 556 // 1.1 557 static const int spawnEgg_Id = 383; 558 559 static const int expBottle_Id = 384; 560 561 // TU 12 562 static const int skull_Id = 397; 563 564 static const int record_01_Id = 2256; 565 static const int record_02_Id = 2257; 566 static const int record_03_Id = 2258; 567 static const int record_04_Id = 2259; 568 static const int record_05_Id = 2260; 569 static const int record_06_Id = 2261; 570 static const int record_07_Id = 2262; 571 static const int record_09_Id = 2263; 572 static const int record_10_Id = 2264; 573 static const int record_11_Id = 2265; 574 static const int record_12_Id = 2266; 575 576 // 4J-PB - this one isn't playable in the PC game, but is fine in ours 577 static const int record_08_Id = 2267; 578 579 // TU9 580 static const int fireball_Id = 385; 581 static const int itemFrame_Id = 389; 582 583 // TU14 584 //static const int writingBook_Id = 130; 585 //static const int writtenBook_Id = 131; 586 587 static const int emerald_Id = 388; 588 589 static const int flowerPot_Id = 390; 590 591 static const int carrots_Id = 391; 592 static const int potato_Id = 392; 593 static const int potatoBaked_Id = 393; 594 static const int potatoPoisonous_Id = 394; 595 596 static const int emptyMap_Id = 395; 597 598 static const int carrotGolden_Id = 396; 599 600 static const int carrotOnAStick_Id = 398; 601 static const int netherStar_Id = 399; 602 static const int pumpkinPie_Id = 400; 603 604 static const int fireworks_Id = 401; 605 static const int fireworksCharge_Id = 402; 606 607 static const int enchantedBook_Id = 403; 608 609 static const int comparator_Id = 404; 610 static const int netherbrick_Id = 405; 611 static const int netherQuartz_Id = 406; 612 static const int minecart_tnt_Id = 407; 613 static const int minecart_hopper_Id = 408; 614 615 static const int horseArmorMetal_Id = 417; 616 static const int horseArmorGold_Id = 418; 617 static const int horseArmorDiamond_Id = 419; 618 static const int lead_Id = 420; 619 static const int nameTag_Id = 421; 620 621public: 622 const int id; 623 624protected: 625 int maxStackSize; 626 627private: 628 int maxDamage; 629 630protected: 631 Icon *icon; 632 // 4J-PB - added for new crafting menu 633 int m_iBaseItemType; 634 int m_iMaterial; 635 bool m_handEquipped; 636 bool m_isStackedByData; 637 638private: 639 Item *craftingRemainingItem; 640 wstring potionBrewingFormula; 641 642 // 4J Stu - A value from strings.h, that is the name of the item 643 unsigned int descriptionId; 644 645 // 4J Stu - A value from strings.h that says what this does 646 unsigned int useDescriptionId; 647 648 wstring m_textureName; 649 650protected: 651 Item(int id); 652 653public: 654 // 4J Using per-item textures now 655 Item *setIconName(const wstring &name); 656 wstring getIconName(); 657 Item *setMaxStackSize(int max); 658 Item *setBaseItemTypeAndMaterial(int iType,int iMaterial); 659 int getBaseItemType(); 660 int getMaterial(); 661 662 virtual int getIconType(); 663 virtual Icon *getIcon(int auxValue); 664 Icon *getIcon(shared_ptr<ItemInstance> itemInstance); 665 666 virtual bool useOn(shared_ptr<ItemInstance> itemInstance, shared_ptr<Player> player, Level *level, int x, int y, int z, int face, float clickX, float clickY, float clickZ, bool bTestUseOnOnly=false); 667 virtual float getDestroySpeed(shared_ptr<ItemInstance> itemInstance, Tile *tile); 668 virtual bool TestUse(shared_ptr<ItemInstance> itemInstance, Level *level, shared_ptr<Player> player); 669 virtual shared_ptr<ItemInstance> use(shared_ptr<ItemInstance> itemInstance, Level *level, shared_ptr<Player> player); 670 virtual shared_ptr<ItemInstance> useTimeDepleted(shared_ptr<ItemInstance> itemInstance, Level *level, shared_ptr<Player> player); 671 virtual int getMaxStackSize() const; 672 virtual int getLevelDataForAuxValue(int auxValue); 673 bool isStackedByData(); 674 675protected: 676 Item *setStackedByData(bool isStackedByData); 677 678public: 679 int getMaxDamage(); 680 681protected: 682 Item *setMaxDamage(int maxDamage); 683 684public: 685 bool canBeDepleted(); 686 687 /** 688 * Returns true when the item was used to deal more than default damage 689 * 690 * @param itemInstance 691 * @param mob 692 * @param attacker 693 * @return 694 */ 695 virtual bool hurtEnemy(shared_ptr<ItemInstance> itemInstance, shared_ptr<LivingEntity> mob, shared_ptr<LivingEntity> attacker); 696 697 /** 698 * Returns true when the item was used to mine more efficiently 699 * 700 * @param itemInstance 701 * @param tile 702 * @param x 703 * @param yf 704 * @param z 705 * @param owner 706 * @return 707 */ 708 virtual bool mineBlock(shared_ptr<ItemInstance> itemInstance, Level *level, int tile, int x, int y, int z, shared_ptr<LivingEntity> owner); 709 virtual int getAttackDamage(shared_ptr<Entity> entity); 710 virtual bool canDestroySpecial(Tile *tile); 711 virtual bool interactEnemy(shared_ptr<ItemInstance> itemInstance, shared_ptr<Player> player, shared_ptr<LivingEntity> mob); 712 Item *handEquipped(); 713 virtual bool isHandEquipped(); 714 virtual bool isMirroredArt(); 715 Item *setDescriptionId(unsigned int id); 716 LPCWSTR getDescription(); 717 LPCWSTR getDescription(shared_ptr<ItemInstance> instance); 718 virtual unsigned int getDescriptionId(int iData = -1); 719 virtual unsigned int getDescriptionId(shared_ptr<ItemInstance> instance); 720 Item *setUseDescriptionId(unsigned int id); 721 virtual unsigned int getUseDescriptionId(); 722 virtual unsigned int getUseDescriptionId(shared_ptr<ItemInstance> instance); 723 Item *setCraftingRemainingItem(Item *craftingRemainingItem); 724 virtual bool shouldMoveCraftingResultToInventory(shared_ptr<ItemInstance> instance); 725 virtual bool shouldOverrideMultiplayerNBT(); 726 Item *getCraftingRemainingItem(); 727 bool hasCraftingRemainingItem(); 728 std::wstring getName(); 729 virtual int getColor(shared_ptr<ItemInstance> item, int spriteLayer); 730 virtual void inventoryTick(shared_ptr<ItemInstance> itemInstance, Level *level, shared_ptr<Entity> owner, int slot, bool selected); 731 virtual void onCraftedBy(shared_ptr<ItemInstance> itemInstance, Level *level, shared_ptr<Player> player); 732 virtual bool isComplex(); 733 734 virtual UseAnim getUseAnimation(shared_ptr<ItemInstance> itemInstance); 735 virtual int getUseDuration(shared_ptr<ItemInstance> itemInstance); 736 virtual void releaseUsing(shared_ptr<ItemInstance> itemInstance, Level *level, shared_ptr<Player> player, int durationLeft); 737 738protected: 739 virtual Item *setPotionBrewingFormula(const wstring &potionBrewingFormula); 740 741public: 742 virtual wstring getPotionBrewingFormula(); 743 virtual bool hasPotionBrewingFormula(); 744 virtual void appendHoverText(shared_ptr<ItemInstance> itemInstance, shared_ptr<Player> player, vector<HtmlString> *lines, bool advanced); 745 virtual wstring getHoverName(shared_ptr<ItemInstance> itemInstance); 746 virtual bool isFoil(shared_ptr<ItemInstance> itemInstance); 747 virtual const Rarity *getRarity(shared_ptr<ItemInstance> itemInstance); 748 virtual bool isEnchantable(shared_ptr<ItemInstance> itemInstance); 749 750protected: 751 HitResult *getPlayerPOVHitResult(Level *level, shared_ptr<Player> player, bool alsoPickLiquid); 752 753public: 754 virtual int getEnchantmentValue(); 755 virtual bool hasMultipleSpriteLayers(); 756 virtual Icon *getLayerIcon(int auxValue, int spriteLayer); 757 virtual bool mayBePlacedInAdventureMode(); 758 virtual bool isValidRepairItem(shared_ptr<ItemInstance> source, shared_ptr<ItemInstance> repairItem); 759 virtual void registerIcons(IconRegister *iconRegister); 760 virtual attrAttrModMap *getDefaultAttributeModifiers(); 761};