diff --git a/data/data_symbols.csv b/data/data_symbols.csv index 0fe1d7e5..47ef71ed 100644 --- a/data/data_symbols.csv +++ b/data/data_symbols.csv @@ -1,3 +1,72 @@ +0x0000007100e05ce0,_ZN18GlideRingGenerator13sCornerCountsE +0x0000007100e05cec,_ZN18GlideRingGenerator6sRadiiE +0x0000007100e05cf8,_ZN18GlideRingGenerator16sStraightOffsetsE +0x0000007100e05d04,_ZN18GlideRingGenerator12sCornerRadiiE +0x0000007100e05d10,_ZN18GlideRingGenerator14sCornerOffsetsE +0x0000007100e05dc4,_ZN13ItemBootstrap21LEATHER_ARMOR_TEXTURESE +0x0000007100E05DCC,_ZN13ItemResolversL11ANVIL_NAMESE +0x0000007100E05DD8,_ZN13ItemResolversL17STAINEDCLAY_NAMESE +0x0000007100E05E18,_ZN13ItemResolversL10WOOL_NAMESE +0x0000007100E05E58,_ZN13ItemResolversL22STAINEDGLASSPANE_NAMESE +0x0000007100E05E98,_ZN13ItemResolversL12CARPET_NAMESE +0x0000007100E05ED8,_ZN13ItemResolversL18STAINEDGLASS_NAMESE +0x0000007100E05F18,_ZN13ItemResolversL14CONCRETE_NAMESE +0x0000007100E05F58,_ZN13ItemResolversL20CONCRETEPOWDER_NAMESE +0x0000007100e093d8,_ZN6Entity17sDegreesToRadiansE +0x0000007100E09484,_ZN13ItemResolvers9LOG_NAMESE +0x0000007101017008,_ZTV18AbsoptionMobEffect +0x000000710101AB00,_ZTV11Achievement +0x0000007101020350,_ZTV21AttackDamageMobEffect +0x0000007101021a60,_ZTV13BaseAttribute +0x0000007101026918,_ZTV9BlockItem +0x0000007101026af0,_ZTV16BlockPlanterItem +0x0000007101026f70,_ZTV19BlockStatePredicate +0x00000071010276e0,_ZTV8BoatItem +0x0000007101027d68,_ZTV8BookItem +0x0000007101028468,_ZTV10BottleItem +0x00000071010287e8,_ZTV12BowlFoodItem +0x0000007101029740,_ZTV10BucketItem +0x000000710102ace8,_ZTV18CarrotOnAStickItem +0x0000007101033f98,_ZTV9Attribute +0x00000071010342e0,_ZTV9PredicateIPK10BlockStateE +0x0000007101036FC0,_ZL10bannerKeys +0x0000007101041f40,_ZTV8DoorItem +0x0000007101043d48,_ZTV7EggItem +0x0000007101045150,_ZTV17EnchantedBookItem +0x0000007101047b78,_ZTV12EnderEyeItem +0x00000071010498d8,_ZTV14EnderpearlItem +0x0000007101055560,_ZTV20ExperienceBottleItem +0x0000007101058ea8,_ZTV13FireworksItem +0x000000710105a5f0,_ZTV17FlintAndSteelItem +0x000000710105c3c8,_ZTV8FoodItem +0x00000071010658c8,_ZTV17HangingEntityItem +0x0000007101066358,_ZTV20HealthBoostMobEffect +0x000000710106b2b0,_ZTV21InstantenousMobEffect +0x0000007101074038,_ZTV8LeadItem +0x0000007101074628,_ZTV13LeafBlockItem +0x0000007101077210,_ZTI12LivingEntity +0x000000710107b330,_ZTV14MilkBucketItem +0x0000007101081cc0,_ZTV27ModifiableAttributeInstance +0x00000071010841a8,_ZTV14MultiBlockItem +0x0000007101086408,_ZTV11NameTagItem +0x0000007101096008,_ZTV17AttributeInstance +0x000000710109c240,_ZTV15PistonBlockItem +0x000000710109f130,_ZTI6Player +0x00000071010a4818,_ZTV15RangedAttribute +0x00000071010a53a0,_ZTV16RedStoneDustItem +0x00000071010a8108,_ZTV10SaddleItem +0x00000071010a9ff0,_ZTV8SeedItem +0x00000071010ae858,_ZTV19ShulkerBoxBlockItem +0x00000071010af808,_ZTV8SignItem +0x00000071010b0978,_ZTV16SimpleFoiledItem +0x00000071010b92d8,_ZTV13SlabBlockItem +0x00000071010bb770,_ZTV12SnowballItem +0x00000071010bbd40,_ZTV8SnowItem +0x00000071010C2498,_ZTV4Stat +0x00000071010cba40,_ZTV15TintedBlockItem +0x00000071010d54b8,_ZTV18WaterLilyBlockItem +0x00000071010dafb0,_ZTV16WritableBookItem +0x00000071010db150,_ZTV15WrittenBookItem 0x0000007101781BBC,AABB__sThreadStorageCount 0x0000007101781BC0,AABB__sDefaultThreadStorage 0x0000007101781BE0,_ZN6Blocks8RegistryE @@ -14,6 +83,106 @@ 0x0000007101781C70,_ZN6Blocks4VINEE 0x0000007101781C78,_ZN6Blocks14BROWN_MUSHROOME 0x0000007101781C80,_ZN6Blocks12RED_MUSHROOME +0x0000007101781C88,_ZN12Achievements3ALLE +0x0000007101781C90,_ZN12Achievements14OPEN_INVENTORYE +0x0000007101781C98,_ZN12Achievements9MINE_WOODE +0x0000007101781CA0,_ZN12Achievements16BUILD_WORK_BENCHE +0x0000007101781CA8,_ZN12Achievements13BUILD_PICKAXEE +0x0000007101781CB0,_ZN12Achievements13BUILD_FURNACEE +0x0000007101781CB8,_ZN12Achievements12ACQUIRE_IRONE +0x0000007101781CC0,_ZN12Achievements9BUILD_HOEE +0x0000007101781CC8,_ZN12Achievements10MAKE_BREADE +0x0000007101781CD0,_ZN12Achievements9BAKE_CAKEE +0x0000007101781CD8,_ZN12Achievements20BUILD_BETTER_PICKAXEE +0x0000007101781CE0,_ZN12Achievements9COOK_FISHE +0x0000007101781CE8,_ZN12Achievements8ON_ARAILE +0x0000007101781CF0,_ZN12Achievements11BUILD_SWORDE +0x0000007101781CF8,_ZN12Achievements10KILL_ENEMYE +0x0000007101781D00,_ZN12Achievements8KILL_COWE +0x0000007101781D08,_ZN12Achievements7FLY_PIGE +0x0000007101781D10,_ZN12Achievements14SNIPE_SKELETONE +0x0000007101781D18,_ZN12Achievements8DIAMONDSE +0x0000007101781D20,_ZN12Achievements5GHASTE +0x0000007101781D28,_ZN12Achievements9BLAZE_RODE +0x0000007101781D30,_ZN12Achievements6POTIONE +0x0000007101781D38,_ZN12Achievements7THE_ENDE +0x0000007101781D40,_ZN12Achievements8THE_END2E +0x0000007101781D48,_ZN12Achievements12ENCHANTMENTSE +0x0000007101781D50,_ZN12Achievements18LEADER_OF_THE_PACKE +0x0000007101781D58,_ZN12Achievements9MOARTOOLSE +0x0000007101781D60,_ZN12Achievements18DISPENSE_WITH_THISE +0x0000007101781D68,_ZN12Achievements16IN_TO_THE_NETHERE +0x0000007101781D70,_ZN12Achievements11SOCIAL_POSTE +0x0000007101781D78,_ZN12Achievements13EAT_PORK_CHOPE +0x0000007101781D80,_ZN12Achievements12PLAY100_DAYSE +0x0000007101781D88,_ZN12Achievements18ARROW_KILL_CREEPERE +0x0000007101781D90,_ZN12Achievements14MINE100_BLOCKSE +0x0000007101781D98,_ZN12Achievements15KILL10_CREEPERSE +0x0000007101781DA0,_ZN12Achievements8OVERKILLE +0x0000007101781DA8,_ZN12Achievements8BOOKCASEE +0x0000007101781DB0,_ZN12Achievements16ADVENTURING_TIMEE +0x0000007101781DB8,_ZN12Achievements12REPOPULATIONE +0x0000007101781DC0,_ZN12Achievements15DIAMONDS_TO_YOUE +0x0000007101781DC8,_ZN12Achievements11THE_HAGGLERE +0x0000007101781DD0,_ZN12Achievements11POT_PLANTERE +0x0000007101781DD8,_ZN12Achievements9ITS_ASIGNE +0x0000007101781DE0,_ZN12Achievements10IRON_BELLYE +0x0000007101781DE8,_ZN12Achievements18HAVE_ASHEARFUL_DAYE +0x0000007101781DF0,_ZN12Achievements18RAINBOW_COLLECTIONE +0x0000007101781DF8,_ZN12Achievements14STAYING_FROSTYE +0x0000007101781E00,_ZN12Achievements23CHESTFUL_OF_COBBLESTONEE +0x0000007101781E08,_ZN12Achievements16RENEWABLE_ENERGYE +0x0000007101781E10,_ZN12Achievements16MUSIC_TO_MY_EARSE +0x0000007101781E18,_ZN12Achievements10BODY_GUARDE +0x0000007101781E20,_ZN12Achievements8IRON_MANE +0x0000007101781E28,_ZN12Achievements13ZOMBIE_DOCTORE +0x0000007101781E30,_ZN12Achievements10LION_TAMERE +0x0000007101781E38,_ZN12Achievements18REPOPULATION_ALIASE +0x0000007101781E40,_ZN12Achievements12SPAWN_WITHERE +0x0000007101781E48,_ZN12Achievements11KILL_WITHERE +0x0000007101781E50,_ZN12Achievements11FULL_BEACONE +0x0000007101781E58,_ZN12Achievements22ADVENTURING_TIME_ALIASE +0x0000007101781E60,_ZN12Achievements11OVERPOWEREDE +0x0000007101781E68,_ZN12Achievements14THE_DYE_OUTFITE +0x0000007101781E70,_ZN12Achievements10TRAMPOLINEE +0x0000007101781E78,_ZN12Achievements11THE_STUDENTE +0x0000007101781E80,_ZN12Achievements21HAS_BECOME_THE_MASTERE +0x0000007101781E88,_ZN12Achievements16TIS_BUT_ASCRATCHE +0x0000007101781E90,_ZN12Achievements5CUPIDE +0x0000007101781E98,_ZN12Achievements31YOU_WONT_LIKE_ME_WHEN_IM_HUNGRYE +0x0000007101781EA0,_ZN12Achievements4MINEE +0x0000007101781EA8,_ZN12Achievements13THE_END_AGAINE +0x0000007101781EB0,_ZN12Achievements14YOU_NEED_AMINTE +0x0000007101781EB8,_ZN12Achievements11SUPER_SONICE +0x0000007101781EC0,_ZN12Achievements9DRY_SPELLE +0x0000007101781EC8,_ZN12Achievements10FREE_DIVERE +0x0000007101781ED0,_ZN12Achievements10SUPER_FUELE +0x0000007101781ED8,_ZN12Achievements9SADDLE_UPE +0x0000007101781EE0,_ZN12Achievements26TASTE_OF_YOUR_OWN_MEDICINEE +0x0000007101781EE8,_ZN12Achievements10BEAM_ME_UPE +0x0000007101781EF0,_ZN12Achievements8MAP_ROOME +0x0000007101781EF8,_ZN12Achievements10CAMOUFLAGEE +0x0000007101781F00,_ZN12Achievements18BACK_FROM_THE_DEADE +0x0000007101781F08,_ZN12Achievements16EQUIP_YOUR_FISTSE +0x0000007101781F10,_ZN12Achievements14TENACIOUS_BALLE +0x0000007101781F18,_ZN12Achievements8DEADSHOTE +0x0000007101781F20,_ZN12Achievements17SUCK_MY_SNOWBALLSE +0x0000007101781F28,_ZN12Achievements12MOUNTAIN_TOPE +0x0000007101781F30,_ZN12Achievements18WILL_LIKE_NO_OTHERE +0x0000007101781F38,_ZN12Achievements12THE_DEEP_ENDE +0x0000007101781F40,_ZN12Achievements23GREAT_VIEW_FROM_UP_HEREE +0x0000007101781F48,_ZN12Achievements16CHANGE_OF_SHEETSE +0x0000007101781F50,_ZN12Achievements14CHEATING_DEATHE +0x0000007101781F58,_ZN12Achievements25SO_IGOT_THAT_GOING_FOR_MEE +0x0000007101781F60,_ZN12Achievements9LET_IT_GOE +0x0000007101781F68,_ZN12Achievements11FEELING_ILLE +0x0000007101781F70,_ZN12Achievements13RABBIT_SEASONE +0x0000007101781F78,_ZN12Achievements21ORGANIZATIONAL_WIZARDE +0x0000007101781F80,_ZN12Achievements6GLIDERE +0x0000007101781F88,_ZN12Achievements5PILOTE +0x0000007101781F90,_ZN12Achievements8GO_GREENE +0x0000007101781F98,_ZN12Achievements9GO_YELLOWE +0x0000007101781FA0,_ZN12Achievements7GO_BLUEE 0x0000007101781FA8,_ZN6Blocks14CRAFTING_TABLEE 0x0000007101781FB0,_ZN6Blocks7FURNACEE 0x0000007101781FB8,_ZN6Blocks4RAILE @@ -23,6 +192,11 @@ 0x0000007101781FD8,_ZN5Biome10DEEP_OCEANE 0x0000007101781FE0,_ZN5Biome15MUSHROOM_ISLANDE 0x0000007101782068,_ZN6Blocks5ANVILE +0x00000071017820b8,_ZN9ArmorItem13ArmorMaterial7LEATHERE +0x0000007101782128,_ZN9ArmorItem13ArmorMaterial5CHAINE +0x0000007101782130,_ZN9ArmorItem13ArmorMaterial4IRONE +0x0000007101782138,_ZN9ArmorItem13ArmorMaterial4GOLDE +0x0000007101782140,_ZN9ArmorItem13ArmorMaterial7DIAMONDE 0x00000071017825B8,_ZN6Blocks6PLANKSE 0x00000071017825D0,_ZN6Blocks3AIRE 0x00000071017825D8,_ZN6Blocks3WEBE @@ -30,8 +204,48 @@ 0x0000007101782600,_ZN6Blocks6LADDERE 0x0000007101782608,_ZN6Blocks13WOODEN_BUTTONE 0x0000007101782610,_ZN6Blocks21WOODEN_PRESSURE_PLATEE +0x00000071017826C8,_ZN13BannerPattern4BASEE 0x00000071017826D0,_ZN6Blocks15STANDING_BANNERE 0x00000071017826D8,_ZN6Blocks11WALL_BANNERE +0x00000071017826E0,_ZN13BannerPattern6VALUESE +0x00000071017826F8,_ZN13BannerPattern18SQUARE_BOTTOM_LEFTE +0x0000007101782700,_ZN13BannerPattern19SQUARE_BOTTOM_RIGHTE +0x0000007101782708,_ZN13BannerPattern15SQUARE_TOP_LEFTE +0x0000007101782710,_ZN13BannerPattern16SQUARE_TOP_RIGHTE +0x0000007101782718,_ZN13BannerPattern13STRIPE_BOTTOME +0x0000007101782720,_ZN13BannerPattern10STRIPE_TOPE +0x0000007101782728,_ZN13BannerPattern11STRIPE_LEFTE +0x0000007101782730,_ZN13BannerPattern12STRIPE_RIGHTE +0x0000007101782738,_ZN13BannerPattern13STRIPE_CENTERE +0x0000007101782740,_ZN13BannerPattern13STRIPE_MIDDLEE +0x0000007101782748,_ZN13BannerPattern16STRIPE_DOWNRIGHTE +0x0000007101782750,_ZN13BannerPattern15STRIPE_DOWNLEFTE +0x0000007101782758,_ZN13BannerPattern13SMALL_STRIPESE +0x0000007101782760,_ZN13BannerPattern5CROSSE +0x0000007101782768,_ZN13BannerPattern14STRAIGHT_CROSSE +0x0000007101782770,_ZN13BannerPattern15TRIANGLE_BOTTOME +0x0000007101782778,_ZN13BannerPattern12TRIANGLE_TOPE +0x0000007101782780,_ZN13BannerPattern16TRIANGLES_BOTTOME +0x0000007101782788,_ZN13BannerPattern13TRIANGLES_TOPE +0x0000007101782790,_ZN13BannerPattern13DIAGONAL_LEFTE +0x0000007101782798,_ZN13BannerPattern14DIAGONAL_RIGHTE +0x00000071017827A0,_ZN13BannerPattern20DIAGONAL_LEFT_MIRRORE +0x00000071017827A8,_ZN13BannerPattern21DIAGONAL_RIGHT_MIRRORE +0x00000071017827B0,_ZN13BannerPattern6CIRCLEE +0x00000071017827B8,_ZN13BannerPattern7RHOMBUSE +0x00000071017827C0,_ZN13BannerPattern13HALF_VERTICALE +0x00000071017827C8,_ZN13BannerPattern15HALF_HORIZONTALE +0x00000071017827D0,_ZN13BannerPattern20HALF_VERTICAL_MIRRORE +0x00000071017827D8,_ZN13BannerPattern22HALF_HORIZONTAL_MIRRORE +0x00000071017827E0,_ZN13BannerPattern6BORDERE +0x00000071017827E8,_ZN13BannerPattern12CURLY_BORDERE +0x00000071017827F0,_ZN13BannerPattern7CREEPERE +0x00000071017827F8,_ZN13BannerPattern8GRADIENTE +0x0000007101782800,_ZN13BannerPattern11GRADIENT_UPE +0x0000007101782808,_ZN13BannerPattern6BRICKSE +0x0000007101782810,_ZN13BannerPattern5SKULLE +0x0000007101782818,_ZN13BannerPattern6FLOWERE +0x0000007101782820,_ZN13BannerPattern6MOJANGE 0x0000007101782828,_ZN6Blocks11BRICK_BLOCKE 0x0000007101782830,_ZN6Blocks10RED_FLOWERE 0x0000007101782848,_ZN6Blocks4WOOLE @@ -365,7 +579,11 @@ 0x0000007101788EE8,_ZN9Direction4WESTE 0x0000007101788F50,sWeaponCategory 0x0000007101788F90,_ZN12DamageSource5DROWNE +0x0000007101788F98,_ZN12DamageSource6STARVEE +0x0000007101788fb8,_ZN12DamageSource5MAGICE 0x0000007101788FC8,_ZN12DamageSource6WITHERE +0x0000007101788ff8,_ZN12DamageSource6POISONE +0x0000007101789000,_ZN12DamageSource13INSTANT_MAGICE 0x0000007101789028,_ZN9Direction4Axis1YE 0x0000007101789050,_ZN10Difficulty8PEACEFULE 0x0000007101789058,_ZN10Difficulty4EASYE @@ -383,6 +601,7 @@ 0x0000007101789158,_ZN9Direction4Axis1ZE 0x0000007101789160,_ZN9Direction4Axis1XE 0x0000007101789190,_ZN9Direction4Axis6VALUESE +0x0000007101789610,_ZN16DoublePlantBlock7Variant8VARIANTSE 0x00000071017899A8,sEnchantmentRegistry 0x0000007101789A38,_ZN12Enchantments9KNOCKBACKE 0x0000007101789A40,_ZN12Enchantments11FIRE_ASPECTE @@ -426,6 +645,9 @@ 0x000000710178A378,_ZN21EntityDataSerializers40sOPTIONAL_BLOCK_POS_EntityDataSerializerE 0x000000710178A380,_ZN21EntityDataSerializers31sDIRECTION_EntityDataSerializerE 0x000000710178A388,_ZN21EntityDataSerializers34sCOMPOUND_TAG_EntityDataSerializerE +0x000000710178a3b8,_ZN8EntityIO10SPAWN_EGGSE +0x000000710178a3e0,_ZN8EntityIO12DEFAULT_TYPEE +0x000000710178a550,_ZN8EntityIO11KNOWN_TYPESE 0x000000710178A5F0,_ZN13EquipmentSlot8MAINHANDE 0x000000710178A5F8,_ZN13EquipmentSlot7OFFHANDE 0x000000710178A600,_ZN13EquipmentSlot4FEETE @@ -457,6 +679,7 @@ 0x000000710178AA48,_ZN11FlowerBlock6Flower10RED_FLOWERE 0x000000710178AA50,_ZN11FlowerBlock6Flower13YELLOW_FLOWERE 0x000000710178AAA8,FlowerBlock::FlowerCategory::YELLOW_FLOWER +0x000000710178AAF8,_ZN11FlowerBlock6Flower11OXEYE_DAISYE 0x000000710178AC28,_ZN5Items10FLOWER_POTE 0x000000710178ACE8,_ZN5Items12ROTTEN_FLESHE 0x000000710178ACF0,_ZN5Items12GOLDEN_APPLEE @@ -490,6 +713,7 @@ 0x000000710178AE18,_ZN5Items11LAVA_BUCKETE 0x000000710178AE20,_ZN5Items6BUCKETE 0x000000710178AE28,_ZN5Items12WATER_BUCKETE +0x000000710178ae30,_ZN4Item4Tier4WOODE 0x000000710178AE38,_ZN5Items5STICKE 0x000000710178AE40,_ZN5Items3BOWE 0x000000710178AE48,_ZN5Items4SIGNE @@ -547,6 +771,7 @@ 0x000000710178AFF0,_ZN8GameType9SPECTATORE 0x000000710178AFF8,_ZN8GameType5LOBBYE 0x000000710178B000,_ZN11CommonStats9sInstanceE +0x000000710178b058,_ZN18GlideRingGenerator6sIconsE 0x000000710178B090,_ZN5Items5FLINTE 0x000000710178B0F0,_ZN5Items8PAINTINGE 0x000000710178B0F8,_ZN5Items10ITEM_FRAMEE @@ -555,6 +780,7 @@ 0x000000710178B3D0,_ZN5Items9SPAWN_EGGE 0x000000710178B3D8,_ZN5Items6SADDLEE 0x000000710178B3E0,sBaseTierName +0x000000710178b3f8,sBaseTierName 0x000000710178B410,sColorTagName 0x000000710178B440,_ZN5Items19LEATHER_HORSE_ARMORE 0x000000710178B448,_ZN5Items19DIAMOND_HORSE_ARMORE @@ -566,6 +792,10 @@ 0x000000710178B6F0,_ZN5Items12TIPPED_ARROWE 0x000000710178B6F8,_ZN5Items16TOTEM_OF_UNDYINGE 0x000000710178B700,_ZN5Items8RegistryE +0x000000710178b830,_ZN4Item4Tier5STONEE +0x000000710178b838,_ZN4Item4Tier4IRONE +0x000000710178b840,_ZN4Item4Tier7DIAMONDE +0x000000710178b848,_ZN4Item4Tier4GOLDE 0x000000710178B850,_ZN5Items3AIRE 0x000000710178B860,_ZN5Items11NETHER_STARE 0x000000710178B890,_ZN5Items14WOODEN_PICKAXEE @@ -684,14 +914,26 @@ 0x000000710178C278,_ZN9LevelType10NORMAL_1_1E 0x000000710178C3C0,_ZN8Material3ICEE 0x000000710178C3E0,_ZN13ParticleTypes11LARGE_SMOKEE +0x000000710178c528,_ZN10MobEffects15WATER_BREATHINGE +0x000000710178c550,_ZN10MobEffects12INVISIBILITYE +0x000000710178c558,_ZN10MobEffects8WEAKNESSE +0x000000710178c560,_ZN10MobEffects12REGENERATIONE +0x000000710178c568,_ZN10MobEffects6POISONE +0x000000710178c570,_ZN10MobEffects15FIRE_RESISTANCEE +0x000000710178c578,_ZN10MobEffects10ABSORPTIONE +0x000000710178c588,_ZN10MobEffects10JUMP_BOOSTE +0x000000710178c590,_ZN10MobEffects10RESISTANCEE +0x000000710178c598,_ZN10MobEffects5HASTEE +0x000000710178c5a0,_ZN10MobEffects14MINING_FATIGUEE 0x000000710178C5A8,_ZN10MobEffects10LEVITATIONE +0x000000710178c5b0,_ZN10MobEffects7GLOWINGE 0x000000710178C600,_ZN8LogBlock12LOG_VARIANTSE 0x000000710178C690,_ZN8LogBlock8LOG_AXISE -0x000000710178C698,_ZN8LogBlock7LogAxis1XE -0x000000710178C6A0,_ZN8LogBlock7LogAxis1YE -0x000000710178C6A8,_ZN8LogBlock7LogAxis1ZE 0x000000710178C6B8,_ZN8LogBlock9PREDICATEE 0x000000710178C6C0,_ZN8Material4WOODE +0x000000710178c6c8,_ZN8LogBlock7LogAxis1ZE +0x000000710178c6d0,_ZN8LogBlock7LogAxis1XE +0x000000710178c6d8,_ZN8LogBlock7LogAxis1YE 0x000000710178C6E0,_ZN8LogBlock7LogAxis4NONEE 0x000000710178C780,_ZN8Material5STONEE 0x000000710178C788,_ZN13MaterialColor6NETHERE @@ -803,6 +1045,14 @@ 0x000000710178CAE8,_ZN13MaterialColor16TERRACOTTA_GREENE 0x000000710178CAF0,_ZN13MaterialColor14TERRACOTTA_REDE 0x000000710178CAF8,_ZN13MaterialColor16TERRACOTTA_BLACKE +0x000000710178cbc8,_ZN12MinecartType5NAMESE +0x000000710178cc70,_ZN12MinecartType8RIDEABLEE +0x000000710178cc78,_ZN12MinecartType5CHESTE +0x000000710178cc80,_ZN12MinecartType7FURNACEE +0x000000710178cc88,_ZN12MinecartType3TNTE +0x000000710178cc90,_ZN12MinecartType7SPAWNERE +0x000000710178cc98,_ZN12MinecartType6HOPPERE +0x000000710178cca0,_ZN12MinecartType13COMMAND_BLOCKE 0x000000710178CD28,_ZN13ParticleTypes5SMOKEE 0x000000710178CD68,_ZN11MobCategory7MONSTERE 0x000000710178CD70,_ZN11MobCategory8CREATUREE @@ -814,7 +1064,22 @@ 0x000000710178CDA0,_ZN11MobCategory5SLIMEE 0x000000710178CDA8,_ZN11MobCategory8GUARDIANE 0x000000710178CDB0,_ZN11MobCategory10CATEGORIESE +0x000000710178cdc0,_ZN9MobEffect8REGISTRYE +0x000000710178cdc8,_ZN9MobEffect12EFFECT_COUNTE 0x000000710178CDD0,_ZN10MobEffects6WITHERE +0x000000710178cdd8,_ZN10MobEffects6HUNGERE +0x000000710178cde0,_ZN10MobEffects10SATURATIONE +0x000000710178cde8,_ZN10MobEffects14INSTANT_HEALTHE +0x000000710178cdf0,_ZN10MobEffects14INSTANT_DAMAGEE +0x000000710178cdf8,_ZN10MobEffects5SPEEDE +0x000000710178ce00,_ZN10MobEffects8SLOWNESSE +0x000000710178ce08,_ZN10MobEffects8STRENGTHE +0x000000710178ce10,_ZN10MobEffects6NAUSEAE +0x000000710178ce18,_ZN10MobEffects9BLINDNESSE +0x000000710178ce20,_ZN10MobEffects12NIGHT_VISIONE +0x000000710178ce28,_ZN10MobEffects12HEALTH_BOOSTE +0x000000710178ce30,_ZN10MobEffects4LUCKE +0x000000710178ce38,_ZN10MobEffects6UNLUCKE 0x000000710178CE68,_ZN15MonsterEggBlock7VARIANTE 0x000000710178CE70,_ZN15MonsterEggBlock7Variant8VARIANTSE 0x000000710178CEA0,_ZN15MonsterEggBlock9PREDICATEE @@ -838,6 +1103,7 @@ 0x00000071017A1958,_ZN11PlanksBlock7Variant8VARIANTSE 0x00000071017A1988,_ZN11PlanksBlock9PREDICATEE 0x00000071017A1A30,_ZN15RangedAttribute12ATTACK_SPEEDE +0x00000071017a1a40,_ZN14DataFixerUpper16DATA_VERSION_KEYE 0x00000071017A1BB0,_ZN9Direction4Axis9PREDICATEE 0x00000071017A1E70,_ZN15PrismarineBlock7VARIANTE 0x00000071017A1E78,_ZN15PrismarineBlock7Variant8VARIANTSE @@ -901,6 +1167,10 @@ 0x00000071017A42E8,SoundType::GRASS 0x00000071017A42F0,SoundType::STONE 0x00000071017A4318,SoundType::SNOW +0x00000071017A4550,_ZN11SpongeBlock3WETE +0x00000071017A48C8,_ZN4Stat14DEFAULT_FORMATE +0x00000071017A48E8,_ZN4Stat9ALL_STATSE +0x00000071017A48F0,_ZN4Stat5BY_IDE 0x00000071017A4AC0,_ZN10StoneBlock7VARIANTE 0x00000071017A4AC8,_ZN10StoneBlock7Variant5STONEE 0x00000071017A4AD0,_ZN10StoneBlock7Variant7GRANITEE @@ -920,6 +1190,8 @@ 0x00000071017A4BE0,_ZN15StoneBrickBlock7Variant7CRACKEDE 0x00000071017A4BE8,_ZN15StoneBrickBlock7Variant8CHISELEDE 0x00000071017A53F8,SynchedEntityData__sIdMap +0x00000071017A58E8,_ZN4Vec34ZEROE +0x00000071017A5B40,_ZN9WallBlock7Variant8VARIANTSE 0x00000071017A5ED8,_ZZN10StoneBlock26createBlockStateDefinitionEvE10properties 0x00000071017A8380,_ZN3fui9sInstanceE 0x00000071017AA788,CGameNetworkManager__sInstance diff --git a/data/mcswitch_functions.csv b/data/mcswitch_functions.csv index 186c2e38..2070a5ed 100644 --- a/data/mcswitch_functions.csv +++ b/data/mcswitch_functions.csv @@ -77,9 +77,9 @@ Address,Quality,Size,Name 0x0000007100001dd0,O,000008,_ZN9Abilities15setWalkingSpeedEf 0x0000007100001dd8,O,000168,_ZN9Abilities5writeEP16DataOutputStream 0x0000007100001e80,O,000192,_ZN9Abilities4readEP15DataInputStream -0x0000007100001f40,U,000052,_ZN18AbsoptionMobEffectC1Eb16eMinecraftColour -0x0000007100001f74,U,000120, -0x0000007100001fec,U,000120, +0x0000007100001f40,O,000052,_ZN18AbsoptionMobEffectC1Eb16eMinecraftColour +0x0000007100001f74,O,000120,_ZN18AbsoptionMobEffect24removeAttributeModifiersERKNSt3__110shared_ptrI12LivingEntityEEP16BaseAttributeMapi +0x0000007100001fec,O,000120,_ZN18AbsoptionMobEffect21addAttributeModifiersERKNSt3__110shared_ptrI12LivingEntityEEP16BaseAttributeMapi 0x0000007100002064,U,000064, 0x00000071000020a4,U,000056, 0x00000071000020dc,U,000096, @@ -681,19 +681,19 @@ Address,Quality,Size,Name 0x0000007100016274,O,000012,_ZN15MutableBlockPos3setEiii 0x0000007100016280,O,000028,_ZNK8BlockPos5belowEv 0x000000710001629c,O,000096,_ZNK10BlockState8setValueIPN8LogBlock7LogAxisEEEPKS_P8PropertyT_ -0x00000071000162fc,U,000340,_ZN11AchievementC_gen -0x0000007100016450,U,000340,_ZN11AchievementC_gen2 -0x00000071000165a4,U,000012, -0x00000071000165b0,U,000012, -0x00000071000165bc,U,000096, -0x000000710001661c,U,000008, -0x0000007100016624,U,000036, -0x0000007100016648,U,000012, +0x00000071000162fc,O,000340,_ZN11AchievementC1EiRKNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEEiiP4ItemPS_ +0x0000007100016450,O,000340,_ZN11AchievementC1EiRKNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEEiiP5BlockPS_ +0x00000071000165a4,O,000012,_ZN11Achievement7setFlagEv +0x00000071000165b0,O,000012,_ZN11Achievement10setSpecialEv +0x00000071000165bc,O,000096,_ZN11Achievement12registerStatEb +0x000000710001661c,O,000008,_ZN11Achievement13isAchievementEv +0x0000007100016624,O,000036,_ZN11Achievement14setIndependentEv +0x0000007100016648,O,000012,_ZN11Achievement16getAchievementIdEv 0x0000007100016654,U,000068,_ZN20ByteArrayInputStreamC1Ev 0x0000007100016698,U,000040,_ZN15DataInputStreamD1Ev 0x00000071000166c0,U,000216,_ZNSt3__120__shared_ptr_pointerIP17GameCommandPacketNS_14default_deleteIS1_EENS_9allocatorIS1_EEEC_gen 0x0000007100016798,U,000040,_ZN16DataOutputStreamD1Ev -0x00000071000167c0,U,012748, +0x00000071000167c0,O,012748,_ZN12Achievements10staticCtorEv 0x000000710001998c,U,000004, 0x0000007100019990,O,000128,_ZN17AddDeepOceanLayerC1ExNSt3__110shared_ptrI5LayerEE 0x0000007100019a10,U,000004,_ZN17AddDeepOceanLayerD2Ev @@ -779,7 +779,7 @@ Address,Quality,Size,Name 0x000000710001c070,U,000028,_ZN10AnvilBlock15blockStaticCtorEv 0x000000710001c08c,U,000172,_ZN10AnvilBlockC_gen 0x000000710001c138,O,000008,_ZN5Block20registerDefaultStateEPK10BlockState -0x000000710001c140,U,000032,_ZN20BlockStateDefinition3anyEv +0x000000710001c140,O,000032,_ZN20BlockStateDefinition3anyEv 0x000000710001c160,U,000096, 0x000000710001c1c0,O,000096,_ZNK10BlockState8setValueIiEEPKS_P8PropertyT_ 0x000000710001c220,U,000008,_ZN10AnvilBlock12isCubeShapedEPK10BlockState @@ -815,7 +815,7 @@ Address,Quality,Size,Name 0x000000710001cabc,U,000200,_ZN10AnvilBlock13registerIconsEP12IconRegister 0x000000710001cb84,U,000008,_ZN10AnvilBlock14getRenderShapeEPK10BlockState 0x000000710001cb8c,U,000100, -0x000000710001cbf0,U,000064,_ZN14AnvilBlockItemC_gen +0x000000710001cbf0,U,000064,_ZN14AnvilBlockItemC1EP5Block 0x000000710001cc30,U,000008, 0x000000710001cc38,U,000008, 0x000000710001cc40,U,001036, @@ -896,7 +896,7 @@ Address,Quality,Size,Name 0x000000710002172c,U,000016, 0x000000710002173c,U,000016, 0x000000710002174c,U,000252, -0x0000007100021848,U,000140,_ZN11NonNullListI12not_null_ptrI12ItemInstanceEE8withSizeEiS2_ +0x0000007100021848,M,000140,_ZN11NonNullListI12not_null_ptrI12ItemInstanceEE8withSizeEiRKS2_ 0x00000071000218d4,U,000036, 0x00000071000218f8,O,000008,_ZN11NonNullListI12not_null_ptrI12ItemInstanceEED2Ev 0x0000007100021900,U,000008, @@ -909,7 +909,7 @@ Address,Quality,Size,Name 0x0000007100022004,O,000028,_ZNK8BlockPos8relativeEPK9Direction 0x0000007100022020,U,000068, 0x0000007100022064,U,000040, -0x000000710002208c,U,000008, +0x000000710002208c,O,000008,_ZN17AttributeModifier5getIdEv 0x0000007100022094,U,000104, 0x00000071000220fc,U,000056,_ZN9ArmorItem13ArmorMaterial16getHealthForSlotEPK13EquipmentSlot 0x0000007100022134,U,000040,_ZNK9ArmorItem13ArmorMaterial17getDefenseForSlotEPK13EquipmentSlot @@ -917,7 +917,7 @@ Address,Quality,Size,Name 0x0000007100022164,U,000008, 0x000000710002216c,U,000164, 0x0000007100022210,U,000008,_ZNK9ArmorItem13ArmorMaterial12getToughnessEv -0x0000007100022218,U,000180,_ZN9ArmorItemC1EPKN9ArmorItem13ArmorMaterialEiPK13EquipmentSlot +0x0000007100022218,U,000180,_ZN9ArmorItemC1EPKNS_13ArmorMaterialEiPK13EquipmentSlot 0x00000071000222cc,U,000568,_ZN16BehaviorRegistry3addEP4ItemP20DispenseItemBehavior 0x0000007100022504,U,000008, 0x000000710002250c,U,000008,_ZN9ArmorItem19getEnchantmentValueEv @@ -1070,7 +1070,7 @@ Address,Quality,Size,Name 0x00000071000294a4,U,000004,_ZN5Arrow14addDataWalkersEP14DataFixerUpper 0x00000071000294a8,U,000820,_ZN5Arrow20addAdditonalSaveDataEP11CompoundTag 0x00000071000297dc,U,001224,_ZN5Arrow22readAdditionalSaveDataEP11CompoundTag -0x0000007100029ca4,U,000224,_ZN6Blocks8byStringERKNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE +0x0000007100029ca4,O,000224,_ZN6Blocks8byStringERKNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE 0x0000007100029d84,U,000040,_ZN5Block4byIdEi 0x0000007100029dac,U,000244,_ZN5Arrow11playerTouchENSt3__110shared_ptrI6PlayerEE 0x0000007100029ea0,U,000008,_ZN5Arrow13makeStepSoundEv @@ -1098,18 +1098,18 @@ Address,Quality,Size,Name 0x000000710002a1d0,O,000016,_ZN25ArrowKnockbackEnchantment10getMinCostEi 0x000000710002a1e0,O,000032,_ZN25ArrowKnockbackEnchantment10getMaxCostEi 0x000000710002a200,O,000008,_ZN25ArrowKnockbackEnchantment11getMaxLevelEv -0x000000710002a208,U,000068,_ZN21AttackDamageMobEffectC_gen -0x000000710002a24c,U,000020, +0x000000710002a208,O,000068,_ZN21AttackDamageMobEffectC1Eb16eMinecraftColourd +0x000000710002a24c,O,000020,_ZN21AttackDamageMobEffect25getAttributeModifierValueEiP17AttributeModifier 0x000000710002a260,U,000016, -0x000000710002a270,U,000064,_ZN17AttributeModifier5_initEiNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEEdi -0x000000710002a2b0,U,000104,__ct__17AttributeModifierFdi -0x000000710002a318,U,000116,_ZN17AttributeModifierC1E13eATTRIBUTE_IDdi -0x000000710002a38c,U,000124, -0x000000710002a408,U,000008,getOperation__17AttributeModifierFv -0x000000710002a410,U,000008, -0x000000710002a418,U,000008, -0x000000710002a420,U,000012, -0x000000710002a42c,U,000048, +0x000000710002a270,O,000064,_ZN17AttributeModifier5_initEiNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEEdi +0x000000710002a2b0,O,000104,_ZN17AttributeModifierC1Edi +0x000000710002a318,O,000116,_ZN17AttributeModifierC1E13eATTRIBUTE_IDdi +0x000000710002a38c,O,000124,_ZN17AttributeModifierC1E13eATTRIBUTE_IDdib +0x000000710002a408,O,000008,_ZN17AttributeModifier12getOperationEv +0x000000710002a410,O,000008,_ZN17AttributeModifier9getAmountEv +0x000000710002a418,O,000008,_ZN17AttributeModifier14isSerializableEv +0x000000710002a420,O,000012,_ZN17AttributeModifier12setSerializeEb +0x000000710002a42c,O,000048,_ZN17AttributeModifier6equalsEPS_ 0x000000710002a45c,U,000560, 0x000000710002a68c,U,000052,_ZN29AvoidEntityGoalEntitySelectorC_gen 0x000000710002a6c0,U,000020,_ZN9PredicateINSt3__110shared_ptrI6EntityEEEC2Ev @@ -1217,8 +1217,8 @@ Address,Quality,Size,Name 0x000000710002d498,U,000272, 0x000000710002d5a8,U,000176, 0x000000710002d658,U,000008, -0x000000710002d660,U,000088,_ZN10BannerItemC_gen -0x000000710002d6b8,U,000056,_ZN9BlockItemC2EP5Block +0x000000710002d660,U,000088,_ZN10BannerItemC1Ev +0x000000710002d6b8,O,000056,_ZN9BlockItemC2EP5Block 0x000000710002d6f0,U,000004,_ZN10BannerItemD2Ev 0x000000710002d6f4,U,000036,_ZN10BannerItemD0Ev 0x000000710002d718,U,000808, @@ -1230,18 +1230,18 @@ Address,Quality,Size,Name 0x000000710002dc48,U,000064, 0x000000710002dc88,U,000036, 0x000000710002dcac,U,000300, -0x000000710002ddd8,U,008584,_ZN13BannerPattern10staticCtorEv -0x000000710002ff60,U,000128, -0x000000710002ffe0,U,000028, -0x000000710002fffc,U,000072, -0x0000007100030044,U,000140, -0x00000071000300d0,U,000040, -0x00000071000300f8,U,000016, -0x0000007100030108,U,000048, -0x0000007100030138,U,000016, -0x0000007100030148,U,000008, -0x0000007100030150,U,000008, -0x0000007100030158,U,000008, +0x000000710002ddd8,O,008584,_ZN13BannerPattern10staticCtorEv +0x000000710002ff60,O,000128,_ZN13BannerPattern4initEiRKNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEEPKhi +0x000000710002ffe0,O,000028,_ZN13BannerPatternC1EiRKNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEEPKhi +0x000000710002fffc,O,000072,_ZN13BannerPatternC1EiRKNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEEP12ItemInstancePKhi +0x0000007100030044,O,000140,_ZN13BannerPatternC1EiRKNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEES8_S8_S8_PKhi +0x00000071000300d0,O,000040,_ZN13BannerPattern14getPatternGridEv +0x00000071000300f8,O,000016,_ZN13BannerPattern11PatternGridC1EPNSt3__112basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEE +0x0000007100030108,O,000048,_ZN13BannerPattern10hasPatternEv +0x0000007100030138,O,000016,_ZN13BannerPattern7hasItemEv +0x0000007100030148,O,000008,_ZN13BannerPattern7getItemEv +0x0000007100030150,O,000008,_ZN13BannerPattern5getIdEv +0x0000007100030158,O,000008,_ZN13BannerPattern16getDescriptionIdEv 0x0000007100030160,U,000004, 0x0000007100030164,U,001304, 0x000000710003067c,U,000016, @@ -1273,13 +1273,13 @@ Address,Quality,Size,Name 0x0000007100031534,O,000008,_ZNK12BarrierBlock13isSolidRenderEPK10BlockState 0x000000710003153c,O,000008,_ZN12BarrierBlock18getShadeBrightnessEPK10BlockState 0x0000007100031544,O,000004,_ZN12BarrierBlock14spawnResourcesEP5LevelRK8BlockPosPK10BlockStatefi -0x0000007100031548,U,000088,_ZN13BaseAttributeC_gen -0x00000071000315a0,U,000020,_ZN9AttributeC1Ev -0x00000071000315b4,U,000008, -0x00000071000315bc,U,000008, -0x00000071000315c4,U,000008, -0x00000071000315cc,U,000012, -0x00000071000315d8,U,000008, +0x0000007100031548,O,000088,_ZN13BaseAttributeC2EP9Attribute13eATTRIBUTE_IDd +0x00000071000315a0,O,000020,_ZN9AttributeC2Ev +0x00000071000315b4,O,000008,_ZN13BaseAttribute5getIdEv +0x00000071000315bc,O,000008,_ZN13BaseAttribute15getDefaultValueEv +0x00000071000315c4,O,000008,_ZN13BaseAttribute16isClientSyncableEv +0x00000071000315cc,O,000012,_ZN13BaseAttribute11setSyncableEb +0x00000071000315d8,O,000008,_ZN13BaseAttribute18getParentAttributeEv 0x00000071000315e0,U,000104,_ZN16BaseAttributeMapC_gen 0x0000007100031648,U,000004, 0x000000710003164c,U,000004, @@ -1403,7 +1403,7 @@ Address,Quality,Size,Name 0x0000007100035c34,U,000008,_ZN13BaseRailBlock14getRenderLayerEv 0x0000007100035c3c,U,000188,_ZN13BaseRailBlock8onRemoveEP5LevelRK8BlockPosPK10BlockState 0x0000007100035cf8,U,000008,_ZN13BaseRailBlock14getRenderShapeEPK10BlockState -0x0000007100035d00,U,000052, +0x0000007100035d00,O,000052,_ZN7Integer8parseIntERKNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEEi 0x0000007100035d34,U,000060,_ZN3Bat10staticCtorEv 0x0000007100035d70,U,000120,_ZN3BatC_gen 0x0000007100035de8,U,000060,_ZN3BatD2Ev @@ -1626,7 +1626,7 @@ Address,Quality,Size,Name 0x000000710003c440,U,000008, 0x000000710003c448,U,001036, 0x000000710003c854,O,000012,_ZN15arrayWithLengthIhEixEj -0x000000710003c860,U,000072,_ZN7BedItemC_gen +0x000000710003c860,U,000072,_ZN7BedItemC1Ev 0x000000710003c8a8,U,001488,_ZN7BedItem5useOnENSt3__110shared_ptrI6PlayerEEP5LevelRK8BlockPosN15InteractionHand16EInteractionHandEPK9Directionfffb 0x000000710003ce78,U,000064, 0x000000710003ceb8,U,000016,_ZN7BedItem12getLayerIconEii @@ -1799,13 +1799,13 @@ Address,Quality,Size,Name 0x00000071000441a4,U,000424,_ZN14BiomeDecoratorC2Ev 0x000000710004434c,U,000052,_ZN12ReedsFeatureC1Ev 0x0000007100044380,U,000052,_ZN13CactusFeatureC1Ev -0x00000071000443b4,O,000052,_ZN16WaterlilyFeatureC1Ev +0x00000071000443b4,O,000052,_ZN16WaterlilyFeatureC2Ev 0x00000071000443e8,U,000484,_ZN14BiomeDecoratorD2Ev 0x00000071000445cc,U,000036,_ZN14BiomeDecoratorD0Ev 0x00000071000445f0,U,001040,_ZN14BiomeDecorator8decorateEP5LevelR6RandomP5BiomeRK8BlockPos 0x0000007100044a00,O,000096,_ZNK10BlockState8setValueIPN10StoneBlock7VariantEEEPKS_P8PropertyT_ 0x0000007100044a60,U,004100,_ZN14BiomeDecorator8decorateEP5BiomeP5LevelR6Random -0x0000007100045a64,O,000052,_ZN14PumpkinFeatureC1Ev +0x0000007100045a64,O,000052,_ZN14PumpkinFeatureC2Ev 0x0000007100045a98,U,000416,_ZN14BiomeDecorator12decorateOresEP5LevelR6Random 0x0000007100045c38,U,000300, 0x0000007100045d64,U,000268, @@ -1945,7 +1945,7 @@ Address,Quality,Size,Name 0x000000710004bcd4,U,000032,_ZN5Block19getStateByIdAndDataEih 0x000000710004bcf4,U,000052,_ZN5Block17stateByIdWithDataEi 0x000000710004bd28,U,000064,_ZN5Block6byItemEP4Item -0x000000710004bd68,U,000008,_ZN9BlockItem8getBlockEv +0x000000710004bd68,O,000008,_ZN9BlockItem8getBlockEv 0x000000710004bd70,O,000008,_ZN5Block12isValidSpawnEPK10BlockStateNSt3__110shared_ptrI6EntityEE 0x000000710004bd78,O,000132,_ZN5Block13GetHitTooltipERK22BlockTooltipDataHolder 0x000000710004bdfc,O,000008,_ZN5Block11getMapColorEPK10BlockStateP11LevelSourceRK8BlockPos @@ -2092,8 +2092,8 @@ Address,Quality,Size,Name 0x000000710005c754,O,000096,_ZNK10BlockState8setValueIPN11QuartzBlock7VariantEEEPKS_P8PropertyT_ 0x000000710005c7b4,O,000096,_ZNK10BlockState8setValueIPN17RedSandStoneBlock7VariantEEEPKS_P8PropertyT_ 0x000000710005c814,U,000004, -0x000000710005c818,U,000008,_ZNK20BlockStateDefinition22getPossibleBlockStatesEv -0x000000710005c820,U,000012, +0x000000710005c818,O,000008,_ZNK20BlockStateDefinition22getPossibleBlockStatesEv +0x000000710005c820,O,000012,_ZN15arrayWithLengthIPK10BlockStateEixEj 0x000000710005c82c,U,000016, 0x000000710005c83c,O,000052,_ZN9BlockImplC1EP8Material 0x000000710005c870,O,000052,_ZN9BlockImplC1EP8MaterialPK13MaterialColor @@ -2207,22 +2207,22 @@ Address,Quality,Size,Name 0x000000710005f624,U,000052,_ZN12BlockInWorld21BlockInWorldPredicateC_gen 0x000000710005f658,U,000020,_ZN9PredicateIP12BlockInWorldEC1Ev 0x000000710005f66c,U,000072, -0x000000710005f6b4,U,000036,_ZN9BlockItem16setDescriptionIdEj +0x000000710005f6b4,O,000036,_ZN9BlockItem16setDescriptionIdEj 0x000000710005f6d8,U,000156,_ZN9BlockItem3useEP5LevelNSt3__110shared_ptrI6PlayerEEN15InteractionHand16EInteractionHandE 0x000000710005f774,U,001244,_ZN9BlockItem5useOnENSt3__110shared_ptrI6PlayerEEP5LevelRK8BlockPosN15InteractionHand16EInteractionHandEPK9Directionfffb 0x000000710005fc50,U,000572, 0x000000710005fe8c,U,000228, -0x000000710005ff70,U,000020,_ZN9BlockItem16getDescriptionIdE12not_null_ptrI12ItemInstanceE -0x000000710005ff84,U,000016,_ZN9BlockItem16getDescriptionIdEi -0x000000710005ff94,U,000016,_ZN9BlockItem19getUseDescriptionIdE12not_null_ptrI12ItemInstanceE -0x000000710005ffa4,U,000016,_ZN9BlockItem19getUseDescriptionIdEv +0x000000710005ff70,O,000020,_ZN9BlockItem16getDescriptionIdE12not_null_ptrI12ItemInstanceE +0x000000710005ff84,O,000016,_ZN9BlockItem16getDescriptionIdEi +0x000000710005ff94,O,000016,_ZN9BlockItem19getUseDescriptionIdE12not_null_ptrI12ItemInstanceE +0x000000710005ffa4,O,000016,_ZN9BlockItem19getUseDescriptionIdEv 0x000000710005ffb4,U,000232,_ZN9BlockItem15appendHoverTextE12not_null_ptrI12ItemInstanceENSt3__110shared_ptrI6PlayerEEPvb 0x000000710006009c,U,000088,_ZN9BlockItem11getIconTypeEv 0x00000071000600f4,U,000104,_ZN9BlockItem7getIconEi 0x000000710006015c,U,000116,_ZN9BlockItem13registerIconsEP12IconRegister 0x00000071000601d0,U,000028, 0x00000071000601ec,U,000052,_ZN22BlockMaterialPredicateC_gen -0x0000007100060220,U,000020,_ZN9PredicateIPK10BlockStateEC2Ev +0x0000007100060220,O,000020,_ZN9PredicateIPK10BlockStateEC2Ev 0x0000007100060234,U,000052, 0x0000007100060268,U,000068, 0x00000071000602ac,U,000012, @@ -2270,7 +2270,7 @@ Address,Quality,Size,Name 0x000000710006159c,U,000040, 0x00000071000615c4,U,000016, 0x00000071000615d4,U,000056, -0x000000710006160c,U,000056,_ZN16BlockPlanterItemC_gen +0x000000710006160c,O,000056,_ZN16BlockPlanterItemC1EP5Block 0x0000007100061644,U,001044,_ZN16BlockPlanterItem5useOnENSt3__110shared_ptrI6PlayerEEP5LevelRK8BlockPosN15InteractionHand16EInteractionHandEPK9Directionfffb 0x0000007100061a58,O,000016,_ZN8BlockPosC1Ev 0x0000007100061a68,U,000004, @@ -2290,7 +2290,7 @@ Address,Quality,Size,Name 0x0000007100061e54,O,000044,_ZNK8BlockPos4westEi 0x0000007100061e80,O,000044,_ZNK8BlockPos4eastEi 0x0000007100061eac,U,000232, -0x0000007100061f94,U,000008,_ZNK8Rotation7getTypeEv +0x0000007100061f94,O,000008,_ZNK8Rotation7getTypeEv 0x0000007100061f9c,U,000148,_ZNK8BlockPos16compressBlockPosEv 0x0000007100062030,U,000156,_ZN8BlockPos18decompressBlockPosEx 0x00000071000620cc,U,000180, @@ -2363,12 +2363,12 @@ Address,Quality,Size,Name 0x0000007100068364,U,000200,_ZN20BlockStateDefinitionC1EP5Block 0x000000710006842c,O,000012,_ZN15arrayWithLengthIPK10BlockStateEC2Ev 0x0000007100068438,U,000040, -0x0000007100068460,U,000008,_ZNK20BlockStateDefinition8getBlockEv -0x0000007100068468,U,000008, -0x0000007100068470,U,000048, -0x00000071000684a0,U,000100, -0x0000007100068504,U,000172, -0x00000071000685b0,U,000012, +0x0000007100068460,O,000008,_ZNK20BlockStateDefinition8getBlockEv +0x0000007100068468,O,000008,_ZNK20BlockStateDefinition13getPropertiesEv +0x0000007100068470,O,000048,_ZNK20BlockStateDefinition11hasPropertyEPK8Property +0x00000071000684a0,M,000100,_ZNK20BlockStateDefinition16getPropertyValueEPK8Propertyt +0x0000007100068504,O,000172,_ZNK20BlockStateDefinition12getNeighbourEPK8PropertyP5Boxedt +0x00000071000685b0,O,000012,_ZNK15arrayWithLengthIPK10BlockStateEixEj 0x00000071000685bc,U,000704, 0x000000710006887c,U,000088,_ZN20BlockStateDefinition14BlockStateImplC2EPS_t 0x00000071000688d4,U,000052,_ZN18AbstractBlockStateC_gen @@ -2422,10 +2422,10 @@ Address,Quality,Size,Name 0x0000007100069020,U,000024,_ZNK20BlockStateDefinition14BlockStateImpl14isViewBlockingEv 0x0000007100069038,U,000040,_ZNK20BlockStateDefinition14BlockStateImpl17getBlockFaceShapeEP11LevelSourceRK8BlockPosPK9Direction 0x0000007100069060,U,000056,_ZN10PredicatesIPK10BlockStateE17ConstantPredicateC1Eb -0x0000007100069098,U,000068,_ZN19BlockStatePredicateC_gen -0x00000071000690dc,U,000072, -0x0000007100069124,U,000160, -0x00000071000691c4,U,000104, +0x0000007100069098,O,000068,_ZN19BlockStatePredicateC2EP20BlockStateDefinition +0x00000071000690dc,O,000072,_ZN19BlockStatePredicate8forBlockEP5Block +0x0000007100069124,O,000160,_ZNK19BlockStatePredicate5applyEPK10BlockState +0x00000071000691c4,O,000104,_ZN19BlockStatePredicate5whereEP8PropertyPK9PredicateIP5BoxedE 0x000000710006922c,U,000596, 0x0000007100069480,U,000224,_ZN4Boat10staticCtorEv 0x0000007100069560,U,000156, @@ -2484,7 +2484,7 @@ Address,Quality,Size,Name 0x000000710006c0d0,U,000048, 0x000000710006c100,U,000080, 0x000000710006c150,U,000036, -0x000000710006c174,U,000064,_ZN8BoatItemC_gen +0x000000710006c174,O,000064,_ZN8BoatItemC1Ei 0x000000710006c1b4,U,000700,_ZN8BoatItem7TestUseEP5LevelNSt3__110shared_ptrI6PlayerEEN15InteractionHand16EInteractionHandE 0x000000710006c470,U,000216,_ZNSt3__120__shared_ptr_pointerIP4BoatNS_14default_deleteIS1_EENS_9allocatorIS1_EEEC_gen 0x000000710006c548,U,000016, @@ -2518,7 +2518,7 @@ Address,Quality,Size,Name 0x000000710006db4c,U,000008, 0x000000710006db54,U,000004, 0x000000710006db58,U,000008, -0x000000710006db60,U,000048,_ZN8BookItemC_gen +0x000000710006db60,O,000048,_ZN8BookItemC1Ev 0x000000710006db90,U,000032,_ZN8BookItem13isEnchantableE12not_null_ptrI12ItemInstanceE 0x000000710006dbb0,U,000008,_ZN8BookItem19getEnchantmentValueEv 0x000000710006dbb8,U,000064,_ZN14BookshelfBlockC_gen @@ -2534,8 +2534,8 @@ Address,Quality,Size,Name 0x000000710006e1ec,O,000056,_ZNSt3__113__vector_baseIP5BoxedNS_9allocatorIS2_EEED2Ev 0x000000710006e224,U,000020,_ZN16AbstractPropertyIbECC1Ev 0x000000710006e238,U,000036,_ZN15BooleanPropertyD0Ev -0x000000710006e25c,U,000008, -0x000000710006e264,U,000040, +0x000000710006e25c,O,000008,_ZNK15BooleanProperty17getPossibleValuesEv +0x000000710006e264,O,000040,_ZNK15BooleanProperty15getUnboxedValueERKNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE 0x000000710006e28c,U,000008, 0x000000710006e294,U,000268,_ZNSt3__110to_wstringEb 0x000000710006e3a0,U,000188, @@ -2543,10 +2543,10 @@ Address,Quality,Size,Name 0x000000710006e530,U,000052, 0x000000710006e564,U,000048, 0x000000710006e594,U,000096, -0x000000710006e5f4,U,000008, -0x000000710006e5fc,U,000052, +0x000000710006e5f4,O,000008,_ZNK15BooleanProperty13getValueCountEv +0x000000710006e5fc,O,000052,_ZNK15BooleanProperty15getValueAtIndexEj 0x000000710006e630,O,000040,_ZNKSt3__16vectorIP5BoxedNS_9allocatorIS2_EEE2atEm -0x000000710006e658,U,000120, +0x000000710006e658,O,000120,_ZNK15BooleanProperty16getIndexForValueEP5Boxed 0x000000710006e6d0,O,000008,_ZN12BorderStatusC1Ei 0x000000710006e6d8,U,000124,_ZN9BossEventC_gen 0x000000710006e754,U,000012, @@ -2565,7 +2565,7 @@ Address,Quality,Size,Name 0x000000710006e7c8,U,000012, 0x000000710006e7d4,U,000012, 0x000000710006e7e0,U,000008, -0x000000710006e7e8,U,000048,_ZN10BottleItemC_gen +0x000000710006e7e8,O,000048,_ZN10BottleItemC1Ev 0x000000710006e818,U,001252,_ZN10BottleItem3useEP5LevelNSt3__110shared_ptrI6PlayerEEN15InteractionHand16EInteractionHandE 0x000000710006ecfc,U,000048,_ZN25AreaEffectCloud_PredicateC_gen 0x000000710006ed2c,U,000332, @@ -2614,7 +2614,7 @@ Address,Quality,Size,Name 0x00000071000704d8,O,000004,_ZN7BowItem22GetOverrideCountColourEv 0x00000071000704dc,O,000264,_ZN7BowItem20GetOverrideCountIconE12not_null_ptrI12ItemInstanceE 0x00000071000705e4,O,000140,_ZN7BowItem13GetUseTooltipERK21ItemToolTipDataHolder -0x0000007100070670,U,000060,_ZN12BowlFoodItemC_gen +0x0000007100070670,O,000060,_ZN12BowlFoodItemC1Ei 0x00000071000706ac,U,000212, 0x0000007100070780,U,000056,_ZN13BreakDoorGoalC_gen 0x00000071000707b8,U,000092, @@ -2752,7 +2752,7 @@ Address,Quality,Size,Name 0x00000071000744d8,U,000128,_ZN16BrewingStandMenu8FuelSlotC_gen 0x0000007100074558,U,000064, 0x0000007100074598,U,000008, -0x00000071000745a0,U,000064,_ZN10BucketItemC_gen +0x00000071000745a0,O,000064,_ZN10BucketItemC1EP5Block 0x00000071000745e0,U,000264,_ZN10BucketItem5useOnENSt3__110shared_ptrI6PlayerEEP5LevelRK8BlockPosN15InteractionHand16EInteractionHandEPK9Directionfffb 0x00000071000746e8,U,000904,_ZN10BucketItem7TestUseEP5LevelNSt3__110shared_ptrI6PlayerEEN15InteractionHand16EInteractionHandE 0x0000007100074a70,U,000176, @@ -3051,7 +3051,7 @@ Address,Quality,Size,Name 0x000000710009ddc0,U,000064,_ZN11CarrotBlock8getShapeEPK10BlockStateP11LevelSourceRK8BlockPos 0x000000710009de00,U,000088,_ZN11CarrotBlock10getTextureEPK9DirectionPK10BlockState 0x000000710009de58,U,000300,_ZN11CarrotBlock13registerIconsEP12IconRegister -0x000000710009df84,U,000068,_ZN18CarrotOnAStickItemC_gen +0x000000710009df84,O,000068,_ZN18CarrotOnAStickItemC1Ev 0x000000710009dfc8,U,000008,_ZN18CarrotOnAStickItem14isHandEquippedEv 0x000000710009dfd0,U,000008,_ZN18CarrotOnAStickItem13isMirroredArtEv 0x000000710009dfd8,U,000668,_ZN18CarrotOnAStickItem3useEP5LevelNSt3__110shared_ptrI6PlayerEEN15InteractionHand16EInteractionHandE @@ -3338,7 +3338,7 @@ Address,Quality,Size,Name 0x00000071000a8980,U,000016, 0x00000071000a8990,U,000016, 0x00000071000a89a0,U,000016, -0x00000071000a89b0,U,000052,_ZN15ChorusFruitItemC_gen +0x00000071000a89b0,U,000052,_ZN15ChorusFruitItemC1Eif 0x00000071000a89e4,U,000608, 0x00000071000a8c44,U,000168,_ZN16ChorusPlantBlock11DerivedInitEv 0x00000071000a8cec,U,000076,_ZN16ChorusPlantBlockC_gen @@ -3790,9 +3790,9 @@ Address,Quality,Size,Name 0x00000071000b1458,U,000008, 0x00000071000b1460,U,000064, 0x00000071000b14a0,U,000012, -0x00000071000b14ac,U,000068,_ZN11AchievementD2Ev -0x00000071000b14f0,U,000036,_ZN11AchievementD0Ev -0x00000071000b1514,U,000004, +0x00000071000b14ac,O,000068,_ZN11AchievementD2Ev +0x00000071000b14f0,O,000036,_ZN11AchievementD0Ev +0x00000071000b1514,O,000004,_ZN4Stat12reservedHookEv 0x00000071000b1518,O,000036,_ZN14AddIslandLayerD0Ev 0x00000071000b153c,O,000020,_ZN5LayerD2Ev 0x00000071000b1550,O,000036,_ZN22AddMushroomIslandLayerD0Ev @@ -3937,8 +3937,8 @@ Address,Quality,Size,Name 0x00000071000b2510,U,000008,_ZN23BlockRegionUpdatePacket11getPacketIdEv 0x00000071000b2518,U,000004,_ZN8PositionD1Ev 0x00000071000b251c,O,000036,_ZN15BlockSourceImplD0Ev -0x00000071000b2540,U,000052,_ZN19BlockStatePredicateD2Ev -0x00000071000b2574,U,000036,_ZN19BlockStatePredicateD0Ev +0x00000071000b2540,O,000052,_ZN19BlockStatePredicateD2Ev +0x00000071000b2574,O,000036,_ZN19BlockStatePredicateD0Ev 0x00000071000b2598,U,000036,_ZN4BoatD0Ev 0x00000071000b25bc,U,000012, 0x00000071000b25c8,U,000036,_ZN8BoatItemD0Ev @@ -4200,8 +4200,8 @@ Address,Quality,Size,Name 0x00000071000b49ec,U,000004, 0x00000071000b49f0,O,000024,_ZNSt3__113unordered_mapI16ResourceLocation11eINSTANCEOFNS_4hashIS1_EENS_8equal_toIS1_EENS_9allocatorINS_4pairIKS1_S2_EEEEE2atERS9_ 0x00000071000b4a08,M,000300,_ZNSt3__112__hash_tableINS_17__hash_value_typeI16ResourceLocation11eINSTANCEOFEENS_22__unordered_map_hasherIS2_S4_NS_4hashIS2_EELb1EEENS_21__unordered_map_equalIS2_S4_NS_8equal_toIS2_EELb1EEENS_9allocatorIS4_EEE4findIS2_EENS_15__hash_iteratorIPNS_11__hash_nodeIS4_PvEEEERKT_ -0x00000071000b4b34,M,000008,_ZNKSt3__14hashI16ResourceLocationEclERKS1_ -0x00000071000b4b3c,M,000012,_ZNK16ResourceLocationeqERKS_ +0x00000071000b4b34,O,000008,_ZNKSt3__14hashI16ResourceLocationEclERKS1_ +0x00000071000b4b3c,O,000012,_ZNKSt3__18equal_toI16ResourceLocationEclERKS1_S4_ 0x00000071000b4b48,U,000604, 0x00000071000b4da4,O,000108,_ZNSt3__112__hash_tableINS_17__hash_value_typeI16ResourceLocation11eINSTANCEOFEENS_22__unordered_map_hasherIS2_S4_NS_4hashIS2_EELb1EEENS_21__unordered_map_equalIS2_S4_NS_8equal_toIS2_EELb1EEENS_9allocatorIS4_EEE21__construct_node_hashIRKNS_21piecewise_construct_tEJNS_5tupleIJRKS2_EEENSK_IJEEEEEENS_10unique_ptrINS_11__hash_nodeIS4_PvEENS_22__hash_node_destructorINSD_ISS_EEEEEEmOT_DpOT0_ 0x00000071000b4e10,U,000932, @@ -4289,7 +4289,7 @@ Address,Quality,Size,Name 0x00000071000b682c,U,000048, 0x00000071000b685c,U,000064, 0x00000071000b689c,U,000048, -0x00000071000b68cc,U,000020,_ZN4StatC1Ev +0x00000071000b68cc,O,000020,_ZN4StatD2Ev 0x00000071000b68e0,U,000020,_ZN10ProjectileD2Ev 0x00000071000b68f4,U,000140, 0x00000071000b6980,U,000064, @@ -4343,12 +4343,12 @@ Address,Quality,Size,Name 0x00000071000b7f10,U,000044, 0x00000071000b7f3c,U,000008, 0x00000071000b7f44,U,000040, -0x00000071000b7f6c,U,000204,_ZNSt3__110shared_ptrI12ItemInstanceEC2IS1_EEPT_NS_9enable_ifIXsr14is_convertibleIS5_PS1_EE5valueENS2_5__natEE4typeE -0x00000071000b8038,U,000036,_ZNSt3__120__shared_ptr_pointerIP12ItemInstanceNS_14default_deleteIS1_EENS_9allocatorIS1_EEED0Ev -0x00000071000b805c,U,000056,_ZNSt3__120__shared_ptr_pointerIP12ItemInstanceNS_14default_deleteIS1_EENS_9allocatorIS1_EEE16__on_zero_sharedEv -0x00000071000b8094,U,000028,_ZNKSt3__120__shared_ptr_pointerIP12ItemInstanceNS_14default_deleteIS1_EENS_9allocatorIS1_EEE13__get_deleterERKSt9type_info -0x00000071000b80b0,U,000004,_ZNSt3__120__shared_ptr_pointerIP12ItemInstanceNS_14default_deleteIS1_EENS_9allocatorIS1_EEE21__on_zero_shared_weakEv -0x00000071000b80b4,U,000016,_ZNSt3__18weak_ptrI12ItemInstanceED2Ev +0x00000071000b7f6c,O,000204,_ZNSt3__110shared_ptrI12ItemInstanceEC2IS1_EEPT_NS_9enable_ifIXsr14is_convertibleIS5_PS1_EE5valueENS2_5__natEE4typeE +0x00000071000b8038,O,000036,_ZNSt3__120__shared_ptr_pointerIP12ItemInstanceNS_14default_deleteIS1_EENS_9allocatorIS1_EEED0Ev +0x00000071000b805c,O,000056,_ZNSt3__120__shared_ptr_pointerIP12ItemInstanceNS_14default_deleteIS1_EENS_9allocatorIS1_EEE16__on_zero_sharedEv +0x00000071000b8094,O,000028,_ZNKSt3__120__shared_ptr_pointerIP12ItemInstanceNS_14default_deleteIS1_EENS_9allocatorIS1_EEE13__get_deleterERKSt9type_info +0x00000071000b80b0,O,000004,_ZNSt3__120__shared_ptr_pointerIP12ItemInstanceNS_14default_deleteIS1_EENS_9allocatorIS1_EEE21__on_zero_shared_weakEv +0x00000071000b80b4,O,000016,_ZNSt3__18weak_ptrI12ItemInstanceED2Ev 0x00000071000b80c4,O,000064,_ZNSt3__110shared_ptrI6EntityEC2IS1_EERKNS_8weak_ptrIT_EENS_9enable_ifIXsr14is_convertibleIPS5_PS1_EE5valueENS2_5__natEE4typeE 0x00000071000b8104,U,000184, 0x00000071000b81bc,U,000096, @@ -4954,7 +4954,7 @@ Address,Quality,Size,Name 0x00000071000c8078,U,000820, 0x00000071000c83ac,U,000008, 0x00000071000c83b4,U,000052, -0x00000071000c83e8,U,000004, +0x00000071000c83e8,O,000004,_ZN9PredicateIPK10BlockStateED2Ev 0x00000071000c83ec,U,000036,_ZN10PredicatesIPK10BlockStateE17ConstantPredicateD0Ev 0x00000071000c8410,U,000092, 0x00000071000c846c,U,000820, @@ -5593,9 +5593,9 @@ Address,Quality,Size,Name 0x00000071000d632c,U,000080,_ZN24ClientboundRespawnPacket6handleEP14PacketListener 0x00000071000d637c,U,000016,_ZNSt3__110shared_ptrI24ClientboundRespawnPacketED2Ev 0x00000071000d638c,U,000536,_ZN24ClientboundRespawnPacket4readEP15DataInputStream -0x00000071000d65a4,U,000036,_ZN10Difficulty4byIdEi +0x00000071000d65a4,O,000036,_ZN10Difficulty4byIdEi 0x00000071000d65c8,U,000552,_ZN24ClientboundRespawnPacket5writeEP16DataOutputStream -0x00000071000d67f0,U,000008,_ZNK10Difficulty5getIdEv +0x00000071000d67f0,O,000008,_ZNK10Difficulty5getIdEv 0x00000071000d67f8,U,000100,_ZN24ClientboundRespawnPacket16getEstimatedSizeEv 0x00000071000d685c,U,000008, 0x00000071000d6864,U,000008, @@ -5946,7 +5946,7 @@ Address,Quality,Size,Name 0x00000071000dd1ec,U,000016, 0x00000071000dd1fc,U,000012, 0x00000071000dd208,U,000076, -0x00000071000dd254,U,000192,_ZN9ClockItemC_gen +0x00000071000dd254,U,000192,_ZN9ClockItemC1Ev 0x00000071000dd314,U,000048,_ZN30ClockItem_ItemPropertyFunctionC_gen 0x00000071000dd344,U,000080,_ZN9ClockItem7getIconEi 0x00000071000dd394,U,000148,_ZN9ClockItem13registerIconsEP12IconRegister @@ -6188,7 +6188,7 @@ Address,Quality,Size,Name 0x00000071000e44bc,U,000116, 0x00000071000e4530,U,000084,_ZN11CompoundTag6getIntERKNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE 0x00000071000e4584,U,000168, -0x00000071000e462c,U,000180,_ZN11CompassItemC_gen +0x00000071000e462c,U,000180,_ZN11CompassItemC1Ev 0x00000071000e46e0,U,000048,_ZN11CompassItem32CompassItem_ItemPropertyFunctionC_gen 0x00000071000e4710,U,000080,_ZN11CompassItem7getIconEi 0x00000071000e4760,U,000148,_ZN11CompassItem13registerIconsEP12IconRegister @@ -6684,47 +6684,47 @@ Address,Quality,Size,Name 0x00000071000f4070,O,000128,_ZN17DamageEnchantment10canEnchantERK12not_null_ptrI12ItemInstanceE 0x00000071000f40f0,O,000060,_ZN11Enchantment10canEnchantERK12not_null_ptrI12ItemInstanceE 0x00000071000f412c,O,000252,_ZN17DamageEnchantment12doPostAttackERKNSt3__110shared_ptrI12LivingEntityEERKNS1_I6EntityEEi -0x00000071000f4228,U,000012, -0x00000071000f4234,U,000016,_ZN12DamageSource12bypassArmourEv -0x00000071000f4244,U,000016, -0x00000071000f4254,U,000012, +0x00000071000f4228,O,000012,_ZN12DamageSource7setFireEv +0x00000071000f4234,O,000016,_ZN12DamageSource12bypassArmourEv +0x00000071000f4244,O,000016,_ZN12DamageSource11bypassMagicEv +0x00000071000f4254,O,000012,_ZN12DamageSource11bypassInvulEv 0x00000071000f4260,O,000012,_ZN12DamageSource8setMagicEv -0x00000071000f426c,U,000012, +0x00000071000f426c,O,000012,_ZN12DamageSource13setProjectileEv 0x00000071000f4278,U,000164, -0x00000071000f431c,U,000120,_ZN12DamageSource12CreateThornsENSt3__110shared_ptrI6EntityEE +0x00000071000f431c,O,000120,_ZN12DamageSource12CreateThornsENSt3__110shared_ptrI6EntityEE 0x00000071000f4394,U,000104, 0x00000071000f43fc,U,000156, 0x00000071000f4498,U,000104, -0x00000071000f4500,U,000012, +0x00000071000f4500,O,000012,_ZN12DamageSource12setExplosionEv 0x00000071000f450c,U,000276, 0x00000071000f4620,U,000164, 0x00000071000f46c4,U,000304, 0x00000071000f47f4,U,000464, -0x00000071000f49c4,U,000012, +0x00000071000f49c4,O,000012,_ZN12DamageSource23setScalesWithDifficultyEv 0x00000071000f49d0,U,000172, -0x00000071000f4a7c,U,000008,_ZN12DamageSource11isExplosionEv +0x00000071000f4a7c,O,000008,_ZNK12DamageSource11isExplosionEv 0x00000071000f4a84,U,000008, 0x00000071000f4a8c,U,000012, 0x00000071000f4a98,O,000008,_ZNK12DamageSource12isProjectileEv -0x00000071000f4aa0,U,000008, -0x00000071000f4aa8,U,000008, +0x00000071000f4aa0,O,000008,_ZNK12DamageSource14isBypassArmourEv +0x00000071000f4aa8,O,000008,_ZNK12DamageSource13getExhaustionEv 0x00000071000f4ab0,O,000008,_ZNK12DamageSource13isBypassInvulEv -0x00000071000f4ab8,U,000008, +0x00000071000f4ab8,O,000008,_ZNK12DamageSource13isBypassMagicEv 0x00000071000f4ac0,O,000092,_ZN12DamageSourceC1EN21ClientboundChatPacket18EChatPacketMessageES1_ 0x00000071000f4b1c,O,000012,_ZN12DamageSource15getDirectEntityEv 0x00000071000f4b28,O,000008,_ZN12DamageSource9getEntityEv 0x00000071000f4b30,O,000008,_ZN12DamageSource20scalesWithDifficultyEv -0x00000071000f4b38,U,000008, +0x00000071000f4b38,O,000008,_ZNK12DamageSource7isMagicEv 0x00000071000f4b40,U,000300, 0x00000071000f4c6c,U,000216,_ZNSt3__120__shared_ptr_pointerIP32ClientboundDamageIndicatorPacketNS_14default_deleteIS1_EENS_9allocatorIS1_EEEC_gen 0x00000071000f4d44,U,000304,_ZN12DamageSource21getDeathMessagePacketENSt3__110shared_ptrI12LivingEntityEE -0x00000071000f4e74,U,000008,_ZN12DamageSource6isFireEv +0x00000071000f4e74,O,000008,_ZNK12DamageSource6isFireEv 0x00000071000f4e7c,U,000008, 0x00000071000f4e84,U,000160, 0x00000071000f4f24,O,000052,_ZN12DamageSource4copyEv -0x00000071000f4f58,U,000044,_ZN12DamageSourceC_gen +0x00000071000f4f58,O,000044,_ZN12DamageSourceC2ERKS_ 0x00000071000f4f84,O,000008,_ZN12DamageSource17getSourcePositionEv -0x00000071000f4f8c,U,000004,_ZN12DamageSource19GetBaseDamageSourceEv +0x00000071000f4f8c,O,000004,_ZN12DamageSource19GetBaseDamageSourceEv 0x00000071000f4f90,U,000068,_ZN15DataInputStreamC1EP11InputStream 0x00000071000f4fd4,U,000020,_ZN9DataInputC1Ev 0x00000071000f4fe8,U,000016,_ZN15DataInputStream4readEv @@ -7218,8 +7218,8 @@ Address,Quality,Size,Name 0x00000071001019e8,O,000064,_ZN9DirtBlock13registerIconsEP12IconRegister 0x0000007100101a28,O,000160,_ZN9DirtBlock7Variant13registerIconsEP12IconRegister 0x0000007100101ac8,M,000228,_ZN9DirtBlock7VariantC2EiRKNSt3__112basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEEiiPK13MaterialColorS9_S9_S9_ -0x0000007100101bac,U,000008, -0x0000007100101bb4,U,000008, +0x0000007100101bac,O,000008,_ZN9DirtBlock7Variant9getNameIdEv +0x0000007100101bb4,O,000008,_ZN9DirtBlock7Variant16getDescriptionIdEv 0x0000007100101bbc,U,000012, 0x0000007100101bc8,U,000012, 0x0000007100101bd4,O,000056,_ZN16DisconnectPacketC1Ev @@ -7392,7 +7392,7 @@ Address,Quality,Size,Name 0x0000007100106ee8,U,000016, 0x0000007100106ef8,U,000128, 0x0000007100106f78,U,000148, -0x000000710010700c,U,000056,_ZN8DoorItemC_gen +0x000000710010700c,O,000056,_ZN8DoorItemC1EP5Block 0x0000007100107044,U,000772,_ZN8DoorItem5useOnENSt3__110shared_ptrI6PlayerEEP5LevelRK8BlockPosN15InteractionHand16EInteractionHandEPK9Directionfffb 0x0000007100107348,U,000920, 0x00000071001076e0,U,000056,_ZN16DoublePlantBlock4HalfE_0C_gen @@ -7400,10 +7400,10 @@ Address,Quality,Size,Name 0x0000007100107724,U,000092, 0x0000007100107780,U,000116,_ZN16DoublePlantBlock7VariantE_0C_gen 0x00000071001077f4,U,000012, -0x0000007100107800,U,000028, +0x0000007100107800,O,000028,_ZN16DoublePlantBlock7Variant6byDataEi 0x000000710010781c,U,000012, -0x0000007100107828,U,000008, -0x0000007100107830,U,000008, +0x0000007100107828,O,000008,_ZN16DoublePlantBlock7Variant9getNameIdEv +0x0000007100107830,O,000008,_ZN16DoublePlantBlock7Variant16getDescriptionIdEv 0x0000007100107838,U,000016, 0x0000007100107848,U,000012, 0x0000007100107854,U,000012, @@ -7522,7 +7522,7 @@ Address,Quality,Size,Name 0x000000710010b840,U,000008, 0x000000710010b848,U,000064, 0x000000710010b888,U,000012, -0x000000710010b894,U,000088,_ZN7DyeItemC_gen +0x000000710010b894,U,000088,_ZN7DyeItemC1Ev 0x000000710010b8ec,U,000028,_ZN7DyeItem16getDescriptionIdE12not_null_ptrI12ItemInstanceE 0x000000710010b908,U,000028,_ZN7DyeItem19getUseDescriptionIdE12not_null_ptrI12ItemInstanceE 0x000000710010b924,U,000744,_ZN7DyeItem5useOnENSt3__110shared_ptrI6PlayerEEP5LevelRK8BlockPosN15InteractionHand16EInteractionHandEPK9Directionfffb @@ -7558,7 +7558,7 @@ Address,Quality,Size,Name 0x000000710010d5b0,U,000016, 0x000000710010d5c0,U,000008, 0x000000710010d5c8,U,000380, -0x000000710010d744,U,000056,_ZN7EggItemC_gen +0x000000710010d744,O,000056,_ZN7EggItemC1Ev 0x000000710010d77c,U,000600,_ZN7EggItem3useEP5LevelNSt3__110shared_ptrI6PlayerEEN15InteractionHand16EInteractionHandE 0x000000710010d9d4,U,000216,_ZNSt3__120__shared_ptr_pointerIP9ThrownEggNS_14default_deleteIS1_EENS_9allocatorIS1_EEEC_gen 0x000000710010daac,U,000016, @@ -7639,7 +7639,7 @@ Address,Quality,Size,Name 0x000000710010e650,O,000048,_ZN12EmptyMapItemC1Ev 0x000000710010e680,O,000416,_ZN12EmptyMapItem3useEP5LevelNSt3__110shared_ptrI6PlayerEEN15InteractionHand16EInteractionHandE 0x000000710010e820,O,000012,_ZN12EmptyMapItem13GetUseTooltipERK21ItemToolTipDataHolder -0x000000710010e82c,U,000048,_ZN17EnchantedBookItemC_gen +0x000000710010e82c,O,000048,_ZN17EnchantedBookItemC1Ev 0x000000710010e85c,U,000008,_ZN17EnchantedBookItem6isFoilE12not_null_ptrI12ItemInstanceE 0x000000710010e864,U,000008,_ZN17EnchantedBookItem13isEnchantableE12not_null_ptrI12ItemInstanceE 0x000000710010e86c,U,000156,_ZN17EnchantedBookItem9getRarityERKNSt3__110shared_ptrI12ItemInstanceEE @@ -7848,7 +7848,7 @@ Address,Quality,Size,Name 0x0000007100117958,U,000696, 0x0000007100117c10,U,000004, 0x0000007100117c14,U,000748, -0x0000007100117f00,U,000116,_ZN14EndCrystalItemC_gen +0x0000007100117f00,U,000116,_ZN14EndCrystalItemC1Ev 0x0000007100117f74,U,000972,_ZN14EndCrystalItem5useOnENSt3__110shared_ptrI6PlayerEEP5LevelRK8BlockPosN15InteractionHand16EInteractionHandEPK9Directionfffb 0x0000007100118340,O,000216,_ZNSt3__110shared_ptrI12EnderCrystalEC2IS1_EEPT_NS_9enable_ifIXsr14is_convertibleIS5_PS1_EE5valueENS2_5__natEE4typeE 0x0000007100118418,U,000080,_ZN12EnderCrystal13setShowBottomEb @@ -8022,7 +8022,7 @@ Address,Quality,Size,Name 0x00000071001227a8,U,000008, 0x00000071001227b0,U,000116, 0x0000007100122824,U,000008, -0x000000710012282c,U,000048,_ZN12EnderEyeItemC_gen +0x000000710012282c,O,000048,_ZN12EnderEyeItemC1Ev 0x000000710012285c,U,001036,_ZN12EnderEyeItem5useOnENSt3__110shared_ptrI6PlayerEEP5LevelRK8BlockPosN15InteractionHand16EInteractionHandEPK9Directionfffb 0x0000007100122c68,U,000852, 0x0000007100122fbc,U,000268,_ZN12EnderEyeItem7TestUseEP5LevelNSt3__110shared_ptrI6PlayerEEN15InteractionHand16EInteractionHandE @@ -8095,7 +8095,7 @@ Address,Quality,Size,Name 0x0000007100127b20,U,000008, 0x0000007100127b28,U,000128, 0x0000007100127ba8,U,000008, -0x0000007100127bb0,U,000056,_ZN14EnderpearlItemC_gen +0x0000007100127bb0,O,000056,_ZN14EnderpearlItemC1Ev 0x0000007100127be8,U,000008,_ZN14EnderpearlItem7TestUseEP5LevelNSt3__110shared_ptrI6PlayerEEN15InteractionHand16EInteractionHandE 0x0000007100127bf0,U,000620,_ZN14EnderpearlItem3useEP5LevelNSt3__110shared_ptrI6PlayerEEN15InteractionHand16EInteractionHandE 0x0000007100127e5c,U,000216,_ZNSt3__120__shared_ptr_pointerIP16ThrownEnderpearlNS_14default_deleteIS1_EENS_9allocatorIS1_EEEC_gen @@ -9866,11 +9866,11 @@ Address,Quality,Size,Name 0x0000007100151c54,O,000020,_ZN6Entity6removeEv 0x0000007100151c68,O,000004,_ZN6Entity23setDropContainerContentEb 0x0000007100151c6c,O,000320,_ZN6Entity7setSizeEff -0x0000007100151dac,U,000064,_ZN6Entity6setRotEff +0x0000007100151dac,O,000064,_ZN6Entity6setRotEff 0x0000007100151dec,O,000116,_ZN6Entity6setPosEddd -0x0000007100151e60,U,000088,_ZN6Entity15interpolateTurnEff +0x0000007100151e60,O,000088,_ZN6Entity15interpolateTurnEff 0x0000007100151eb8,O,000104,_ZN6Entity4tickEv -0x0000007100151f20,U,000124,_ZN6Entity13setSharedFlagEib +0x0000007100151f20,O,000124,_ZN6Entity13setSharedFlagEib 0x0000007100151f9c,U,001228,_ZN6Entity8baseTickEv 0x0000007100152468,U,000140,_ZN6Entity15isInWaterOrRainEv 0x00000071001524f4,U,000084,_ZN6Entity8isInLavaEv @@ -9896,10 +9896,10 @@ Address,Quality,Size,Name 0x0000007100154138,O,000008,_ZN6Entity12makeFlySoundEv 0x0000007100154140,U,000148, 0x00000071001541d4,O,000188,_ZN6Entity9playSoundEPK10SoundEventff -0x0000007100154290,U,000020,_ZN6Entity8isSilentEv -0x00000071001542a4,U,000032,_ZN6Entity9setSilentEb -0x00000071001542c4,U,000020,_ZN6Entity11isNoGravityEv -0x00000071001542d8,U,000032,_ZN6Entity12setNoGravityEb +0x0000007100154290,O,000020,_ZN6Entity8isSilentEv +0x00000071001542a4,O,000032,_ZN6Entity9setSilentEb +0x00000071001542c4,O,000020,_ZN6Entity11isNoGravityEv +0x00000071001542d8,O,000032,_ZN6Entity12setNoGravityEb 0x00000071001542f8,O,000008,_ZN6Entity13makeStepSoundEv 0x0000007100154300,O,000196,_ZN6Entity15checkFallDamageEdbP5BlockRK8BlockPos 0x00000071001543c4,O,000008,_ZN6Entity13getCollideBoxEv @@ -9907,7 +9907,7 @@ Address,Quality,Size,Name 0x00000071001543f8,U,000008,_ZN6Entity12isFireImmuneEv 0x0000007100154400,U,000180,_ZN6Entity15causeFallDamageEff 0x00000071001544b4,U,000104, -0x000000710015451c,U,000008,_ZN6Entity9isInWaterEv +0x000000710015451c,O,000008,_ZN6Entity9isInWaterEv 0x0000007100154524,U,000156,_ZN6Entity11isOverWaterEv 0x00000071001545c0,U,000388,_ZN6Entity18updateInWaterStateEv 0x0000007100154744,U,000960,_ZN6Entity19doWaterSplashEffectEv @@ -9932,12 +9932,12 @@ Address,Quality,Size,Name 0x00000071001554f4,U,000056, 0x000000710015552c,U,000004,_ZN6Entity11playerTouchENSt3__110shared_ptrI6PlayerEE 0x0000007100155530,U,000388,_ZN6Entity4pushENSt3__110shared_ptrIS_EE -0x00000071001556b4,U,000044,_ZN6Entity4pushEddd +0x00000071001556b4,O,000044,_ZN6Entity4pushEddd 0x00000071001556e0,U,000008, -0x00000071001556e8,U,000012,_ZN6Entity8markHurtEv +0x00000071001556e8,O,000012,_ZN6Entity8markHurtEv 0x00000071001556f4,U,000080,_ZN6Entity4hurtEP12DamageSourcef 0x0000007100155744,O,000060,_ZN6Entity13getViewVectorEf -0x0000007100155780,U,000136,_ZN6Entity19calculateViewVectorEff +0x0000007100155780,O,000136,_ZN6Entity19calculateViewVectorEff 0x0000007100155808,U,000172, 0x00000071001558b4,U,001372, 0x0000007100155e10,U,000008,_ZN6Entity10isPickableEv @@ -9956,7 +9956,7 @@ Address,Quality,Size,Name 0x00000071001569fc,U,000288, 0x0000007100156b1c,U,000128, 0x0000007100156b9c,U,000020,_ZN6Entity12getAirSupplyEv -0x0000007100156bb0,U,000068,_ZN6Entity13getSharedFlagEi +0x0000007100156bb0,O,000068,_ZN6Entity13getSharedFlagEi 0x0000007100156bf4,U,002468,_ZN6Entity4loadEP11CompoundTag 0x0000007100157598,U,000032,_ZN6Entity12setAirSupplyEi 0x00000071001575b8,U,000008,_ZN6Entity25repositionEntityAfterLoadEv @@ -9965,9 +9965,9 @@ Address,Quality,Size,Name 0x00000071001575dc,U,000016,_ZN6Entity15spawnAtLocationEP4Itemi 0x00000071001575ec,U,000152,_ZN6Entity15spawnAtLocationEP4Itemif 0x0000007100157684,U,000272,_ZN6Entity15spawnAtLocationE12not_null_ptrI12ItemInstanceEf -0x0000007100157794,U,000100,_ZNK12ItemInstance7isEmptyEv +0x0000007100157794,O,000100,_ZNK12ItemInstance7isEmptyEv 0x00000071001577f8,U,000012, -0x0000007100157804,U,000016,_ZN6Entity7isAliveEv +0x0000007100157804,O,000016,_ZN6Entity7isAliveEv 0x0000007100157814,U,000524,_ZN6Entity8isInWallEv 0x0000007100157a20,U,000008,_ZN6Entity8interactERKNSt3__110shared_ptrI6PlayerEEN15InteractionHand16EInteractionHandE 0x0000007100157a28,U,000008,_ZN6Entity20getCollideAgainstBoxENSt3__110shared_ptrIS_EE @@ -9980,7 +9980,7 @@ Address,Quality,Size,Name 0x0000007100157da8,U,000508,_ZN6Entity11startRidingENSt3__110shared_ptrIS_EEb 0x0000007100157fa4,U,000324,_ZN6Entity18GetInteractTooltipERK23EntityTooltipDataHolder 0x00000071001580e8,U,000032,_ZN4Item5getIdEv -0x0000007100158108,U,000032,_ZNK12ItemInstance7getItemEv +0x0000007100158108,O,000032,_ZNK12ItemInstance7getItemEv 0x0000007100158128,U,000184,_ZN12ItemInstance18hasCustomHoverNameEv 0x00000071001581e0,U,000656,_ZN12ItemInstance12getHoverNameEv 0x0000007100158470,U,000024,_ZN6Entity13GetHitTooltipERK23EntityTooltipDataHolder @@ -10000,14 +10000,14 @@ Address,Quality,Size,Name 0x0000007100158d18,U,000032, 0x0000007100158d38,U,000004, 0x0000007100158d3c,U,000040,_ZN6Entity15canAddPassengerENSt3__110shared_ptrIS_EE -0x0000007100158d64,U,000068,_ZN6Entity6lerpToEdddffib +0x0000007100158d64,O,000068,_ZN6Entity6lerpToEdddffib 0x0000007100158da8,U,000008,_ZN6Entity13getPickRadiusEv 0x0000007100158db0,U,000008,_ZN6Entity12getLookAngleEv 0x0000007100158db8,U,000008,_ZN6Entity17getRotationVectorEv 0x0000007100158dc0,U,000028,_ZN6Entity10getForwardEv 0x0000007100158ddc,U,000552,_ZN6Entity18handleInsidePortalERK8BlockPos 0x0000007100159004,U,000008,_ZN6Entity25getDimensionChangingDelayEv -0x000000710015900c,U,000016,_ZN6Entity10lerpMotionEddd +0x000000710015900c,O,000016,_ZN6Entity10lerpMotionEddd 0x000000710015901c,U,000108,_ZN6Entity17handleEntityEventEhi 0x0000007100159088,U,000024,_ZN4Item4byIdEi 0x00000071001590a0,U,000004,_ZN6Entity11animateHurtEv @@ -10015,33 +10015,33 @@ Address,Quality,Size,Name 0x00000071001590ac,U,000008,_ZN6Entity13getArmorSlotsEv 0x00000071001590b4,U,000384,_ZN6Entity11getAllSlotsEv 0x0000007100159234,U,000004,_ZN6Entity11setItemSlotEPK13EquipmentSlot12not_null_ptrI12ItemInstanceE -0x0000007100159238,U,000092,_ZN6Entity8isOnFireEv -0x0000007100159294,U,000016,_ZN6Entity11isPassengerEv +0x0000007100159238,O,000092,_ZN6Entity8isOnFireEv +0x0000007100159294,O,000016,_ZN6Entity11isPassengerEv 0x00000071001592a4,U,000040,_ZN6Entity9isVehicleEv -0x00000071001592cc,U,000008,_ZN6Entity10isSneakingEv -0x00000071001592d4,U,000012,_ZN6Entity11setSneakingEb -0x00000071001592e0,U,000008,_ZN6Entity6isIdleEv -0x00000071001592e8,U,000012,_ZN6Entity9setIsIdleEb -0x00000071001592f4,U,000008,_ZN6Entity11isSprintingEv -0x00000071001592fc,U,000012,_ZN6Entity12setSprintingEb -0x0000007100159308,U,000044,_ZN6Entity9isGlowingEv -0x0000007100159334,U,000032,_ZN6Entity10setGlowingEb -0x0000007100159354,U,000008,_ZN6Entity11isInvisibleEv +0x00000071001592cc,O,000008,_ZN6Entity10isSneakingEv +0x00000071001592d4,O,000012,_ZN6Entity11setSneakingEb +0x00000071001592e0,O,000008,_ZN6Entity6isIdleEv +0x00000071001592e8,O,000012,_ZN6Entity9setIsIdleEb +0x00000071001592f4,O,000008,_ZN6Entity11isSprintingEv +0x00000071001592fc,O,000012,_ZN6Entity12setSprintingEb +0x0000007100159308,O,000044,_ZN6Entity9isGlowingEv +0x0000007100159334,O,000032,_ZN6Entity10setGlowingEb +0x0000007100159354,O,000008,_ZN6Entity11isInvisibleEv 0x000000710015935c,U,000076,_ZN6Entity13isInvisibleToENSt3__110shared_ptrI6PlayerEE 0x00000071001593a8,U,000168,_ZN6Entity7getTeamEv 0x0000007100159450,U,000068,_ZN6Entity10isAlliedToENSt3__110shared_ptrIS_EE 0x0000007100159494,U,000088,_ZN6Entity10isAlliedToEP4Team -0x00000071001594ec,U,000012,_ZN6Entity12setInvisibleEb +0x00000071001594ec,O,000012,_ZN6Entity12setInvisibleEb 0x00000071001594f8,U,000008,_ZN6Entity18ShouldRenderShadowEv 0x0000007100159500,U,000008,_ZN6Entity6canFlyEv -0x0000007100159508,U,000080,_ZN6Entity6getPosEf +0x0000007100159508,O,000080,_ZN6Entity6getPosEf 0x0000007100159558,U,000208,_ZN6Entity12getAttachPosEN6Entity15EEntityLocationEf 0x0000007100159628,U,000008,_ZN6Entity10isWeakenedEv 0x0000007100159630,U,000012,_ZN6Entity11setWeakenedEb 0x000000710015963c,U,000100,_ZN6Entity10thunderHitEPK13LightningBolt 0x00000071001596a0,U,000004,_ZN6Entity6killedENSt3__110shared_ptrI12LivingEntityEE 0x00000071001596a4,U,000844,_ZN6Entity12checkInBlockEddd -0x00000071001599f0,U,000032,_ZN6Entity14makeStuckInWebEv +0x00000071001599f0,O,000032,_ZN6Entity14makeStuckInWebEv 0x0000007100159a10,U,000112,_ZN6Entity7getNameEv 0x0000007100159a80,U,000104,_ZN6Entity16isInvulnerableToEP12DamageSource 0x0000007100159ae8,U,000008,_ZN6Entity14isInvulnerableEv @@ -10135,7 +10135,7 @@ Address,Quality,Size,Name 0x000000710015b14c,U,000004,_ZN6Entity19setDespawnProtectedEv 0x000000710015b150,U,000008,_ZN6Entity11couldWanderEv 0x000000710015b158,U,000008,_ZN6Entity18canCreateParticlesEv -0x000000710015b160,U,000036,_ZN6Entity15stopCurrentLerpEv +0x000000710015b160,O,000036,_ZN6Entity15stopCurrentLerpEv 0x000000710015b184,U,000092, 0x000000710015b1e0,U,000008,_ZN6Entity18getFireImmuneTicksEv 0x000000710015b1e8,O,000144,_ZN18EntityDamageSourceC1EN21ClientboundChatPacket18EChatPacketMessageES1_NSt3__110shared_ptrI6EntityEE @@ -10177,7 +10177,7 @@ Address,Quality,Size,Name 0x000000710015b9a4,O,000008,_ZNK21EntityDataSerializers34ITEM_INSTANCE_EntityDataSerializer4readEP15DataInputStream 0x000000710015b9ac,O,000012,_ZN21EntityDataSerializers34ITEM_INSTANCE_EntityDataSerializer14createAccessorEi 0x000000710015b9b8,O,000008,_ZNK21EntityDataSerializers34ITEM_INSTANCE_EntityDataSerializer4copyE12not_null_ptrI12ItemInstanceE -0x000000710015b9c0,U,000108,_ZNK12ItemInstance4copyEv +0x000000710015b9c0,O,000108,_ZNK12ItemInstance4copyEv 0x000000710015ba2c,O,000048,_ZN21EntityDataSerializers32BLOCK_STATE_EntityDataSerializerC1EN24EntityDataSerializerEnum21EEntityDataSerializerE 0x000000710015ba5c,O,000040,_ZN20EntityDataSerializerIPK10BlockStateEC2EN24EntityDataSerializerEnum21EEntityDataSerializerE 0x000000710015ba84,O,000060,_ZNK21EntityDataSerializers32BLOCK_STATE_EntityDataSerializer5writeEP16DataOutputStreamPK10BlockState @@ -10229,10 +10229,10 @@ Address,Quality,Size,Name 0x000000710015c518,U,005456,makeIdMap 0x000000710015da68,U,000008, 0x000000710015da70,U,000208, -0x000000710015db40,U,000124, -0x000000710015dbbc,U,000160, +0x000000710015db40,O,000124,_ZN8EntityIO12SpawnEggInfoC1EjRK16ResourceLocationii +0x000000710015dbbc,O,000160,_ZN8EntityIO11registerEggEjNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEEii 0x000000710015dc5c,U,000604, -0x000000710015deb8,U,000076, +0x000000710015deb8,O,000076,_ZN8EntityIO12SpawnEggInfoC1ERKS0_ 0x000000710015df04,U,000004, 0x000000710015df08,U,000004, 0x000000710015df0c,U,000004, @@ -10246,93 +10246,93 @@ Address,Quality,Size,Name 0x000000710015e114,U,000656, 0x000000710015e3a4,U,000076, 0x000000710015e3f0,U,000016, -0x000000710015e400,U,000028, +0x000000710015e400,O,000028,_ZNK12MinecartType7getNameEv 0x000000710015e41c,U,000096, -0x000000710015e47c,U,001452, -0x000000710015ea28,U,014824,_ZN8EntityIO9bootStrapEv -0x0000007100162410,U,000052, -0x0000007100162444,U,000052, -0x0000007100162478,U,000052, -0x00000071001624ac,U,000052, -0x00000071001624e0,U,000052, -0x0000007100162514,U,000052, -0x0000007100162548,U,000052, -0x000000710016257c,U,000052, -0x00000071001625b0,U,000052, -0x00000071001625e4,U,000052, -0x0000007100162618,U,000052, -0x000000710016264c,U,000052, -0x0000007100162680,U,000052, -0x00000071001626b4,U,000052, -0x00000071001626e8,U,000052, -0x000000710016271c,U,000052, -0x0000007100162750,U,000052, -0x0000007100162784,U,000052, -0x00000071001627b8,U,000052, -0x00000071001627ec,U,000052, -0x0000007100162820,U,000052, -0x0000007100162854,U,000052, -0x0000007100162888,U,000052, -0x00000071001628bc,U,000052, -0x00000071001628f0,U,000052, -0x0000007100162924,U,000052, -0x0000007100162958,U,000052, -0x000000710016298c,U,000052, -0x00000071001629c0,U,000052, -0x00000071001629f4,U,000052, -0x0000007100162a28,U,000052, -0x0000007100162a5c,U,000052, -0x0000007100162a90,U,000052, -0x0000007100162ac4,U,000052, -0x0000007100162af8,U,000052, -0x0000007100162b2c,U,000052, -0x0000007100162b60,U,000052, -0x0000007100162b94,U,000052, -0x0000007100162bc8,U,000052, -0x0000007100162bfc,U,000052, -0x0000007100162c30,U,000052, -0x0000007100162c64,U,000052, -0x0000007100162c98,U,000052, -0x0000007100162ccc,U,000052, -0x0000007100162d00,U,000052, -0x0000007100162d34,U,000052, -0x0000007100162d68,U,000052, -0x0000007100162d9c,U,000052, -0x0000007100162dd0,U,000052, -0x0000007100162e04,U,000052, -0x0000007100162e38,U,000052, -0x0000007100162e6c,U,000052, -0x0000007100162ea0,U,000052, -0x0000007100162ed4,U,000052, -0x0000007100162f08,U,000052, -0x0000007100162f3c,U,000052, -0x0000007100162f70,U,000052, -0x0000007100162fa4,U,000052, -0x0000007100162fd8,U,000052, -0x000000710016300c,U,000052, -0x0000007100163040,U,000052, -0x0000007100163074,U,000052, -0x00000071001630a8,U,000056, -0x00000071001630e0,U,000052, -0x0000007100163114,U,000052, -0x0000007100163148,U,000052, -0x000000710016317c,U,000056, -0x00000071001631b4,U,000052, -0x00000071001631e8,U,000052, -0x000000710016321c,U,000052, -0x0000007100163250,U,000052, -0x0000007100163284,U,000052, -0x00000071001632b8,U,000052, -0x00000071001632ec,U,000052, -0x0000007100163320,U,000052, -0x0000007100163354,U,000052, -0x0000007100163388,U,000052, -0x00000071001633bc,U,000052, -0x00000071001633f0,U,000052, -0x0000007100163424,U,000052, -0x0000007100163458,U,000052, -0x000000710016348c,U,000052, -0x00000071001634c0,U,000008, +0x000000710015e47c,U,001452,_ZN8EntityIO14registerEntityEPFP6EntityP5LevelEiRKNSt3__112basic_stringIwNS6_11char_traitsIwEENS6_9allocatorIwEEEE11eINSTANCEOFSE_ +0x000000710015ea28,O,014824,_ZN8EntityIO9bootStrapEv +0x0000007100162410,U,000052,_ZN17EntityIOFactories10createItemEP5Level +0x0000007100162444,U,000052,_ZN17EntityIOFactories11createXpOrbEP5Level +0x0000007100162478,U,000052,_ZN17EntityIOFactories21createAreaEffectCloudEP5Level +0x00000071001624ac,U,000052,_ZN17EntityIOFactories19createElderGuardianEP5Level +0x00000071001624e0,U,000052,_ZN17EntityIOFactories20createWitherSkeletonEP5Level +0x0000007100162514,U,000052,_ZN17EntityIOFactories11createStrayEP5Level +0x0000007100162548,U,000052,_ZN17EntityIOFactories9createEggEP5Level +0x000000710016257c,U,000052,_ZN17EntityIOFactories15createLeashKnotEP5Level +0x00000071001625b0,U,000052,_ZN17EntityIOFactories14createPaintingEP5Level +0x00000071001625e4,U,000052,_ZN17EntityIOFactories11createArrowEP5Level +0x0000007100162618,U,000052,_ZN17EntityIOFactories14createSnowballEP5Level +0x000000710016264c,U,000052,_ZN17EntityIOFactories14createFireballEP5Level +0x0000007100162680,U,000052,_ZN17EntityIOFactories19createSmallFireballEP5Level +0x00000071001626b4,U,000052,_ZN17EntityIOFactories16createEnderPearlEP5Level +0x00000071001626e8,U,000052,_ZN17EntityIOFactories22createEyeOfEnderSignalEP5Level +0x000000710016271c,U,000052,_ZN17EntityIOFactories12createPotionEP5Level +0x0000007100162750,U,000052,_ZN17EntityIOFactories14createXpBottleEP5Level +0x0000007100162784,U,000052,_ZN17EntityIOFactories15createItemFrameEP5Level +0x00000071001627b8,U,000052,_ZN17EntityIOFactories17createWitherSkullEP5Level +0x00000071001627ec,U,000052,_ZN17EntityIOFactories9createTntEP5Level +0x0000007100162820,U,000052,_ZN17EntityIOFactories18createFallingBlockEP5Level +0x0000007100162854,U,000052,_ZN17EntityIOFactories21createFireworksRocketEP5Level +0x0000007100162888,U,000052,_ZN17EntityIOFactories10createHuskEP5Level +0x00000071001628bc,U,000052,_ZN17EntityIOFactories19createSpectralArrowEP5Level +0x00000071001628f0,U,000052,_ZN17EntityIOFactories19createShulkerBulletEP5Level +0x0000007100162924,U,000052,_ZN17EntityIOFactories20createDragonFireballEP5Level +0x0000007100162958,U,000052,_ZN17EntityIOFactories20createZombieVillagerEP5Level +0x000000710016298c,U,000052,_ZN17EntityIOFactories19createSkeletonHorseEP5Level +0x00000071001629c0,U,000052,_ZN17EntityIOFactories17createZombieHorseEP5Level +0x00000071001629f4,U,000052,_ZN17EntityIOFactories16createArmorStandEP5Level +0x0000007100162a28,U,000052,_ZN17EntityIOFactories12createDonkeyEP5Level +0x0000007100162a5c,U,000052,_ZN17EntityIOFactories10createMuleEP5Level +0x0000007100162a90,U,000052,_ZN17EntityIOFactories20createEvocationFangsEP5Level +0x0000007100162ac4,U,000052,_ZN17EntityIOFactories22createEvocationIllagerEP5Level +0x0000007100162af8,U,000052,_ZN17EntityIOFactories9createVexEP5Level +0x0000007100162b2c,U,000052,_ZN17EntityIOFactories24createVindicationIllagerEP5Level +0x0000007100162b60,U,000052,_ZN17EntityIOFactories21createIllusionIllagerEP5Level +0x0000007100162b94,U,000052,_ZN17EntityIOFactories10createBoatEP5Level +0x0000007100162bc8,U,000052,_ZN17EntityIOFactories14createMinecartEP5Level +0x0000007100162bfc,U,000052,_ZN17EntityIOFactories19createChestMinecartEP5Level +0x0000007100162c30,U,000052,_ZN17EntityIOFactories21createFurnaceMinecartEP5Level +0x0000007100162c64,U,000052,_ZN17EntityIOFactories17createTntMinecartEP5Level +0x0000007100162c98,U,000052,_ZN17EntityIOFactories20createHopperMinecartEP5Level +0x0000007100162ccc,U,000052,_ZN17EntityIOFactories21createSpawnerMinecartEP5Level +0x0000007100162d00,U,000052,_ZN17EntityIOFactories13createCreeperEP5Level +0x0000007100162d34,U,000052,_ZN17EntityIOFactories14createSkeletonEP5Level +0x0000007100162d68,U,000052,_ZN17EntityIOFactories12createSpiderEP5Level +0x0000007100162d9c,U,000052,_ZN17EntityIOFactories11createGiantEP5Level +0x0000007100162dd0,U,000052,_ZN17EntityIOFactories12createZombieEP5Level +0x0000007100162e04,U,000052,_ZN17EntityIOFactories11createSlimeEP5Level +0x0000007100162e38,U,000052,_ZN17EntityIOFactories11createGhastEP5Level +0x0000007100162e6c,U,000052,_ZN17EntityIOFactories18createZombiePigmanEP5Level +0x0000007100162ea0,U,000052,_ZN17EntityIOFactories14createEndermanEP5Level +0x0000007100162ed4,U,000052,_ZN17EntityIOFactories16createCaveSpiderEP5Level +0x0000007100162f08,U,000052,_ZN17EntityIOFactories16createSilverfishEP5Level +0x0000007100162f3c,U,000052,_ZN17EntityIOFactories11createBlazeEP5Level +0x0000007100162f70,U,000052,_ZN17EntityIOFactories15createMagmaCubeEP5Level +0x0000007100162fa4,U,000052,_ZN17EntityIOFactories17createEnderDragonEP5Level +0x0000007100162fd8,U,000052,_ZN17EntityIOFactories12createWitherEP5Level +0x000000710016300c,U,000052,_ZN17EntityIOFactories9createBatEP5Level +0x0000007100163040,U,000052,_ZN17EntityIOFactories11createWitchEP5Level +0x0000007100163074,U,000052,_ZN17EntityIOFactories15createEndermiteEP5Level +0x00000071001630a8,U,000056,_ZN17EntityIOFactories14createGuardianEP5Level +0x00000071001630e0,U,000052,_ZN17EntityIOFactories13createShulkerEP5Level +0x0000007100163114,U,000052,_ZN17EntityIOFactories9createPigEP5Level +0x0000007100163148,U,000052,_ZN17EntityIOFactories11createSheepEP5Level +0x000000710016317c,U,000056,_ZN17EntityIOFactories9createCowEP5Level +0x00000071001631b4,U,000052,_ZN17EntityIOFactories13createChickenEP5Level +0x00000071001631e8,U,000052,_ZN17EntityIOFactories11createSquidEP5Level +0x000000710016321c,U,000052,_ZN17EntityIOFactories10createWolfEP5Level +0x0000007100163250,U,000052,_ZN17EntityIOFactories15createMooshroomEP5Level +0x0000007100163284,U,000052,_ZN17EntityIOFactories13createSnowmanEP5Level +0x00000071001632b8,U,000052,_ZN17EntityIOFactories12createOcelotEP5Level +0x00000071001632ec,U,000052,_ZN17EntityIOFactories19createVillagerGolemEP5Level +0x0000007100163320,U,000052,_ZN17EntityIOFactories11createHorseEP5Level +0x0000007100163354,U,000052,_ZN17EntityIOFactories12createRabbitEP5Level +0x0000007100163388,U,000052,_ZN17EntityIOFactories15createPolarBearEP5Level +0x00000071001633bc,U,000052,_ZN17EntityIOFactories11createLlamaEP5Level +0x00000071001633f0,U,000052,_ZN17EntityIOFactories15createLlamaSpitEP5Level +0x0000007100163424,U,000052,_ZN17EntityIOFactories12createParrotEP5Level +0x0000007100163458,U,000052,_ZN17EntityIOFactories14createVillagerEP5Level +0x000000710016348c,U,000052,_ZN17EntityIOFactories18createEnderCrystalEP5Level +0x00000071001634c0,O,000008,_ZN8EntityIO12SpawnEggInfoD2Ev 0x00000071001634c8,U,000056,_ZN20EntityPropertyOnFireC_gen 0x0000007100163500,U,000020,_ZN14EntityPropertyC1Ev 0x0000007100163514,U,000060, @@ -10438,15 +10438,15 @@ Address,Quality,Size,Name 0x0000007100166af4,U,000008, 0x0000007100166afc,U,000016, 0x0000007100166b0c,U,000016, -0x0000007100166b1c,U,000048,_ZN20ExperienceBottleItemC_gen +0x0000007100166b1c,O,000048,_ZN20ExperienceBottleItemC1Ev 0x0000007100166b4c,O,000360,_ZN4ItemC2Ev 0x0000007100166cb4,U,000008,_ZN20ExperienceBottleItem6isFoilE12not_null_ptrI12ItemInstanceE 0x0000007100166cbc,U,000008,_ZN20ExperienceBottleItem7TestUseEP5LevelNSt3__110shared_ptrI6PlayerEEN15InteractionHand16EInteractionHandE 0x0000007100166cc4,U,000604,_ZN20ExperienceBottleItem3useEP5LevelNSt3__110shared_ptrI6PlayerEEN15InteractionHand16EInteractionHandE -0x0000007100166f20,U,000008,_ZN12ItemInstance6shrinkEi +0x0000007100166f20,O,000008,_ZN12ItemInstance6shrinkEi 0x0000007100166f28,U,000216,_ZNSt3__120__shared_ptr_pointerIP15ThrownExpBottleNS_14default_deleteIS1_EENS_9allocatorIS1_EEEC_gen 0x0000007100167000,U,000016, -0x0000007100167010,U,000208,_ZN12GenericStats15param_itemsUsedENSt3__110shared_ptrI6PlayerEE12not_null_ptrI12ItemInstanceE +0x0000007100167010,O,000208,_ZN12GenericStats15param_itemsUsedENSt3__110shared_ptrI6PlayerEE12not_null_ptrI12ItemInstanceE 0x00000071001670e0,U,000024,_ZN20ExperienceBottleItem13GetUseTooltipERK21ItemToolTipDataHolder 0x00000071001670f8,U,000008,_ZN17ExperienceCommand5getIdEv 0x0000007100167100,U,000008,_ZN17ExperienceCommand18getPermissionLevelEv @@ -10465,9 +10465,9 @@ Address,Quality,Size,Name 0x00000071001679b0,U,000236, 0x0000007100167a9c,U,000248, 0x0000007100167b94,U,000356,_ZN13ExperienceOrb11playerTouchENSt3__110shared_ptrI6PlayerEE -0x0000007100167cf8,U,000056,_ZN12ItemInstance9isDamagedEv +0x0000007100167cf8,O,000056,_ZN12ItemInstance9isDamagedEv 0x0000007100167d30,U,000008, -0x0000007100167d38,U,000008,_ZN12ItemInstance14getDamageValueEv +0x0000007100167d38,O,000008,_ZN12ItemInstance14getDamageValueEv 0x0000007100167d40,U,000016, 0x0000007100167d50,U,000012,_ZN12ItemInstance11setAuxValueEi 0x0000007100167d5c,U,000008, @@ -10745,16 +10745,16 @@ Address,Quality,Size,Name 0x00000071001744e8,O,000008,_ZN9FireBlock14getRenderShapeEPK10BlockState 0x00000071001744f0,O,000012,_ZN9FireBlock15getTextureLayerEi 0x00000071001744fc,O,000008,_ZN9FireBlock10getTextureEPK9DirectionPK10BlockState -0x0000007100174504,U,000052,_ZN14FireChargeItemC_gen +0x0000007100174504,U,000052,_ZN14FireChargeItemC1Ev 0x0000007100174538,U,000556,_ZN14FireChargeItem5useOnENSt3__110shared_ptrI6PlayerEEP5LevelRK8BlockPosN15InteractionHand16EInteractionHandEPK9Directionfffb 0x0000007100174764,U,000020,_ZN14FireChargeItem7getIconEi 0x0000007100174778,O,000008,_ZN4Item7getIconEi 0x0000007100174780,U,000124,_ZN14FireChargeItem13registerIconsEP12IconRegister 0x00000071001747fc,O,000056,_ZN4Item13registerIconsEP12IconRegister -0x0000007100174834,U,000048,_ZN18FireworkChargeItemC_gen +0x0000007100174834,U,000048,_ZN18FireworkChargeItemC1Ev 0x0000007100174864,U,000088, -0x00000071001748bc,U,000032,_ZN12ItemInstance6hasTagEv -0x00000071001748dc,U,000008,_ZN12ItemInstance6getTagEv +0x00000071001748bc,O,000032,_ZN12ItemInstance6hasTagEv +0x00000071001748dc,O,000008,_ZN12ItemInstance6getTagEv 0x00000071001748e4,U,000084,_ZN18FireworkChargeItem15appendHoverTextE12not_null_ptrI12ItemInstanceENSt3__110shared_ptrI6PlayerEEPvb 0x0000007100174938,U,002148, 0x000000710017519c,U,000020,_ZN18FireworkChargeItem12getLayerIconEii @@ -10762,7 +10762,7 @@ Address,Quality,Size,Name 0x00000071001751bc,U,000008,_ZN18FireworkChargeItem23hasMultipleSpriteLayersEv 0x00000071001751c4,U,000152,_ZN18FireworkChargeItem13registerIconsEP12IconRegister 0x000000710017525c,U,000012,_ZN4Item11getIconNameEv -0x0000007100175268,U,000048,_ZN13FireworksItemC_gen +0x0000007100175268,O,000048,_ZN13FireworksItemC1Ev 0x0000007100175298,U,000468,_ZN13FireworksItem5useOnENSt3__110shared_ptrI6PlayerEEP5LevelRK8BlockPosN15InteractionHand16EInteractionHandEPK9Directionfffb 0x000000710017546c,U,000216,_ZNSt3__120__shared_ptr_pointerIP21FireworksRocketEntityNS_14default_deleteIS1_EENS_9allocatorIS1_EEEC_gen 0x0000007100175544,U,000108, @@ -10777,7 +10777,7 @@ Address,Quality,Size,Name 0x00000071001764d8,U,000200, 0x00000071001765a0,U,000148, 0x0000007100176634,U,000996, -0x0000007100176a18,U,000024,_ZN12ItemInstance8getCountEv +0x0000007100176a18,O,000024,_ZN12ItemInstance8getCountEv 0x0000007100176a30,U,000104, 0x0000007100176a98,U,000120, 0x0000007100176b10,U,000368, @@ -10789,9 +10789,9 @@ Address,Quality,Size,Name 0x0000007100176d88,U,000048, 0x0000007100176db8,U,000048,_ZN15FireworksRecipeC_gen 0x0000007100176de8,U,002524, -0x00000071001777c4,U,000056,_ZN12ItemInstance6setTagEP11CompoundTag -0x00000071001777fc,U,000008,_ZNK12ItemInstance11getAuxValueEv -0x0000007100177804,U,000008,_ZN12ItemInstance8setCountEi +0x00000071001777c4,O,000056,_ZN12ItemInstance6setTagEP11CompoundTag +0x00000071001777fc,O,000008,_ZNK12ItemInstance11getAuxValueEv +0x0000007100177804,O,000008,_ZN12ItemInstance8setCountEi 0x000000710017780c,U,000052, 0x0000007100177840,U,000008, 0x0000007100177848,U,000036, @@ -10826,12 +10826,12 @@ Address,Quality,Size,Name 0x0000007100179164,U,000172, 0x0000007100179210,U,000140,_ZN21FireworksRocketEntity14addDataWalkersEP14DataFixerUpper 0x000000710017929c,U,000312, -0x00000071001793d4,U,000380,_ZN12ItemInstance4saveEP11CompoundTag +0x00000071001793d4,O,000380,_ZN12ItemInstance4saveEP11CompoundTag 0x0000007100179550,U,000348, 0x00000071001796ac,U,000008,_ZN21FireworksRocketEntity12isAttackableEv 0x00000071001796b4,U,000028,_ZNK21FireworksRocketEntity8getOwnerEv -0x00000071001796d0,U,000068,_ZN12FishFoodItemC_gen -0x0000007100179714,U,000092,_ZN8FoodItemC1Eifb +0x00000071001796d0,U,000068,_ZN12FishFoodItemC1Eb +0x0000007100179714,O,000092,_ZN8FoodItemC1Eifb 0x0000007100179770,U,000004,_ZN12FishFoodItemD2Ev 0x0000007100179774,U,000036,_ZN12FishFoodItemD0Ev 0x0000007100179798,U,000104, @@ -10891,9 +10891,9 @@ Address,Quality,Size,Name 0x000000710017bc0c,U,000008, 0x000000710017bc14,U,000092, 0x000000710017bc70,U,000028, -0x000000710017bc8c,U,000180,_ZN14FishingRodItemC_gen +0x000000710017bc8c,U,000180,_ZN14FishingRodItemC1Ev 0x000000710017bd40,U,000236,_ZN4Item12setMaxDamageEi -0x000000710017be2c,U,000008, +0x000000710017be2c,O,000008,_ZN4Item15setMaxStackSizeEi 0x000000710017be34,U,000088,_ZN4Item11addPropertyE16ResourceLocationPK20ItemPropertyFunction 0x000000710017be8c,U,000048,_ZN14FishingRodItem35FishingRodItem_ItemPropertyFunctionC_gen 0x000000710017bebc,U,000008,_ZN14FishingRodItem14isHandEquippedEv @@ -11082,7 +11082,7 @@ Address,Quality,Size,Name 0x0000007100182790,U,000188, 0x000000710018284c,O,000416,_ZN14FlexiblePacket5writeEP16DataOutputStream 0x00000071001829ec,O,000144,_ZN14FlexiblePacket16getEstimatedSizeEv -0x0000007100182a7c,U,000064,_ZN17FlintAndSteelItemC_gen +0x0000007100182a7c,O,000064,_ZN17FlintAndSteelItemC1Ev 0x0000007100182abc,U,000636,_ZN17FlintAndSteelItem5useOnENSt3__110shared_ptrI6PlayerEEP5LevelRK8BlockPosN15InteractionHand16EInteractionHandEPK9Directionfffb 0x0000007100182d38,U,000028, 0x0000007100182d54,U,000028, @@ -11141,7 +11141,7 @@ Address,Quality,Size,Name 0x0000007100183784,U,000084,_ZN11FlowerBlock8getShapeEPK10BlockStateP11LevelSourceRK8BlockPos 0x00000071001837d8,U,000052,_ZN11FlowerBlock25getSpawnResourcesAuxValueEPK10BlockState 0x000000710018380c,U,000040, -0x0000007100183834,U,000008, +0x0000007100183834,O,000008,_ZN11FlowerBlock6Flower7getDataEv 0x000000710018383c,U,000104,_ZN11FlowerBlock13getBlockStateEi 0x00000071001838a4,U,000072, 0x00000071001838ec,U,000148,_ZN11FlowerBlock17getFlowerPropertyEv @@ -11155,8 +11155,8 @@ Address,Quality,Size,Name 0x0000007100183dcc,U,000012, 0x0000007100183dd8,U,000012, 0x0000007100183de4,U,000012, -0x0000007100183df0,U,000008, -0x0000007100183df8,U,000008, +0x0000007100183df0,U,000008,_ZN11FlowerBlock6Flower9getNameIdEv +0x0000007100183df8,U,000008,_ZN11FlowerBlock6Flower16getDescriptionIdEv 0x0000007100183e00,U,000008, 0x0000007100183e08,U,000056, 0x0000007100183e40,U,000008, @@ -11304,22 +11304,22 @@ Address,Quality,Size,Name 0x000000710018a3c0,O,000088,_ZN13FoodConstants14ExhaustionSwimEv 0x000000710018a418,O,000080,_ZN13FoodConstants14ExhaustionIdleEv 0x000000710018a468,O,000056,_ZN8FoodDataC1Ev -0x000000710018a4a0,U,000136,_ZN8FoodData3eatEif -0x000000710018a528,U,000156,_ZN8FoodData3eatEP8FoodItemRK12not_null_ptrI12ItemInstanceE -0x000000710018a5c4,U,000776,_ZN8FoodData13addExhaustionEf -0x000000710018a8cc,U,000092,_ZN8FoodData4tickERKNSt3__110shared_ptrI6PlayerEE +0x000000710018a4a0,O,000136,_ZN8FoodData3eatEif +0x000000710018a528,O,000156,_ZN8FoodData3eatEP8FoodItemRK12not_null_ptrI12ItemInstanceE +0x000000710018a5c4,O,000776,_ZN8FoodData4tickERKNSt3__110shared_ptrI6PlayerEE +0x000000710018a8cc,O,000092,_ZN8FoodData13addExhaustionEf 0x000000710018a928,O,000372,_ZN8FoodData22readAdditionalSaveDataEP11CompoundTag 0x000000710018aa9c,O,000300,_ZN8FoodData21addAdditionalSaveDataEP11CompoundTag 0x000000710018abc8,O,000008,_ZN8FoodData12getFoodLevelEv 0x000000710018abd0,O,000008,_ZN8FoodData16getLastFoodLevelEv -0x000000710018abd8,U,000040,_ZN8FoodData10needsFoodEv +0x000000710018abd8,O,000040,_ZN8FoodData9needsFoodEv 0x000000710018ac00,O,000040,_ZN8FoodData10isStarvingEv -0x000000710018ac28,U,000008,_ZN8FoodData12getSaturationLevelEv +0x000000710018ac28,O,000008,_ZN8FoodData18getSaturationLevelEv 0x000000710018ac30,O,000008,_ZN8FoodData12setFoodLevelEi 0x000000710018ac38,O,000008,_ZN8FoodData13setSaturationEf 0x000000710018ac40,O,000008,_ZN8FoodData13setExhaustionEf -0x000000710018ac48,U,000016, -0x000000710018ac58,U,000084,_ZN8FoodItemC1Eib +0x000000710018ac48,O,000016,_ZN8FoodItem11initEffectsEv +0x000000710018ac58,O,000084,_ZN8FoodItemC1Eib 0x000000710018acac,U,000712,_ZN8FoodItem15finishUsingItemE12not_null_ptrI12ItemInstanceEP5LevelNSt3__110shared_ptrI12LivingEntityEE 0x000000710018af74,U,000024, 0x000000710018af8c,U,000028, @@ -11332,8 +11332,8 @@ Address,Quality,Size,Name 0x000000710018b0e4,U,000112, 0x000000710018b154,U,000112, 0x000000710018b1c4,U,000008, -0x000000710018b1cc,U,000068, -0x000000710018b210,U,000012, +0x000000710018b1cc,O,000068,_ZN8FoodItem9setEffectEP17MobEffectInstancef +0x000000710018b210,O,000012,_ZN8FoodItem12setAlwaysEatEv 0x000000710018b21c,U,001792, 0x000000710018b91c,U,000328,_ZN11ForestBiomeC1EN5Biome9EBiomeIDsEN11ForestBiome5ETypeEPN5Biome15BiomePropertiesE 0x000000710018ba64,U,000208, @@ -11429,7 +11429,7 @@ Address,Quality,Size,Name 0x000000710018eb30,U,000016, 0x000000710018eb40,U,000292, 0x000000710018ec64,U,000096, -0x000000710018ecc4,U,000144,_ZN12ItemInstance10tagMatchesERK12not_null_ptrIS_ES3_ +0x000000710018ecc4,M,000144,_ZN12ItemInstance10tagMatchesERK12not_null_ptrIS_ES3_ 0x000000710018ed54,U,000016, 0x000000710018ed64,U,000104, 0x000000710018edcc,U,000016, @@ -11454,8 +11454,8 @@ Address,Quality,Size,Name 0x000000710018fd8c,U,000016, 0x000000710018fd9c,U,000132, 0x000000710018fe20,U,000088, -0x000000710018fe78,U,000028, -0x000000710018fe94,U,000012, +0x000000710018fe78,O,000028,_ZN12ItemInstance15getMaxStackSizeEv +0x000000710018fe94,O,000012,_ZN12ItemInstance4growEi 0x000000710018fea0,U,000052, 0x000000710018fed4,U,000052, 0x000000710018ff08,U,000052, @@ -11695,7 +11695,7 @@ Address,Quality,Size,Name 0x0000007100196bcc,O,000008,_ZN12GenericStats16get_blocksPlacedEi 0x0000007100196bd4,O,000008,_ZN12GenericStats15get_blocksMinedEi 0x0000007100196bdc,O,000008,_ZN12GenericStats18get_itemsCollectedEii -0x0000007100196be4,U,000008,_ZN12GenericStats14get_armourDyedEGenericStatsFi +0x0000007100196be4,O,000008,_ZN12GenericStats14get_armourDyedEi 0x0000007100196bec,O,000008,_ZN12GenericStats16get_itemsCraftedEi 0x0000007100196bf4,O,000012,_ZN12GenericStats16get_itemsSmeltedEi 0x0000007100196c00,O,000008,_ZN12GenericStats13get_itemsUsedEi @@ -11979,7 +11979,7 @@ Address,Quality,Size,Name 0x0000007100199784,O,000008,_ZN15GiveItemCommand5getIdEv 0x000000710019978c,O,000008,_ZN15GiveItemCommand18getPermissionLevelEv 0x0000007100199794,M,001068,_ZN15GiveItemCommand7executeENSt3__110shared_ptrI13CommandSenderEE15arrayWithLengthIhE -0x0000007100199bc0,U,000076,_ZN9Inventory3addE12not_null_ptrI12ItemInstanceE +0x0000007100199bc0,O,000076,_ZN9Inventory3addE12not_null_ptrI12ItemInstanceE 0x0000007100199c0c,U,000008,_ZN10ItemEntity16setNoPickUpDelayEv 0x0000007100199c14,U,000008,_ZN10ItemEntity8setOwnerERKNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE 0x0000007100199c1c,U,000040,_ZN10ItemEntity12makeFakeItemEv @@ -11998,13 +11998,13 @@ Address,Quality,Size,Name 0x0000007100199f94,U,000076,_ZN21GlazedTerracottaBlock13getBlockStateEi 0x0000007100199fe0,U,000008,_ZN21GlazedTerracottaBlock21getPistonPushReactionEPK10BlockState 0x0000007100199fe8,U,000008,_ZN21GlazedTerracottaBlock14getRenderShapeEPK10BlockState -0x0000007100199ff0,U,000384,_ZN18GlideRingGenerator9BuildRingERNSt3__16vectorI8BlockPosNS0_9allocatorIS2_EEEEPK4AABBNS_14eGlideRingSizeE -0x000000710019a170,U,000260, +0x0000007100199ff0,W,000384,_ZN18GlideRingGenerator9BuildRingERNSt3__16vectorI8BlockPosNS0_9allocatorIS2_EEEEPK4AABBNS_14eGlideRingSizeE +0x000000710019a170,W,000260,_ZN18GlideRingGenerator13appendSegmentERNSt3__16vectorI8BlockPosNS0_9allocatorIS2_EEEERKS2_NS_14eGlideRingSizeEji 0x000000710019a274,U,000120, -0x000000710019a2ec,U,000016,_ZN18GlideRingGenerator7getIconENS_14eGlideRingSizeE -0x000000710019a2fc,U,000256, -0x000000710019a3fc,U,000164, -0x000000710019a4a0,U,000156, +0x000000710019a2ec,O,000016,_ZN18GlideRingGenerator7getIconENS_14eGlideRingSizeE +0x000000710019a2fc,W,000256,_ZN18GlideRingGenerator12orientOffsetERK8BlockPosiii +0x000000710019a3fc,O,000164,_ZN18GlideRingGenerator16horizontalOffsetENS_14eGlideRingSizeEji +0x000000710019a4a0,O,000156,_ZN18GlideRingGenerator14verticalOffsetENS_14eGlideRingSizeEji 0x000000710019a53c,O,000052,_ZN14GlowstoneblockC1EP8Material 0x000000710019a570,O,000084,_ZN14Glowstoneblock28getResourceCountForLootBonusEiP6Random 0x000000710019a5c4,O,000036,_ZN14Glowstoneblock16getResourceCountEP6Random @@ -12034,8 +12034,8 @@ Address,Quality,Size,Name 0x000000710019ad2c,U,000016, 0x000000710019ad3c,U,000012, 0x000000710019ad48,U,000084, -0x000000710019ad9c,U,000060,_ZN15GoldenAppleItemC_gen -0x000000710019add8,U,000012,_ZN4Item16setStackedByDataEb +0x000000710019ad9c,U,000060,_ZN15GoldenAppleItemC1Eifb +0x000000710019add8,O,000012,_ZN4Item16setStackedByDataEb 0x000000710019ade4,U,000092, 0x000000710019ae40,O,000008,_ZN4Item6isFoilE12not_null_ptrI12ItemInstanceE 0x000000710019ae48,U,000052, @@ -12222,7 +12222,7 @@ Address,Quality,Size,Name 0x00000071001a122c,U,000108, 0x00000071001a1298,U,000020, 0x00000071001a12ac,U,000004, -0x00000071001a12b0,U,000056,_ZN17HangingEntityItemC_gen +0x00000071001a12b0,O,000056,_ZN17HangingEntityItemC1E11eINSTANCEOF 0x00000071001a12e8,U,000664,_ZN17HangingEntityItem5useOnENSt3__110shared_ptrI6PlayerEEP5LevelRK8BlockPosN15InteractionHand16EInteractionHandEPK9Directionfffb 0x00000071001a1580,U,000288, 0x00000071001a16a0,U,000016, @@ -12245,8 +12245,8 @@ Address,Quality,Size,Name 0x00000071001a1fd8,U,000260,_ZN8HayBlock13registerIconsEP12IconRegister 0x00000071001a20dc,U,000008,_ZN8HayBlock14getRenderShapeEPK10BlockState 0x00000071001a20e4,U,000024, -0x00000071001a20fc,U,000052,_ZN20HealthBoostMobEffectC_gen -0x00000071001a2130,U,000148, +0x00000071001a20fc,O,000052,_ZN20HealthBoostMobEffectC1Eb16eMinecraftColour +0x00000071001a2130,O,000148,_ZN20HealthBoostMobEffect24removeAttributeModifiersERKNSt3__110shared_ptrI12LivingEntityEEP16BaseAttributeMapi 0x00000071001a21c4,U,000772,_ZN9HellBiomeC1EN5Biome9EBiomeIDsEPN5Biome15BiomePropertiesE 0x00000071001a24c8,U,000048,_ZN18HellBiomeDecoratorC_gen 0x00000071001a24f8,U,000088, @@ -12263,7 +12263,7 @@ Address,Quality,Size,Name 0x00000071001a2e54,U,000152,_ZN9HitResultC1ENSt3__110shared_ptrI6EntityEE 0x00000071001a2eec,U,000212, 0x00000071001a2fc0,U,000140, -0x00000071001a304c,U,000104,_ZN7HoeItemC_gen +0x00000071001a304c,U,000104,_ZN7HoeItemC1EPKN4Item4TierE 0x00000071001a30b4,O,000008,_ZNK4Item4Tier7getUsesEv 0x00000071001a30bc,O,000008,_ZNK4Item4Tier20getAttackDamageBonusEv 0x00000071001a30c4,U,000588,_ZN7HoeItem5useOnENSt3__110shared_ptrI6PlayerEEP5LevelRK8BlockPosN15InteractionHand16EInteractionHandEPK9Directionfffb @@ -12516,7 +12516,7 @@ Address,Quality,Size,Name 0x00000071001ac424,U,000012, 0x00000071001ac430,U,000348, 0x00000071001ac58c,U,000016, -0x00000071001ac59c,U,000104, +0x00000071001ac59c,O,000104,_Z22achievementDescriptionRKNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEEz 0x00000071001ac604,U,000700,_ZN8IceBiomeC1EN5Biome9EBiomeIDsEbPN5Biome15BiomePropertiesE 0x00000071001ac8c0,U,000052,_ZN15IceSpikeFeatureC_gen 0x00000071001ac8f4,U,000012, @@ -12594,9 +12594,9 @@ Address,Quality,Size,Name 0x00000071001afec4,U,000016, 0x00000071001afed4,U,000016, 0x00000071001afee4,U,000128, -0x00000071001aff64,U,000052,_ZN21InstantenousMobEffectC_gen -0x00000071001aff98,U,000008, -0x00000071001affa0,U,000012, +0x00000071001aff64,O,000052,_ZN21InstantenousMobEffectC1Eb16eMinecraftColour +0x00000071001aff98,O,000008,_ZN21InstantenousMobEffect14isInstantenousEv +0x00000071001affa0,O,000012,_ZN21InstantenousMobEffect20isDurationEffectTickEii 0x00000071001affac,O,000088,_ZN11IntArrayTagC2Ev 0x00000071001b0004,O,000080,_ZN11IntArrayTagC2E15arrayWithLengthIiE 0x00000071001b0054,O,000060,_ZN11IntArrayTagD1Ev @@ -12626,7 +12626,7 @@ Address,Quality,Size,Name 0x00000071001b0cd4,U,000076,_ZN16AbstractPropertyIiEC_gen 0x00000071001b0d20,U,000148,_ZN15IntegerPropertyD2Ev 0x00000071001b0db4,U,000036,_ZN15IntegerPropertyD0Ev -0x00000071001b0dd8,U,000008, +0x00000071001b0dd8,O,000008,_ZNK15IntegerProperty17getPossibleValuesEv 0x00000071001b0de0,U,000188, 0x00000071001b0e9c,U,000212, 0x00000071001b0f70,U,000052, @@ -12635,9 +12635,9 @@ Address,Quality,Size,Name 0x00000071001b1034,U,000008,_ZNK15IntegerProperty15getUnboxedValueERKNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE 0x00000071001b103c,U,000204,_ZNSt3__115basic_stringbufIwNS_11char_traitsIwEENS_9allocatorIwEEEC_gen6 0x00000071001b1108,U,000008, -0x00000071001b1110,U,000016, -0x00000071001b1120,U,000032, -0x00000071001b1140,U,000108, +0x00000071001b1110,O,000016,_ZNK15IntegerProperty13getValueCountEv +0x00000071001b1120,O,000032,_ZNK15IntegerProperty15getValueAtIndexEj +0x00000071001b1140,O,000108,_ZNK15IntegerProperty16getIndexForValueEP5Boxed 0x00000071001b11ac,U,000056,_ZN12InteractGoalC_gen 0x00000071001b11e4,O,000048,_ZN6IntTagC1Ev 0x00000071001b1214,O,000056,_ZN6IntTagC1Ei @@ -12653,71 +12653,71 @@ Address,Quality,Size,Name 0x00000071001b1380,O,000008,_ZN6IntTag9getAsByteEv 0x00000071001b1388,O,000016,_ZN6IntTag11getAsDoubleEv 0x00000071001b1398,O,000012,_ZN6IntTag10getAsFloatEv -0x00000071001b13a4,U,000392,_ZN9InventoryC1EP6Player +0x00000071001b13a4,O,000392,_ZN9InventoryC1EP6Player 0x00000071001b152c,U,000180, -0x00000071001b15e0,U,000012,_ZN9InventoryD2Ev -0x00000071001b15ec,U,000036,_ZN9InventoryD0Ev -0x00000071001b1610,U,000068, -0x00000071001b1654,U,000024, -0x00000071001b166c,U,000008, -0x00000071001b1674,U,000228, -0x00000071001b1758,U,000164, -0x00000071001b17fc,U,000084, -0x00000071001b1850,U,000020,_ZN12ItemInstance15isStackedByDataEv -0x00000071001b1864,U,000164, +0x00000071001b15e0,M,000012,_ZN9InventoryD2Ev +0x00000071001b15ec,M,000036,_ZN9InventoryD0Ev +0x00000071001b1610,O,000068,_ZN9Inventory11getSelectedEv +0x00000071001b1654,M,000024,_ZN9Inventory12isHotbarSlotEi +0x00000071001b166c,O,000008,_ZN9Inventory16getSelectionSizeEv +0x00000071001b1674,M,000228,_ZN9Inventory24hasRemainingSpaceForItemE12not_null_ptrI12ItemInstanceES2_b +0x00000071001b1758,O,000164,_ZN9Inventory10isSameItemE12not_null_ptrI12ItemInstanceES2_b +0x00000071001b17fc,O,000084,_ZN12ItemInstance11isStackableEv +0x00000071001b1850,O,000020,_ZN12ItemInstance15isStackedByDataEv +0x00000071001b1864,M,000164,_ZN9Inventory11getFreeSlotEv 0x00000071001b1908,U,000016, 0x00000071001b1918,U,000256, 0x00000071001b1a18,U,000224, 0x00000071001b1af8,U,000920, 0x00000071001b1e90,U,000144, 0x00000071001b1f20,U,000220,_ZN12ItemInstance11isEnchantedEv -0x00000071001b1ffc,U,000104,_ZN9Inventory9swapPaintEi -0x00000071001b2064,U,000236, -0x00000071001b2150,U,000368, -0x00000071001b22c0,U,000520, -0x00000071001b24c8,U,000008, +0x00000071001b1ffc,O,000104,_ZN9Inventory9swapPaintEi +0x00000071001b2064,O,000236,_ZN9Inventory11addResourceE12not_null_ptrI12ItemInstanceE +0x00000071001b2150,O,000368,_ZN9Inventory25getSlotWithRemainingSpaceE12not_null_ptrI12ItemInstanceE +0x00000071001b22c0,M,000520,_ZN9Inventory11addResourceEi12not_null_ptrI12ItemInstanceE +0x00000071001b24c8,O,000008,_ZN12ItemInstance10setPopTimeEi 0x00000071001b24d0,U,000484,_ZN9Inventory4tickEv 0x00000071001b26b4,U,000204, -0x00000071001b2780,U,000904, +0x00000071001b2780,M,000904,_ZN9Inventory3addEi12not_null_ptrI12ItemInstanceE 0x00000071001b2b08,U,000056, 0x00000071001b2b40,U,000084, 0x00000071001b2b94,U,000440, -0x00000071001b2d4c,U,000100,split__12ItemInstanceFi +0x00000071001b2d4c,O,000100,_ZN12ItemInstance5splitEi 0x00000071001b2db0,U,000216,_ZNSt3__120__shared_ptr_pointerIP33ClientboundContainerSetSlotPacketNS_14default_deleteIS1_EENS_9allocatorIS1_EEEC_gen -0x00000071001b2e88,U,000276, -0x00000071001b2f9c,U,000316,_ZN9Inventory10removeItemE12not_null_ptrI12ItemInstanceE -0x00000071001b30d8,U,000268, -0x00000071001b31e4,U,000336, +0x00000071001b2e88,M,000276,_ZN9Inventory10removeItemEji +0x00000071001b2f9c,M,000316,_ZN9Inventory10removeItemE12not_null_ptrI12ItemInstanceE +0x00000071001b30d8,M,000268,_ZN9Inventory18removeItemNoUpdateEi +0x00000071001b31e4,M,000336,_ZN9Inventory7setItemEj12not_null_ptrI12ItemInstanceE 0x00000071001b3334,U,000108, 0x00000071001b33a0,U,000140, -0x00000071001b342c,U,000600, -0x00000071001b3684,U,000404,_ZN9Inventory4loadEP7ListTag -0x00000071001b3818,U,000064, -0x00000071001b3858,U,000320, -0x00000071001b3998,U,000228, -0x00000071001b3a7c,U,000068, -0x00000071001b3ac0,U,000064, -0x00000071001b3b00,U,000008, -0x00000071001b3b08,U,000072, -0x00000071001b3b50,U,000008, +0x00000071001b342c,O,000600,_ZN9Inventory4saveEP7ListTag +0x00000071001b3684,O,000404,_ZN9Inventory4loadEP7ListTag +0x00000071001b3818,O,000064,_ZN9Inventory16getContainerSizeEv +0x00000071001b3858,M,000320,_ZN9Inventory7isEmptyEv +0x00000071001b3998,M,000228,_ZN9Inventory7getItemEj +0x00000071001b3a7c,O,000068,_ZN9Inventory7getNameEv +0x00000071001b3ac0,O,000064,_ZN9Inventory13getCustomNameEv +0x00000071001b3b00,O,000008,_ZN9Inventory13hasCustomNameEv +0x00000071001b3b08,O,000072,_ZN9Inventory14getDisplayNameEv +0x00000071001b3b50,O,000008,_ZN9Inventory15getMaxStackSizeEv 0x00000071001b3b58,U,000152, 0x00000071001b3bf0,U,000044, -0x00000071001b3c1c,U,000044, +0x00000071001b3c1c,O,000044,_ZN9Inventory8getArmorEi 0x00000071001b3c48,U,000348,_ZN9Inventory9hurtArmorEv 0x00000071001b3da4,U,000520, -0x00000071001b3fac,U,000016, -0x00000071001b3fbc,U,000100, -0x00000071001b4020,U,000012,_ZN9Inventory10getCarriedEv -0x00000071001b402c,U,000128, -0x00000071001b40ac,U,000004, -0x00000071001b40b0,U,000004, -0x00000071001b40b4,U,000008, +0x00000071001b3fac,O,000016,_ZN9Inventory10setChangedEv +0x00000071001b3fbc,O,000100,_ZN9Inventory10setCarriedE12not_null_ptrI12ItemInstanceE +0x00000071001b4020,O,000012,_ZN9Inventory10getCarriedEv +0x00000071001b402c,M,000128,_ZN9Inventory10stillValidENSt3__110shared_ptrI6PlayerEE +0x00000071001b40ac,O,000004,_ZN9Inventory9startOpenENSt3__110shared_ptrI6PlayerEE +0x00000071001b40b0,O,000004,_ZN9Inventory8stopOpenENSt3__110shared_ptrI6PlayerEE +0x00000071001b40b4,O,000008,_ZN9Inventory12canPlaceItemEi12not_null_ptrI12ItemInstanceE 0x00000071001b40bc,U,000164, 0x00000071001b4160,U,000380, -0x00000071001b42dc,U,000008, -0x00000071001b42e4,U,000004, -0x00000071001b42e8,U,000008, -0x00000071001b42f0,U,000048, +0x00000071001b42dc,O,000008,_ZN9Inventory16getContainerDataEi +0x00000071001b42e4,O,000004,_ZN9Inventory16setContainerDataEii +0x00000071001b42e8,O,000008,_ZN9Inventory21getContainerDataCountEv +0x00000071001b42f0,O,000048,_ZN9Inventory12clearContentEv 0x00000071001b4320,U,000160, 0x00000071001b43c0,U,000188, 0x00000071001b447c,U,000028, @@ -12761,52 +12761,52 @@ Address,Quality,Size,Name 0x00000071001b6750,U,000072, 0x00000071001b6798,O,000068,_ZN4Item18getDefaultInstanceEv 0x00000071001b67dc,O,000008,_ZN4Item18verifyTagAfterLoadEP11CompoundTag -0x00000071001b67e4,U,043724,_ZN4Item10staticCtorEv +0x00000071001b67e4,M,043724,_ZN4Item10staticCtorEv 0x00000071001c12b0,O,000056,_ZN4Item13registerBlockEP5Block 0x00000071001c12e8,O,000136,_ZN4Item13registerBlockEP5BlockPS_ -0x00000071001c1370,U,000028,_ZN4Item22StoneBlockNameResolverE12not_null_ptrI12ItemInstanceE -0x00000071001c138c,U,000028,_ZN4Item22StoneBlockDescResolverE12not_null_ptrI12ItemInstanceE -0x00000071001c13a8,U,000028, -0x00000071001c13c4,U,000028, -0x00000071001c13e0,U,000028, -0x00000071001c13fc,U,000068, -0x00000071001c1440,U,000028, -0x00000071001c145c,U,000028, -0x00000071001c1478,U,000096, -0x00000071001c14d8,U,000096, -0x00000071001c1538,U,000104, -0x00000071001c15a0,U,000104, -0x00000071001c1608,U,000028, -0x00000071001c1624,U,000016, -0x00000071001c1634,U,000044, -0x00000071001c1660,U,000092, -0x00000071001c16bc,U,000092, -0x00000071001c1718,U,000028, -0x00000071001c1734,U,000028, -0x00000071001c1750,U,000028, -0x00000071001c176c,U,000048, -0x00000071001c179c,U,000044, -0x00000071001c17c8,U,000044, -0x00000071001c17f4,U,000028, -0x00000071001c1810,U,000028, -0x00000071001c182c,U,000044, -0x00000071001c1858,U,000044, -0x00000071001c1884,U,000028, -0x00000071001c18a0,U,000028, -0x00000071001c18bc,U,000008,_ZN4Item26setBaseItemTypeAndMaterialEii -0x00000071001c18c4,U,000028, -0x00000071001c18e0,U,000044, -0x00000071001c190c,U,000044, -0x00000071001c1938,U,000072,_ZN4Item12registerItemEiRKNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEEPS_ -0x00000071001c1980,M,000040,_ZN4Item11setIconNameERKNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE -0x00000071001c19a8,U,000036,_ZN4Item16setDescriptionIdEii -0x00000071001c19cc,U,000012, -0x00000071001c19d8,U,000012, -0x00000071001c19e4,U,000008, -0x00000071001c19ec,U,000008,_ZN4Item24setCraftingRemainingItemEP4Item -0x00000071001c19f4,U,000048,_ZN16SplashPotionItemC_gen -0x00000071001c1a24,U,000048,_ZN15TippedArrowItemC_gen -0x00000071001c1a54,U,000048,_ZN19LingeringPotionItemC_gen +0x00000071001c1370,O,000028,_ZN4Item22StoneBlockNameResolverE12not_null_ptrI12ItemInstanceE +0x00000071001c138c,O,000028,_ZN4Item22StoneBlockDescResolverE12not_null_ptrI12ItemInstanceE +0x00000071001c13a8,O,000028,_ZN13ItemResolvers13DirtBlockNameE12not_null_ptrI12ItemInstanceE +0x00000071001c13c4,O,000028,_ZN13ItemResolvers13DirtBlockDescE12not_null_ptrI12ItemInstanceE +0x00000071001c13e0,O,000028,_ZN13ItemResolvers15PlanksBlockNameE12not_null_ptrI12ItemInstanceE +0x00000071001c13fc,O,000068,_ZN13ItemResolvers11SaplingNameE12not_null_ptrI12ItemInstanceE +0x00000071001c1440,O,000028,_ZN13ItemResolvers13SandBlockNameE12not_null_ptrI12ItemInstanceE +0x00000071001c145c,O,000028,_ZN13ItemResolvers13SandBlockDescE12not_null_ptrI12ItemInstanceE +0x00000071001c1478,O,000096,_ZN13ItemResolvers7LogNameE12not_null_ptrI12ItemInstanceE +0x00000071001c14d8,O,000096,_ZN13ItemResolvers8Log2NameE12not_null_ptrI12ItemInstanceE +0x00000071001c1538,O,000104,_ZN13ItemResolvers10SpongeNameE12not_null_ptrI12ItemInstanceE +0x00000071001c15a0,O,000104,_ZN13ItemResolvers10SpongeDescE12not_null_ptrI12ItemInstanceE +0x00000071001c1608,O,000028,_ZN13ItemResolvers18SandStoneBlockNameE12not_null_ptrI12ItemInstanceE +0x00000071001c1624,O,000016,_ZN15arrayWithLengthIiEC2ILm3EEERAT__i +0x00000071001c1634,O,000044,_ZN13ItemResolvers8WoolNameE12not_null_ptrI12ItemInstanceE +0x00000071001c1660,O,000092,_ZN13ItemResolvers10FlowerNameE12not_null_ptrI12ItemInstanceE +0x00000071001c16bc,O,000092,_ZN13ItemResolvers10FlowerDescE12not_null_ptrI12ItemInstanceE +0x00000071001c1718,O,000028,_ZN13ItemResolvers19MonsterEggBlockNameE12not_null_ptrI12ItemInstanceE +0x00000071001c1734,O,000028,_ZN13ItemResolvers19StoneBrickBlockNameE12not_null_ptrI12ItemInstanceE +0x00000071001c1750,O,000028,_ZN13ItemResolvers13WallBlockNameE12not_null_ptrI12ItemInstanceE +0x00000071001c176c,O,000048,_ZN13ItemResolvers9AnvilNameE12not_null_ptrI12ItemInstanceE +0x00000071001c179c,O,000044,_ZN13ItemResolvers15StainedClayNameE12not_null_ptrI12ItemInstanceE +0x00000071001c17c8,O,000044,_ZN13ItemResolvers20StainedGlassPaneNameE12not_null_ptrI12ItemInstanceE +0x00000071001c17f4,O,000028,_ZN13ItemResolvers20DoublePlantBlockNameE12not_null_ptrI12ItemInstanceE +0x00000071001c1810,O,000028,_ZN13ItemResolvers20DoublePlantBlockDescE12not_null_ptrI12ItemInstanceE +0x00000071001c182c,O,000044,_ZN13ItemResolvers10CarpetNameE12not_null_ptrI12ItemInstanceE +0x00000071001c1858,O,000044,_ZN13ItemResolvers16StainedGlassNameE12not_null_ptrI12ItemInstanceE +0x00000071001c1884,O,000028,_ZN13ItemResolvers19PrismarineBlockNameE12not_null_ptrI12ItemInstanceE +0x00000071001c18a0,O,000028,_ZN13ItemResolvers19PrismarineBlockDescE12not_null_ptrI12ItemInstanceE +0x00000071001c18bc,O,000008,_ZN4Item26setBaseItemTypeAndMaterialEii +0x00000071001c18c4,O,000028,_ZN13ItemResolvers21RedSandStoneBlockNameE12not_null_ptrI12ItemInstanceE +0x00000071001c18e0,O,000044,_ZN13ItemResolvers12ConcreteNameE12not_null_ptrI12ItemInstanceE +0x00000071001c190c,O,000044,_ZN13ItemResolvers18ConcretePowderNameE12not_null_ptrI12ItemInstanceE +0x00000071001c1938,O,000072,_ZN4Item12registerItemEiRKNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEEPS_ +0x00000071001c1980,O,000040,_ZN4Item11setIconNameERKNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE +0x00000071001c19a8,O,000036,_ZN4Item16setDescriptionIdEii +0x00000071001c19cc,O,000012,_ZN4Item9setFlag78Eb +0x00000071001c19d8,O,000012,_ZN4Item15setHandEquippedEv +0x00000071001c19e4,O,000008,_ZN4Item16setDescriptionIdEi +0x00000071001c19ec,O,000008,_ZN4Item24setCraftingRemainingItemEPS_ +0x00000071001c19f4,U,000048,_ZN16SplashPotionItemC1Ev +0x00000071001c1a24,U,000048,_ZN15TippedArrowItemC1Ev +0x00000071001c1a54,U,000048,_ZN19LingeringPotionItemC1Ev 0x00000071001c1a84,O,000048,_ZN14DebugFourjItemC1Ev 0x00000071001c1ab4,O,014308,_ZN5Items10staticCtorEv 0x00000071001c5298,U,000004,_ZN13ItemPotionFix10staticCtorEv @@ -12824,8 +12824,8 @@ Address,Quality,Size,Name 0x00000071001c543c,O,000008,_ZN4Item15finishUsingItemE12not_null_ptrI12ItemInstanceEP5LevelNSt3__110shared_ptrI12LivingEntityEE 0x00000071001c5444,O,000008,_ZN4Item15getMaxStackSizeEv 0x00000071001c544c,O,000008,_ZN4Item23getLevelDataForAuxValueEi -0x00000071001c5454,U,000008,_ZN4Item15isStackedByDataEv -0x00000071001c545c,U,000008,_ZN4Item12getMaxDamageEv +0x00000071001c5454,O,000008,_ZN4Item15isStackedByDataEv +0x00000071001c545c,O,000008,_ZN4Item12getMaxDamageEv 0x00000071001c5464,O,000052,_ZN4Item13canBeDepletedEv 0x00000071001c5498,O,000008,_ZN4Item9hurtEnemyE12not_null_ptrI12ItemInstanceENSt3__110shared_ptrI12LivingEntityEES6_ 0x00000071001c54a0,O,000008,_ZN4Item9mineBlockE12not_null_ptrI12ItemInstanceEP5LevelPK10BlockStateRK8BlockPosNSt3__110shared_ptrI12LivingEntityEE @@ -12834,7 +12834,7 @@ Address,Quality,Size,Name 0x00000071001c54b8,O,000008,_ZN4Item13interactEnemyE12not_null_ptrI12ItemInstanceENSt3__110shared_ptrI6PlayerEENS4_I12LivingEntityEEN15InteractionHand16EInteractionHandE 0x00000071001c54c0,O,000008,_ZN4Item14isHandEquippedEv 0x00000071001c54c8,O,000008,_ZN4Item13isMirroredArtEv -0x00000071001c54d0,U,000008, +0x00000071001c54d0,O,000008,_ZN4Item19setUseDescriptionIdEi 0x00000071001c54d8,U,000032, 0x00000071001c54f8,U,000084, 0x00000071001c554c,O,000008,_ZN4Item16getDescriptionIdEi @@ -12859,7 +12859,7 @@ Address,Quality,Size,Name 0x00000071001c57b8,O,000008,_ZN4Item23hasMultipleSpriteLayersEv 0x00000071001c57c0,O,000008,_ZN4Item11getIconTypeEv 0x00000071001c57c8,O,000060,_ZN4Item7getIconE12not_null_ptrI12ItemInstanceE -0x00000071001c5804,U,000080,_ZN4Item12registerItemEiRK16ResourceLocationP4Item +0x00000071001c5804,U,000080,_ZN4Item12registerItemEiRK16ResourceLocationPS_ 0x00000071001c5854,O,000596,_ZNSt3__113unordered_mapIP5BlockP4ItemNS_4hashIS2_EENS_8equal_toIS2_EENS_9allocatorINS_4pairIKS2_S4_EEEEEixERSB_ 0x00000071001c5aa8,U,000116, 0x00000071001c5b1c,O,000008,_ZN4Item12GetArmorTypeEv @@ -12946,8 +12946,8 @@ Address,Quality,Size,Name 0x00000071001c959c,U,000108, 0x00000071001c9608,U,000280, 0x00000071001c9720,U,000092, -0x00000071001c977c,U,000164,_ZN12ItemInstance4initEP4Itemii -0x00000071001c9820,U,000040,_ZN12ItemInstance20updateEmptyCacheFlagEv +0x00000071001c977c,O,000164,_ZN12ItemInstance4initEP4Itemii +0x00000071001c9820,O,000040,_ZN12ItemInstance20updateEmptyCacheFlagEv 0x00000071001c9848,O,000064,_ZN12ItemInstanceC1EP5Block 0x00000071001c9888,O,000120,_ZN12ItemInstanceC1EP5Blocki 0x00000071001c9900,O,000080,_ZN12ItemInstanceC1EP5Blockii @@ -12955,7 +12955,7 @@ Address,Quality,Size,Name 0x00000071001c9968,O,000020,_ZN12ItemInstanceC1EP4Itemi 0x00000071001c997c,O,000016,_ZN12ItemInstanceC1EP4Itemii 0x00000071001c998c,O,000512,_ZN12ItemInstanceC1EP11CompoundTag -0x00000071001c9b8c,U,000068,_ZN12ItemInstanceD1Ev +0x00000071001c9b8c,O,000068,_ZN12ItemInstanceD2Ev 0x00000071001c9bd0,U,000016, 0x00000071001c9be0,U,000108,_ZN12ItemInstance14addDataWalkersEP14DataFixerUpper 0x00000071001c9c4c,U,000048,_ZN32ItemInstanceBlockEntityTagWalkerC_gen @@ -12965,7 +12965,7 @@ Address,Quality,Size,Name 0x00000071001c9e98,U,000136, 0x00000071001c9f20,U,000180,_ZN12ItemInstance15finishUsingItemEP5LevelRKNSt3__110shared_ptrI6PlayerEE 0x00000071001c9fd4,U,000072, -0x00000071001ca01c,U,000176,_ZN12ItemInstance16isDamageableItemEv +0x00000071001ca01c,M,000176,_ZN12ItemInstance16isDamageableItemEv 0x00000071001ca0cc,U,000020,_ZN12ItemInstance12getMaxDamageEv 0x00000071001ca0e0,U,000308, 0x00000071001ca214,U,000204, @@ -13525,8 +13525,8 @@ Address,Quality,Size,Name 0x00000071001d58b8,O,000032,_ZN14SimpleRegistryI16ResourceLocationPK20ItemPropertyFunctionNSt3__14hashIS0_EENS4_8equal_toIS0_EEE11containsKeyES0_ 0x00000071001d58d8,U,000020, 0x00000071001d58ec,O,000024,_ZNSt3__113unordered_mapI16ResourceLocationPK20ItemPropertyFunctionNS_4hashIS1_EENS_8equal_toIS1_EENS_9allocatorINS_4pairIKS1_S4_EEEEE2atERSB_ -0x00000071001d5904,M,000300,_ZNSt3__112__hash_tableINS_17__hash_value_typeI16ResourceLocationPK20ItemPropertyFunctionEENS_22__unordered_map_hasherIS2_S6_NS_4hashIS2_EELb1EEENS_21__unordered_map_equalIS2_S6_NS_8equal_toIS2_EELb1EEENS_9allocatorIS6_EEE4findIS2_EENS_15__hash_iteratorIPNS_11__hash_nodeIS6_PvEEEERKT_ -0x00000071001d5a30,M,000604,_ZNSt3__113unordered_mapI16ResourceLocationPK20ItemPropertyFunctionNS_4hashIS1_EENS_8equal_toIS1_EENS_9allocatorINS_4pairIKS1_S4_EEEEEixERSB_ +0x00000071001d5904,O,000300,_ZNSt3__112__hash_tableINS_17__hash_value_typeI16ResourceLocationPK20ItemPropertyFunctionEENS_22__unordered_map_hasherIS2_S6_NS_4hashIS2_EELb1EEENS_21__unordered_map_equalIS2_S6_NS_8equal_toIS2_EELb1EEENS_9allocatorIS6_EEE4findIS2_EENS_15__hash_iteratorIPNS_11__hash_nodeIS6_PvEEEERKT_ +0x00000071001d5a30,O,000604,_ZNSt3__113unordered_mapI16ResourceLocationPK20ItemPropertyFunctionNS_4hashIS1_EENS_8equal_toIS1_EENS_9allocatorINS_4pairIKS1_S4_EEEEEixERSB_ 0x00000071001d5c8c,U,000108, 0x00000071001d5cf8,U,000932, 0x00000071001d609c,O,000128,_ZNSt3__16__treeIPK20ItemPropertyFunctionNS_4lessIS3_EENS_9allocatorIS3_EEE25__emplace_unique_key_argsIS3_JRKS3_EEENS_4pairINS_15__tree_iteratorIS3_PNS_11__tree_nodeIS3_PvEElEEbEERKT_DpOT0_ @@ -14370,7 +14370,7 @@ Address,Quality,Size,Name 0x00000071001f63ec,U,000156,_ZN5LayerC1Ex 0x00000071001f6488,O,000128,_ZN5Layer4initEx 0x00000071001f6508,O,000076,_ZN5Layer10initRandomExx -0x00000071001f6554,U,000048,_ZN8LeadItemC_gen +0x00000071001f6554,O,000048,_ZN8LeadItemC1Ev 0x00000071001f6584,U,000220,_ZN8LeadItem5useOnENSt3__110shared_ptrI6PlayerEEP5LevelRK8BlockPosN15InteractionHand16EInteractionHandEPK9Directionfffb 0x00000071001f6660,U,000360,_ZN8LeadItem18bindPlayerMobsTestENSt3__110shared_ptrI6PlayerEEP5LevelRK8BlockPos 0x00000071001f67c8,U,000520, @@ -14407,7 +14407,7 @@ Address,Quality,Size,Name 0x00000071001f7974,U,000096,_ZN9LeafBlock16getDescriptionIdEi 0x00000071001f79d4,U,000084,_ZN9LeafBlock10getTextureEPK9DirectionPK10BlockState 0x00000071001f7a28,U,000336,_ZN9LeafBlock13registerIconsEP12IconRegister -0x00000071001f7b78,U,000076,_ZN13LeafBlockItemC_gen +0x00000071001f7b78,O,000076,_ZN13LeafBlockItemC1EP5Block 0x00000071001f7bc4,U,000008, 0x00000071001f7bcc,U,000060, 0x00000071001f7c08,U,000136,_ZN16LeapAtTargetGoalC_gen @@ -15254,9 +15254,9 @@ Address,Quality,Size,Name 0x000000710021d1ec,U,000012,_ZN12LivingEntity14shouldShowNameEv 0x000000710021d1f8,U,000012,_ZN12LivingEntity12getJumpPowerEv 0x000000710021d204,U,000256,_ZN12LivingEntity14jumpFromGroundEv -0x000000710021d304,U,000024,_ZN12LivingEntity11jumpInWaterEv -0x000000710021d31c,U,000024,_ZN12LivingEntity10jumpInLavaEv -0x000000710021d334,U,000012,_ZN12LivingEntity16getWaterSlowDownEv +0x000000710021d304,O,000024,_ZN12LivingEntity11jumpInWaterEv +0x000000710021d31c,O,000024,_ZN12LivingEntity10jumpInLavaEv +0x000000710021d334,O,000012,_ZN12LivingEntity16getWaterSlowDownEv 0x000000710021d340,M,002852,_ZN12LivingEntity6travelEfff 0x000000710021de64,M,001968,_ZN12LivingEntity17CheckThermalAreasEv 0x000000710021e614,O,000676,_ZN12LivingEntity16fallFlyingTravelERdS0_S0_P4Vec3RfS3_S0_d @@ -15273,8 +15273,8 @@ Address,Quality,Size,Name 0x000000710021eb1c,U,000652, 0x000000710021eda8,U,001112,_ZN12LivingEntity13getLightColorEv 0x000000710021f200,O,000240,_ZN12LivingEntity14setBoundingBoxEP4AABB -0x000000710021f2f0,U,000008,_ZN12LivingEntity8getSpeedEv -0x000000710021f2f8,U,000008,_ZN12LivingEntity8setSpeedEf +0x000000710021f2f0,O,000008,_ZN12LivingEntity8getSpeedEv +0x000000710021f2f8,O,000008,_ZN12LivingEntity8setSpeedEf 0x000000710021f300,U,000092,_ZN12LivingEntity12doHurtTargetENSt3__110shared_ptrI6EntityEE 0x000000710021f35c,U,000008,_ZN12LivingEntity10isSleepingEv 0x000000710021f364,U,001732,_ZN12LivingEntity4tickEv @@ -15290,21 +15290,21 @@ Address,Quality,Size,Name 0x0000007100220548,U,000080,_ZN12LivingEntity6doPushENSt3__110shared_ptrI6EntityEE 0x0000007100220598,U,000236,_ZN12LivingEntity10stopRidingEv 0x0000007100220684,U,000048,_ZN12LivingEntity8rideTickEv -0x00000071002206b4,U,000036,_ZN12LivingEntity6lerpToEdddffib -0x00000071002206d8,U,000012,_ZN12LivingEntity10setJumpingEb +0x00000071002206b4,O,000036,_ZN12LivingEntity6lerpToEdddffib +0x00000071002206d8,O,000012,_ZN12LivingEntity10setJumpingEb 0x00000071002206e4,U,000300,_ZN12LivingEntity4takeENSt3__110shared_ptrI6EntityEEi 0x0000007100220810,U,000216,_ZNSt3__120__shared_ptr_pointerIP31ClientboundTakeItemEntityPacketNS_14default_deleteIS1_EENS_9allocatorIS1_EEEC_gen 0x00000071002208e8,U,000184,_ZN12LivingEntity6canSeeENSt3__110shared_ptrI6EntityEE -0x00000071002209a0,U,000068,_ZN12LivingEntity13getViewVectorEf +0x00000071002209a0,O,000068,_ZN12LivingEntity13getViewVectorEf 0x00000071002209e4,O,000040,_ZN12LivingEntity13getAttackAnimEf 0x0000007100220a0c,U,000068,_ZN12LivingEntity14getSweptVolumeEv -0x0000007100220a50,U,000020,_ZN12LivingEntity13isEffectiveAiEv +0x0000007100220a50,O,000020,_ZN12LivingEntity13isEffectiveAiEv 0x0000007100220a64,U,000016,_ZN12LivingEntity10isPickableEv 0x0000007100220a74,U,000076,_ZN12LivingEntity10isPushableEv 0x0000007100220ac0,U,000100,_ZN12LivingEntity8markHurtEv 0x0000007100220b24,U,000008,_ZN12LivingEntity11getYHeadRotEv -0x0000007100220b2c,U,000008,_ZN12LivingEntity11setYHeadRotEf -0x0000007100220b34,U,000008,_ZN12LivingEntity11setYBodyRotEf +0x0000007100220b2c,O,000008,_ZN12LivingEntity11setYHeadRotEf +0x0000007100220b34,O,000008,_ZN12LivingEntity11setYBodyRotEf 0x0000007100220b3c,O,000008,_ZN12LivingEntity19getAbsorptionAmountEv 0x0000007100220b44,O,000016,_ZN12LivingEntity19setAbsorptionAmountEf 0x0000007100220b54,O,000004,_ZN12LivingEntity13onEnterCombatEv @@ -15313,7 +15313,7 @@ Address,Quality,Size,Name 0x0000007100220b68,U,000040,_ZN12LivingEntity11isUsingItemEv 0x0000007100220b90,U,000040,_ZN12LivingEntity15getUsedItemHandEv 0x0000007100220bb8,U,000248,_ZN12LivingEntity17updatingUsingItemEv -0x0000007100220cb0,U,000008,_ZN12LivingEntity24getUseItemRemainingTicksEv +0x0000007100220cb0,O,000008,_ZN12LivingEntity24getUseItemRemainingTicksEv 0x0000007100220cb8,U,000168,_ZN12LivingEntity14startUsingItemEN15InteractionHand16EInteractionHandE 0x0000007100220d60,U,000260,_ZN12LivingEntity19onSyncedDataUpdatedEPK23EntityDataAccessor_Base 0x0000007100220e64,U,000840,_ZN12LivingEntity21spawnItemUseParticlesE12not_null_ptrI12ItemInstanceEi @@ -15337,7 +15337,7 @@ Address,Quality,Size,Name 0x0000007100221934,U,000208,_ZN12LivingEntity7getTeamEv 0x0000007100221a04,U,000012, 0x0000007100221a10,U,000008, -0x0000007100221a18,U,000052,_ZN12LivingEntity15stopCurrentLerpEv +0x0000007100221a18,O,000052,_ZN12LivingEntity15stopCurrentLerpEv 0x0000007100221a4c,U,000092, 0x0000007100221aa8,U,000016, 0x0000007100221ab8,U,000008, @@ -15923,7 +15923,7 @@ Address,Quality,Size,Name 0x000000710023a138,U,001272, 0x000000710023a630,U,000112, 0x000000710023a6a0,U,000076, -0x000000710023a6ec,U,000056,_ZN14MilkBucketItemC_gen +0x000000710023a6ec,O,000056,_ZN14MilkBucketItemC1Ev 0x000000710023a724,U,000396,_ZN14MilkBucketItem15finishUsingItemE12not_null_ptrI12ItemInstanceEP5LevelNSt3__110shared_ptrI12LivingEntityEE 0x000000710023a8b0,U,000008,_ZN14MilkBucketItem14getUseDurationE12not_null_ptrI12ItemInstanceE 0x000000710023a8b8,U,000008,_ZN14MilkBucketItem15getUseAnimationE12not_null_ptrI12ItemInstanceE @@ -15933,7 +15933,7 @@ Address,Quality,Size,Name 0x000000710023a94c,U,000220,_ZN8Minecart10staticCtorEv 0x000000710023aa28,U,000124, 0x000000710023aaa4,U,000056,_ZN8MinecartC_gen -0x000000710023aadc,U,000036,_ZN8MinecartD0Ev +0x000000710023aadc,O,000036,_ZN8MinecartD0Ev 0x000000710023ab00,U,000544, 0x000000710023ad20,U,000008, 0x000000710023ad28,U,000172, @@ -15963,12 +15963,12 @@ Address,Quality,Size,Name 0x000000710023bb04,U,000016, 0x000000710023bb14,U,000048, 0x000000710023bb44,U,002276, -0x000000710023c428,U,000012, -0x000000710023c434,U,000004, -0x000000710023c438,U,000212, -0x000000710023c50c,U,002448, -0x000000710023ce9c,U,000096, -0x000000710023cefc,U,000116, +0x000000710023c428,O,000012,_ZN8Minecart11getMaxSpeedEv +0x000000710023c434,O,000004,_ZN8Minecart16activateMinecartEiiib +0x000000710023c438,O,000212,_ZN8Minecart12moveOffTrackEv +0x000000710023c50c,U,002448,_ZN8Minecart14moveAlongTrackERK8BlockPosPK10BlockState +0x000000710023ce9c,O,000096,_ZN8Minecart20applyNaturalSlowdownEv +0x000000710023cefc,O,000116,_ZN8Minecart6setPosEddd 0x000000710023cf70,U,000600, 0x000000710023d1c8,U,000600, 0x000000710023d420,U,000128, @@ -15977,7 +15977,7 @@ Address,Quality,Size,Name 0x000000710023d8a0,U,001460, 0x000000710023de54,U,000156, 0x000000710023def0,U,000052, -0x000000710023df24,U,000028, +0x000000710023df24,O,000028,_ZN8Minecart10lerpMotionEddd 0x000000710023df40,U,000024, 0x000000710023df58,U,000020, 0x000000710023df6c,U,000032, @@ -16087,10 +16087,10 @@ Address,Quality,Size,Name 0x000000710023f6e4,U,000252, 0x000000710023f7e0,U,000032, 0x000000710023f800,U,000020, -0x000000710023f814,U,000012, +0x000000710023f814,O,000012,_ZN15MinecartFurnace11getMaxSpeedEv 0x000000710023f820,U,000172, -0x000000710023f8cc,U,000228, -0x000000710023f9b0,U,000196, +0x000000710023f8cc,O,000228,_ZN15MinecartFurnace14moveAlongTrackERK8BlockPosPK10BlockState +0x000000710023f9b0,O,000196,_ZN15MinecartFurnace20applyNaturalSlowdownEv 0x000000710023fa74,U,000268, 0x000000710023fb80,U,000024, 0x000000710023fb98,U,000244, @@ -16149,7 +16149,7 @@ Address,Quality,Size,Name 0x00000071002407dc,U,000036, 0x0000007100240800,U,001136, 0x0000007100240c70,U,000100, -0x0000007100240cd4,U,000100,_ZN12MinecartItemC_gen +0x0000007100240cd4,U,000100,_ZN12MinecartItemC1EPK12MinecartType 0x0000007100240d38,U,000052,_ZN12MinecartItem24MinecartDispenseBehaviorC_gen 0x0000007100240d6c,U,000612,_ZN12MinecartItem5useOnENSt3__110shared_ptrI6PlayerEEP5LevelRK8BlockPosN15InteractionHand16EInteractionHandEPK9Directionfffb 0x0000007100240fd0,U,000068,_ZN16MinecartRideableC_gen @@ -16198,7 +16198,7 @@ Address,Quality,Size,Name 0x0000007100241f58,O,000768,MinecraftWorld_RunStaticCtors 0x0000007100242258,O,010716,_ZN6Packet10staticCtorEv 0x0000007100244c34,U,006172,_ZN9MobEffect10staticCtorEv -0x0000007100246450,U,001864,_ZN10MobEffects10staticCtorEv +0x0000007100246450,O,001864,_ZN10MobEffects10staticCtorEv 0x0000007100246b98,U,000016, 0x0000007100246ba8,U,000048,_ZN11CommonStatsC_gen 0x0000007100246bd8,O,000804,_ZN11MobCategory10staticCtorEv @@ -16284,7 +16284,7 @@ Address,Quality,Size,Name 0x000000710024bf78,U,000148, 0x000000710024c00c,U,000620, 0x000000710024c278,U,000336, -0x000000710024c3c8,U,000048, +0x000000710024c3c8,O,000048,_ZN6MirrorC2ERKNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEENS_5eTYPEE 0x000000710024c3f8,U,000072, 0x000000710024c440,U,000124, 0x000000710024c4bc,O,000436,_ZN3Mob4initEv @@ -16410,12 +16410,12 @@ Address,Quality,Size,Name 0x000000710025186c,O,000008,_ZN9MobEffect16setDescriptionIdEi 0x0000007100251874,O,000008,_ZN9MobEffect7setIconENS_14EMobEffectIconE 0x000000710025187c,O,000008,_ZN9MobEffect19setDurationModifierEd -0x0000007100251884,U,000032,byId__9MobEffectSFi -0x00000071002518a4,U,000032, -0x00000071002518c4,U,000016,GetEffectCount__9MobEffectSFv +0x0000007100251884,O,000032,_ZN9MobEffect4byIdEi +0x00000071002518a4,O,000032,_ZN9MobEffect5getIdEPS_ +0x00000071002518c4,O,000016,_ZN9MobEffect14GetEffectCountEv 0x00000071002518d4,O,000080,_ZN9MobEffectC1Eb16eMinecraftColour -0x0000007100251924,U,000836,_ZN9MobEffect15applyEffectTickENSt3__110shared_ptrI12LivingEntityEEi -0x0000007100251c68,U,000532,_ZN9MobEffect23applyInstantenousEffectENSt3__110shared_ptrI6EntityEENS1_I12LivingEntityEEid +0x0000007100251924,M,000836,_ZN9MobEffect15applyEffectTickERKNSt3__110shared_ptrI12LivingEntityEEi +0x0000007100251c68,O,000532,_ZN9MobEffect23applyInstantenousEffectERKNSt3__110shared_ptrI6EntityEES5_RKNS1_I12LivingEntityEEid 0x0000007100251e7c,O,000176,_ZN9MobEffect20isDurationEffectTickEii 0x0000007100251f2c,O,000008,_ZN9MobEffect14isInstantenousEv 0x0000007100251f34,O,000008,_ZN9MobEffect16getDescriptionIdEv @@ -16428,11 +16428,11 @@ Address,Quality,Size,Name 0x00000071002520b8,O,000012,_ZN9MobEffect13setBeneficialEv 0x00000071002520c4,O,000008,_ZNK9MobEffect12isBeneficialEv 0x00000071002520cc,O,000008,_ZNK9MobEffect8getColorEv -0x00000071002520d4,U,000624,_ZN9MobEffect20addAttributeModifierEP9Attribute12eMODIFIER_IDdi -0x0000007100252344,U,000008,_ZN9MobEffect21getAttributeModifiersEv -0x000000710025234c,U,000084,_ZN9MobEffect24removeAttributeModifiersENSt3__110shared_ptrI12LivingEntityEEP16BaseAttributeMapi -0x00000071002523a0,U,000244,_ZN9MobEffect21addAttributeModifiersENSt3__110shared_ptrI12LivingEntityEEP16BaseAttributeMapi -0x0000007100252494,U,000048,_ZN9MobEffect25getAttributeModifierValueEiP17AttributeModifier +0x00000071002520d4,O,000624,_ZN9MobEffect20addAttributeModifierEP9Attribute12eMODIFIER_IDdi +0x0000007100252344,O,000008,_ZN9MobEffect21getAttributeModifiersEv +0x000000710025234c,O,000084,_ZN9MobEffect24removeAttributeModifiersERKNSt3__110shared_ptrI12LivingEntityEEP16BaseAttributeMapi +0x00000071002523a0,O,000244,_ZN9MobEffect21addAttributeModifiersERKNSt3__110shared_ptrI12LivingEntityEEP16BaseAttributeMapi +0x0000007100252494,O,000048,_ZN9MobEffect25getAttributeModifierValueEiP17AttributeModifier 0x00000071002524c4,O,000036,_ZN17MobEffectInstance4initEP9MobEffectiib 0x00000071002524e8,O,000016,_ZN17MobEffectInstanceC1EP9MobEffect 0x00000071002524f8,O,000012,_ZN17MobEffectInstanceC1EP9MobEffecti @@ -16447,7 +16447,7 @@ Address,Quality,Size,Name 0x00000071002525ec,O,000012,_ZN17MobEffectInstance12setNoCounterEb 0x00000071002525f8,M,000268,_ZN17MobEffectInstance13getColorValueEPKNSt3__16vectorIPS_NS0_9allocatorIS2_EEEE 0x0000007100252704,U,000040, -0x000000710025272c,U,000096, +0x000000710025272c,O,000096,_ZN10MobEffects3getERKNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE 0x000000710025278c,U,000052,_ZN18CanAttackPredicateC_gen 0x00000071002527c0,U,000280, 0x00000071002528d8,U,000068, @@ -16506,28 +16506,28 @@ Address,Quality,Size,Name 0x0000007100254198,U,000004, 0x000000710025419c,U,000096, 0x00000071002541fc,U,000064, -0x000000710025423c,U,000152,_ZN27ModifiableAttributeInstanceC_gen -0x00000071002542d4,U,000020,_ZN17AttributeInstanceC1Ev +0x000000710025423c,M,000152,_ZN27ModifiableAttributeInstanceC1EP16BaseAttributeMapP9Attribute +0x00000071002542d4,O,000020,_ZN17AttributeInstanceC2Ev 0x00000071002542e8,U,000212,_ZN27ModifiableAttributeInstanceD2Ev 0x00000071002543bc,U,000004, 0x00000071002543c0,U,000036,_ZN27ModifiableAttributeInstanceD0Ev -0x00000071002543e4,U,000008, -0x00000071002543ec,U,000008, -0x00000071002543f4,U,000084, -0x0000007100254448,U,000032, -0x0000007100254468,U,000016, -0x0000007100254478,U,000624, -0x00000071002546e8,U,000048, -0x0000007100254718,U,000060, -0x0000007100254754,U,000064, +0x00000071002543e4,O,000008,_ZN27ModifiableAttributeInstance12getAttributeEv +0x00000071002543ec,O,000008,_ZN27ModifiableAttributeInstance12getBaseValueEv +0x00000071002543f4,O,000084,_ZN27ModifiableAttributeInstance12setBaseValueEd +0x0000007100254448,O,000032,_ZN27ModifiableAttributeInstance8setDirtyEv +0x0000007100254468,O,000016,_ZN27ModifiableAttributeInstance12getModifiersEi +0x0000007100254478,O,000624,_ZN27ModifiableAttributeInstance12getModifiersERNSt3__113unordered_setIP17AttributeModifierNS0_4hashIS3_EENS0_8equal_toIS3_EENS0_9allocatorIS3_EEEE +0x00000071002546e8,O,000048,_ZN27ModifiableAttributeInstance11getModifierE12eMODIFIER_ID +0x0000007100254718,O,000060,_ZN27ModifiableAttributeInstance11hasModifierEP17AttributeModifier +0x0000007100254754,M,000064,_ZN27ModifiableAttributeInstance12addModifiersEPNSt3__113unordered_setIP17AttributeModifierNS0_4hashIS3_EENS0_8equal_toIS3_EENS0_9allocatorIS3_EEEE 0x0000007100254794,U,000704, 0x0000007100254a54,U,000556, 0x0000007100254c80,U,000768, 0x0000007100254f80,U,000092, 0x0000007100254fdc,U,000112, -0x000000710025504c,U,000060, -0x0000007100255088,U,000268, -0x0000007100255194,U,001248, +0x000000710025504c,O,000060,_ZN27ModifiableAttributeInstance8getValueEv +0x0000007100255088,O,000268,_ZN27ModifiableAttributeInstance14calculateValueEv +0x0000007100255194,O,001248,_ZN27ModifiableAttributeInstance19getAppliedModifiersEiRNSt3__113unordered_setIP17AttributeModifierNS0_4hashIS3_EENS0_8equal_toIS3_EENS0_9allocatorIS3_EEEE 0x0000007100255674,U,000004, 0x0000007100255678,U,000004, 0x000000710025567c,U,000004, @@ -16578,7 +16578,7 @@ Address,Quality,Size,Name 0x0000007100256ff8,O,000096,_ZN15MonsterEggBlock7VariantC2EiRKNSt3__112basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEEi 0x0000007100257058,O,000012,_ZNK15MonsterEggBlock7Variant8toStringEv 0x0000007100257064,O,000012,_ZNK15MonsterEggBlock7Variant17getSerializedNameEv -0x0000007100257070,U,000008, +0x0000007100257070,O,000008,_ZN15MonsterEggBlock7Variant17getTranslationKeyEv 0x0000007100257078,U,000280, 0x0000007100257190,U,000184, 0x0000007100257248,U,002000,_ZN18MonsterRoomFeature5placeEP5LevelR6RandomRK8BlockPos @@ -16694,7 +16694,7 @@ Address,Quality,Size,Name 0x000000710025ad18,U,000116, 0x000000710025ad8c,U,001172, 0x000000710025b220,U,000008, -0x000000710025b228,U,000096,_ZN14MultiBlockItemC_gen +0x000000710025b228,O,000096,_ZN14MultiBlockItemC1EP5BlockS1_PFj12not_null_ptrI12ItemInstanceEES6_ 0x000000710025b288,U,000008, 0x000000710025b290,U,000108, 0x000000710025b2fc,U,000108, @@ -16754,7 +16754,7 @@ Address,Quality,Size,Name 0x000000710025d4b0,U,000080,_ZN13MyceliumBlock10getTextureEPK9DirectionPK10BlockState 0x000000710025d500,U,000240,_ZN13MyceliumBlock10getTextureEP11LevelSourceRK8BlockPosPK9DirectionPK10BlockState 0x000000710025d5f0,U,000264,_ZN13MyceliumBlock13registerIconsEP12IconRegister -0x000000710025d6f8,U,000048,_ZN11NameTagItemC_gen +0x000000710025d6f8,O,000048,_ZN11NameTagItemC1Ev 0x000000710025d728,U,000660,_ZN11NameTagItem13interactEnemyE12not_null_ptrI12ItemInstanceENSt3__110shared_ptrI6PlayerEENS4_I12LivingEntityEEN15InteractionHand16EInteractionHandE 0x000000710025d9bc,U,000020, 0x000000710025d9d0,U,000240, @@ -16936,8 +16936,8 @@ Address,Quality,Size,Name 0x000000710026ab1c,O,000324,_ZN21NetherFlatLevelSource11createChunkEii 0x000000710026ac60,O,000016,_ZN21NetherFlatLevelSource10lightChunkEP10LevelChunk 0x000000710026ac70,M,000604,_ZN21NetherFlatLevelSource11postProcessEii -0x000000710026aecc,O,000052,_ZN15HellFireFeatureC1Ev -0x000000710026af00,O,000052,_ZN15LightGemFeatureC1Ev +0x000000710026aecc,O,000052,_ZN15HellFireFeatureC2Ev +0x000000710026af00,O,000052,_ZN15LightGemFeatureC2Ev 0x000000710026af34,O,000068,_ZN21NetherFlatLevelSource9getMobsAtEP11MobCategoryRK8BlockPos 0x000000710026af78,O,000008,_ZN21NetherFlatLevelSource22postProcessLoadedChunkEP10LevelChunkii 0x000000710026af80,O,000008,_ZN21NetherFlatLevelSource21findNearestMapFeatureEP5LevelRKNSt3__112basic_stringIwNS2_11char_traitsIwEENS2_9allocatorIwEEEERK8BlockPosb @@ -17920,7 +17920,7 @@ Address,Quality,Size,Name 0x00000071002956f8,U,000016, 0x0000007100295708,U,000016, 0x0000007100295718,U,000060,_ZN8MinecartC_gen3 -0x0000007100295754,U,000036,_ZN15MinecartFurnaceD0Ev +0x0000007100295754,O,000036,_ZN15MinecartFurnaceD0Ev 0x0000007100295778,U,000012, 0x0000007100295784,U,000068, 0x00000071002957c8,U,000036, @@ -19337,7 +19337,7 @@ Address,Quality,Size,Name 0x00000071002af1d4,U,000004,_ZNSt3__120__shared_ptr_pointerIP21MobSpawnerBlockEntityNS_14default_deleteIS1_EENS_9allocatorIS1_EEE21__on_zero_shared_weakEv 0x00000071002af1d8,U,000092, 0x00000071002af234,U,000088, -0x00000071002af28c,U,000256, +0x00000071002af28c,O,000256,_ZNSt3__112__hash_tableINS_17__hash_value_typeI12eMODIFIER_IDP17AttributeModifierEENS_22__unordered_map_hasherIS2_S5_NS_4hashIS2_EELb1EEENS_21__unordered_map_equalIS2_S5_NS_8equal_toIS2_EELb1EEENS_9allocatorIS5_EEE4findIS2_EENS_15__hash_iteratorIPNS_11__hash_nodeIS5_PvEEEERKT_ 0x00000071002af38c,U,000096, 0x00000071002af3ec,U,000820, 0x00000071002af720,U,000064, @@ -19817,7 +19817,7 @@ Address,Quality,Size,Name 0x00000071002bda70,U,000056, 0x00000071002bdaa8,U,000748, 0x00000071002bdd94,O,000800,_ZN11PickaxeItem10staticCtorEv -0x00000071002be0b4,U,000072,_ZN11PickaxeItemC_gen +0x00000071002be0b4,O,000072,_ZN11PickaxeItemC1EPKN4Item4TierE 0x00000071002be0fc,O,000444,_ZN11PickaxeItem17canDestroySpecialEPK10BlockState 0x00000071002be2b8,O,000180,_ZN11PickaxeItem15getDestroySpeedE12not_null_ptrI12ItemInstanceEP10BlockState 0x00000071002be36c,U,000244,_ZN3Pig10staticCtorEv @@ -19926,7 +19926,7 @@ Address,Quality,Size,Name 0x00000071002c2a7c,U,000512, 0x00000071002c2c7c,U,000164,_ZN15PistonBaseBlock13registerIconsEP12IconRegister 0x00000071002c2d20,U,000008,_ZN15PistonBaseBlock14getRenderShapeEPK10BlockState -0x00000071002c2d28,U,000048,_ZN15PistonBlockItemC_gen +0x00000071002c2d28,O,000048,_ZN15PistonBlockItemC1EP5Block 0x00000071002c2d58,U,000008, 0x00000071002c2d60,U,000068,_ZN15PistonHeadBlock10PistonTypeE_0C_gen 0x00000071002c2da4,U,000012, @@ -20045,7 +20045,7 @@ Address,Quality,Size,Name 0x00000071002c6f80,O,000112,_ZN11PlanksBlock7VariantC2EiRKNSt3__112basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEEjPK13MaterialColor 0x00000071002c6ff0,O,000012,_ZNK11PlanksBlock7Variant8toStringEv 0x00000071002c6ffc,O,000012,_ZNK11PlanksBlock7Variant17getSerializedNameEv -0x00000071002c7008,U,000008, +0x00000071002c7008,O,000008,_ZN11PlanksBlock7Variant9getNameIdEv 0x00000071002c7010,O,000028,_ZN11PlanksBlock16getDescriptionIdEi 0x00000071002c702c,O,000060,_ZN11PlanksBlock10getTextureEPK9DirectionPK10BlockState 0x00000071002c7068,O,000284,_ZN11PlanksBlock13registerIconsEP12IconRegister @@ -20071,7 +20071,7 @@ Address,Quality,Size,Name 0x00000071002c8a28,U,000472,_ZN6Player15updateFrameTickEv 0x00000071002c8c00,U,000072, 0x00000071002c8c48,U,003100,_ZN6Player4tickEv -0x00000071002c9864,U,000068, +0x00000071002c9864,O,000068,_ZN6Player24hasInvulnerablePrivilegeEv 0x00000071002c98a8,U,000344, 0x00000071002c9a00,U,000228,_ZN6Player9moveCloakEv 0x00000071002c9ae4,U,000008, @@ -20134,7 +20134,7 @@ Address,Quality,Size,Name 0x00000071002ccd4c,U,001516,_ZN6Player20addAdditonalSaveDataEP11CompoundTag 0x00000071002cd338,U,000276, 0x00000071002cd44c,U,000820,_ZN6Player4hurtEP12DamageSourcef -0x00000071002cd780,U,000068, +0x00000071002cd780,O,000068,_ZN6Player14isAllowedToFlyEv 0x00000071002cd7c4,U,000148,_ZN6Player16blockUsingShieldERKSt10shared_ptrI12LivingEntityE 0x00000071002cd858,U,000116,_ZN6Player13canHarmPlayerENSt3__110shared_ptrIS_EE 0x00000071002cd8cc,O,000004,_ZN6Player13canHarmPlayerENSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE @@ -20143,7 +20143,7 @@ Address,Quality,Size,Name 0x00000071002cd948,O,000004,_ZN6Player23hurtCurrentlyUsedShieldEf 0x00000071002cd94c,M,000160,_ZN6Player23getArmorCoverPercentageEv 0x00000071002cd9ec,U,000372,_ZN6Player12actuallyHurtE12DamageSourcef -0x00000071002cdb60,U,000160, +0x00000071002cdb60,O,000160,_ZN6Player19causeFoodExhaustionEf 0x00000071002cdc00,O,000004,_ZN6Player12openTextEditENSt3__110shared_ptrI15SignBlockEntityEE 0x00000071002cdc04,O,000004,_ZN6Player24openMinecartCommandBlockENSt3__110shared_ptrI16BaseCommandBlockEE 0x00000071002cdc08,O,000004,_ZN6Player16openCommandBlockENSt3__110shared_ptrI18CommandBlockEntityEE @@ -20218,11 +20218,11 @@ Address,Quality,Size,Name 0x00000071002d0be4,U,000008,_ZN6Player18getEnchantmentSeedEv 0x00000071002d0bec,U,000072,_ZN6Player22onEnchantmentPerformedEi 0x00000071002d0c34,U,000308,_ZN6Player20giveExperienceLevelsEi -0x00000071002d0d68,U,000068, +0x00000071002d0d68,O,000068,_ZN6Player21usesLegacyFoodHealingEv 0x00000071002d0dac,U,000008,_ZN6Player22getPlayerGamePrivilegeEi -0x00000071002d0db4,U,000008, +0x00000071002d0db4,O,000008,_ZN6Player11getFoodDataEv 0x00000071002d0dbc,U,000084, -0x00000071002d0e10,U,000108, +0x00000071002d0e10,O,000108,_ZN6Player6isHurtEv 0x00000071002d0e7c,U,000008,_ZN6Player8mayBuildEv 0x00000071002d0e84,U,000276,_ZN6Player12mayUseItemAtERK8BlockPosPK9Direction12not_null_ptrI12ItemInstanceE 0x00000071002d0f98,U,000080,_ZN6Player19getExperienceRewardENSt3__110shared_ptrI6PlayerEE @@ -20486,7 +20486,7 @@ Address,Quality,Size,Name 0x00000071002dbe68,U,000140, 0x00000071002dbef4,U,000012, 0x00000071002dbf00,U,000012, -0x00000071002dbf0c,U,000060,_ZN10PotionItemC_gen +0x00000071002dbf0c,U,000060,_ZN10PotionItemC1Ev 0x00000071002dbf48,U,000076, 0x00000071002dbf94,U,000008, 0x00000071002dbf9c,U,000804,_ZN10PotionItem15finishUsingItemE12not_null_ptrI12ItemInstanceEP5LevelNSt3__110shared_ptrI12LivingEntityEE @@ -20600,8 +20600,8 @@ Address,Quality,Size,Name 0x00000071002e0ad4,O,000128,_ZN15PrismarineBlock7VariantC2EiRKNSt3__112basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEEiiS9_ 0x00000071002e0b54,O,000012,_ZNK15PrismarineBlock7Variant8toStringEv 0x00000071002e0b60,O,000012,_ZNK15PrismarineBlock7Variant17getSerializedNameEv -0x00000071002e0b6c,U,000008,_ZN15PrismarineBlock7Variant9getNameIdEv -0x00000071002e0b74,U,000008,_ZN15PrismarineBlock7Variant16getDescriptionIdEv +0x00000071002e0b6c,O,000008,_ZN15PrismarineBlock7Variant9getNameIdEv +0x00000071002e0b74,O,000008,_ZN15PrismarineBlock7Variant16getDescriptionIdEv 0x00000071002e0b7c,U,000076,_ZN10ProjectileC1EP5LevelRKNSt3__110shared_ptrI12LivingEntityEE 0x00000071002e0bc8,U,000648, 0x00000071002e0e50,U,000784, @@ -20775,7 +20775,7 @@ Address,Quality,Size,Name 0x00000071002e7154,U,000008, 0x00000071002e715c,U,000008, 0x00000071002e7164,U,000008, -0x00000071002e716c,U,000008,_ZN40RandomizableLockableContainerBlockEntity12setLootTableEP16ResourceLocationx +0x00000071002e716c,O,000008,_ZN40RandomizableLockableContainerBlockEntity12setLootTableEP16ResourceLocationx 0x00000071002e7174,U,000300, 0x00000071002e72a0,U,000236, 0x00000071002e738c,U,000248, @@ -20854,8 +20854,8 @@ Address,Quality,Size,Name 0x00000071002e8ee8,U,000092, 0x00000071002e8f44,U,000704, 0x00000071002e9204,O,000488,_ZN7Sensing6canSeeENSt3__110shared_ptrI6EntityEE -0x00000071002e93ec,U,000072,_ZN15RangedAttributeC1EP9Attribute13eATTRIBUTE_IDddd -0x00000071002e9434,U,000008, +0x00000071002e93ec,O,000072,_ZN15RangedAttributeC1EP9Attribute13eATTRIBUTE_IDddd +0x00000071002e9434,O,000008,_ZN15RangedAttribute13sanitizeValueEd 0x00000071002e943c,U,000124,_ZN19RangedBowAttackGoalC_gen 0x00000071002e94b8,U,000008, 0x00000071002e94c0,U,000092, @@ -20901,7 +20901,7 @@ Address,Quality,Size,Name 0x00000071002f067c,U,000012, 0x00000071002f0688,U,000012, 0x00000071002f0694,U,000004, -0x00000071002f0698,U,000128,_ZN10RecordItemC_gen +0x00000071002f0698,U,000128,_ZN10RecordItemC1ERKNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEEjP10SoundEvent 0x00000071002f0718,U,000596, 0x00000071002f096c,U,000380,_ZN10RecordItem5useOnENSt3__110shared_ptrI6PlayerEEP5LevelRK8BlockPosN15InteractionHand16EInteractionHandEPK9Directionfffb 0x00000071002f0ae8,U,000216,_ZN10RecordItem15appendHoverTextE12not_null_ptrI12ItemInstanceENSt3__110shared_ptrI6PlayerEEPvb @@ -20927,10 +20927,10 @@ Address,Quality,Size,Name 0x00000071002f1218,O,000096,_ZN17RedSandStoneBlock7VariantC2EiRKNSt3__112basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEEj 0x00000071002f1278,O,000012,_ZNK17RedSandStoneBlock7Variant8toStringEv 0x00000071002f1284,O,000012,_ZNK17RedSandStoneBlock7Variant17getSerializedNameEv -0x00000071002f1290,U,000008, +0x00000071002f1290,O,000008,_ZN17RedSandStoneBlock7Variant9getNameIdEv 0x00000071002f1298,O,000160,_ZN17RedSandStoneBlock10getTextureEPK9DirectionPK10BlockState 0x00000071002f1338,O,000176,_ZN17RedSandStoneBlock13registerIconsEP12IconRegister -0x00000071002f13e8,U,000048,_ZN16RedStoneDustItemC_gen +0x00000071002f13e8,O,000048,_ZN16RedStoneDustItemC1Ev 0x00000071002f1418,U,000524,_ZN16RedStoneDustItem5useOnENSt3__110shared_ptrI6PlayerEEP5LevelRK8BlockPosN15InteractionHand16EInteractionHandEPK9Directionfffb 0x00000071002f1624,U,000124,_ZN17RedstoneLampBlockC_gen 0x00000071002f16a0,U,000192,_ZN17RedstoneLampBlock7onPlaceEP5LevelRK8BlockPosPK10BlockState @@ -21238,7 +21238,7 @@ Address,Quality,Size,Name 0x00000071002fe72c,U,000076, 0x00000071002fe778,U,000080, 0x00000071002fe7c8,U,000040, -0x00000071002fe7f0,U,000048, +0x00000071002fe7f0,O,000048,_ZN8RotationC2ERKNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEENS_5eTYPEE 0x00000071002fe820,U,000044, 0x00000071002fe84c,U,000208, 0x00000071002fe91c,U,000128, @@ -21253,7 +21253,7 @@ Address,Quality,Size,Name 0x00000071002fec14,U,000060, 0x00000071002fec50,U,000100, 0x00000071002fecb4,U,000360, -0x00000071002fee1c,U,000056,_ZN10SaddleItemC_gen +0x00000071002fee1c,O,000056,_ZN10SaddleItemC1Ev 0x00000071002fee54,U,000276,_ZN10SaddleItem13interactEnemyE12not_null_ptrI12ItemInstanceENSt3__110shared_ptrI6PlayerEENS4_I12LivingEntityEEN15InteractionHand16EInteractionHandE 0x00000071002fef68,O,000400,_ZN9SandBlock15blockStaticCtorEv 0x00000071002ff0f8,O,000664,_ZN12EnumPropertyIPN9SandBlock7VariantEE6createILi2EEEPS3_RKNSt3__112basic_stringIwNS6_11char_traitsIwEENS6_9allocatorIwEEEERKSt9type_infoRAT__S2_P9PredicateIS2_E @@ -21272,8 +21272,8 @@ Address,Quality,Size,Name 0x00000071002ff63c,O,000012,_ZN9SandBlock7Variant7getNameEv 0x00000071002ff648,O,000012,_ZNK9SandBlock7Variant8toStringEv 0x00000071002ff654,O,000012,_ZNK9SandBlock7Variant17getSerializedNameEv -0x00000071002ff660,U,000008, -0x00000071002ff668,U,000008, +0x00000071002ff660,O,000008,_ZN9SandBlock7Variant9getNameIdEv +0x00000071002ff668,O,000008,_ZN9SandBlock7Variant16getDescriptionIdEv 0x00000071002ff670,O,000060,_ZN9SandBlock10getTextureEPK9DirectionPK10BlockState 0x00000071002ff6ac,O,000144,_ZN9SandBlock13registerIconsEP12IconRegister 0x00000071002ff73c,U,000076,__ct__11SandFeatureFP5Blocki @@ -21292,7 +21292,7 @@ Address,Quality,Size,Name 0x00000071002fff3c,O,000096,_ZN14SandStoneBlock7VariantC2EiRKNSt3__112basic_stringIwNS1_11char_traitsIwEENS1_9allocatorIwEEEEj 0x00000071002fff9c,O,000012,_ZNK14SandStoneBlock7Variant8toStringEv 0x00000071002fffa8,O,000012,_ZNK14SandStoneBlock7Variant17getSerializedNameEv -0x00000071002fffb4,U,000008, +0x00000071002fffb4,O,000008,_ZN14SandStoneBlock7Variant9getNameIdEv 0x00000071002fffbc,O,000160,_ZN14SandStoneBlock10getTextureEPK9DirectionPK10BlockState 0x000000710030005c,O,000176,_ZN14SandStoneBlock13registerIconsEP12IconRegister 0x000000710030010c,U,000124,_ZN12SaplingBlock15blockStaticCtorEv @@ -21475,7 +21475,7 @@ Address,Quality,Size,Name 0x000000710030df80,U,000008,_ZN15SeaLanternBlock15isSilkTouchableEv 0x000000710030df88,U,000072,_ZN12SeedFoodItemC1EifP5BlockS1_ 0x000000710030dfd0,U,000404, -0x000000710030e164,U,000068,_ZN8SeedItemC_gen +0x000000710030e164,O,000068,_ZN8SeedItemC1EP5BlockS1_ 0x000000710030e1a8,U,000396,_ZN8SeedItem5useOnENSt3__110shared_ptrI6PlayerEEP5LevelRK8BlockPosN15InteractionHand16EInteractionHandEPK9Directionfffb 0x000000710030e334,O,000020,_ZN7SensingC1EP3Mob 0x000000710030e348,O,000092,_ZN7Sensing4tickEv @@ -21824,7 +21824,7 @@ Address,Quality,Size,Name 0x000000710031546c,U,000212, 0x0000007100315540,U,000412, 0x00000071003156dc,U,000276, -0x00000071003157f0,U,000068,_ZN10ShearsItemC_gen +0x00000071003157f0,U,000068,_ZN10ShearsItemC1Ev 0x0000007100315834,U,000388,_ZN10ShearsItem9mineBlockE12not_null_ptrI12ItemInstanceEP5LevelPK10BlockStateRK8BlockPosNSt3__110shared_ptrI12LivingEntityEE 0x00000071003159b8,U,000100,_ZN10ShearsItem17canDestroySpecialEPK10BlockState 0x0000007100315a1c,U,000204,_ZN10ShearsItem15getDestroySpeedE12not_null_ptrI12ItemInstanceEP10BlockState @@ -22057,7 +22057,7 @@ Address,Quality,Size,Name 0x000000710031ccf4,U,000004, 0x000000710031ccf8,U,000016, 0x000000710031cd08,U,000392, -0x000000710031ce90,U,000056,_ZN19ShulkerBoxBlockItemC_gen +0x000000710031ce90,O,000056,_ZN19ShulkerBoxBlockItemC1EP5Block 0x000000710031cec8,U,000988,_ZN14ShulkerBoxMenuC_gen 0x000000710031d2a4,U,000096, 0x000000710031d304,U,000472, @@ -22142,7 +22142,7 @@ Address,Quality,Size,Name 0x0000007100320ab0,U,000008, 0x0000007100320ab8,U,000008, 0x0000007100320ac0,U,000008, -0x0000007100320ac8,U,000056,_ZN8SignItemC_gen +0x0000007100320ac8,O,000056,_ZN8SignItemC1Ev 0x0000007100320b00,U,001020,_ZN8SignItem5useOnENSt3__110shared_ptrI6PlayerEEP5LevelRK8BlockPosN15InteractionHand16EInteractionHandEPK9Directionfffb 0x0000007100320efc,U,000056,_ZN10Silverfish27SilverfishWakeUpFriendsGoalC_gen 0x0000007100320f34,U,000020, @@ -22199,7 +22199,7 @@ Address,Quality,Size,Name 0x000000710032217c,U,000004, 0x0000007100322180,U,000008, 0x0000007100322188,U,000008, -0x0000007100322190,U,000048,_ZN16SimpleFoiledItemC_gen +0x0000007100322190,O,000048,_ZN16SimpleFoiledItemC1Ev 0x00000071003221c0,U,000008,_ZN16SimpleFoiledItem6isFoilE12not_null_ptrI12ItemInstanceE 0x00000071003221c8,U,000276, 0x00000071003222dc,U,000004, @@ -23493,14 +23493,14 @@ Address,Quality,Size,Name 0x0000007100343624,U,000156, 0x00000071003436c0,U,000156, 0x000000710034375c,U,000172, -0x0000007100343808,U,000068,_ZN9SkullItemC_gen +0x0000007100343808,U,000068,_ZN9SkullItemC1Ev 0x000000710034384c,U,000808,_ZN9SkullItem5useOnENSt3__110shared_ptrI6PlayerEEP5LevelRK8BlockPosN15InteractionHand16EInteractionHandEPK9Directionfffb 0x0000007100343b74,U,000008,_ZN9SkullItem23getLevelDataForAuxValueEi 0x0000007100343b7c,U,000028,_ZN9SkullItem16getDescriptionIdEi 0x0000007100343b98,U,000048,_ZN9SkullItem16getDescriptionIdE12not_null_ptrI12ItemInstanceE 0x0000007100343bc8,U,000528,_ZN9SkullItem7getNameERKNSt3__110shared_ptrI12ItemInstanceEE 0x0000007100343dd8,U,000008,_ZN9SkullItem18verifyTagAfterLoadEP11CompoundTag -0x0000007100343de0,U,000088,_ZN13SlabBlockItem13SlabBlockItemEP5BlockP13HalfSlabBlockP13HalfSlabBlock +0x0000007100343de0,O,000088,_ZN13SlabBlockItemC1EP5BlockP13HalfSlabBlockS3_ 0x0000007100343e38,U,000008, 0x0000007100343e40,U,000060, 0x0000007100343e7c,U,001068, @@ -23617,7 +23617,7 @@ Address,Quality,Size,Name 0x00000071003477b0,U,000624, 0x0000007100347a20,U,000044, 0x0000007100347a4c,U,000028, -0x0000007100347a68,U,000056,_ZN12SnowballItemC_gen +0x0000007100347a68,O,000056,_ZN12SnowballItemC1Ev 0x0000007100347aa0,U,000640,_ZN12SnowballItem3useEP5LevelNSt3__110shared_ptrI6PlayerEEN15InteractionHand16EInteractionHandE 0x0000007100347d20,U,000216,_ZNSt3__120__shared_ptr_pointerIP8SnowballNS_14default_deleteIS1_EENS_9allocatorIS1_EEEC_gen 0x0000007100347df8,U,000016, @@ -23627,7 +23627,7 @@ Address,Quality,Size,Name 0x0000007100347e78,U,000008,_ZN9SnowBlock16getResourceCountEP6Random 0x0000007100347e80,U,000156,_ZN9SnowBlock4tickEP5LevelRK8BlockPosPK10BlockStateP6Random 0x0000007100347f1c,U,000044,_ZN9SnowBlock15shouldBlockTickEP5LevelRK8BlockPosPK10BlockState -0x0000007100347f48,U,000068,_ZN8SnowItemC_gen +0x0000007100347f48,O,000068,_ZN8SnowItemC1EP5Block 0x0000007100347f8c,U,000824, 0x00000071003482c4,U,000008, 0x00000071003482cc,U,000108, @@ -24030,7 +24030,7 @@ Address,Quality,Size,Name 0x000000710035cc74,U,000036,_ZN9SpawnDataD0Ev 0x000000710035cc98,U,000644, 0x000000710035cf1c,U,000008, -0x000000710035cf24,U,000076,_ZN12SpawnEggItemC_gen +0x000000710035cf24,U,000076,_ZN12SpawnEggItemC1Ev 0x000000710035cf70,U,000440,_ZN12SpawnEggItem7getNameERKNSt3__110shared_ptrI12ItemInstanceEE 0x000000710035d128,U,000448, 0x000000710035d2e8,U,000268,replaceAll__FRCQ2_3std78basic_string__tm__58_wQ2_3std20char_traits__tm__2_wQ2_3std18allocator__tm__2_wN21 @@ -24059,7 +24059,7 @@ Address,Quality,Size,Name 0x000000710035e874,U,000116, 0x000000710035e8e8,U,000064, 0x000000710035e928,U,000124, -0x000000710035e9a4,U,000048,_ZN17SpectralArrowItemC_gen +0x000000710035e9a4,U,000048,_ZN17SpectralArrowItemC1Ev 0x000000710035e9d4,U,000148, 0x000000710035ea68,U,000216,_ZNSt3__120__shared_ptr_pointerIP13SpectralArrowNS_14default_deleteIS1_EENS_9allocatorIS1_EEEC_gen 0x000000710035eb40,U,000016, @@ -24301,20 +24301,20 @@ Address,Quality,Size,Name 0x0000007100365998,U,000048,_ZN4Stat13TimeFormatterC_gen 0x00000071003659c8,U,000048,_ZN4Stat17DistanceFormatterC_gen 0x00000071003659f8,U,000004, -0x00000071003659fc,U,000012, -0x0000007100365a08,U,000072,_ZN4StatC_gen2 -0x0000007100365a50,U,000080,_ZN4StatC_gen3 -0x0000007100365aa0,U,000012, -0x0000007100365aac,U,000624, -0x0000007100365d1c,U,000008, -0x0000007100365d24,U,000012, -0x0000007100365d30,U,000008, -0x0000007100365d38,U,000008, -0x0000007100365d40,U,000008, -0x0000007100365d48,U,000012, -0x0000007100365d54,U,000012, -0x0000007100365d60,U,000012, -0x0000007100365d6c,U,000016, +0x00000071003659fc,O,000012,_ZN4Stat15initializeFlagsEv +0x0000007100365a08,O,000072,_ZN4StatC1EiRKNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEEPNS_9FormatterE +0x0000007100365a50,O,000080,_ZN4StatC1EiRKNSt3__112basic_stringIwNS0_11char_traitsIwEENS0_9allocatorIwEEEE +0x0000007100365aa0,O,000012,_ZN4Stat7setFlagEv +0x0000007100365aac,O,000624,_ZN4Stat12registerStatEb +0x0000007100365d1c,O,000008,_ZN4Stat13isAchievementEv +0x0000007100365d24,O,000012,_ZN4Stat14setIndependentEv +0x0000007100365d30,O,000008,_ZN4Stat8getFlag1Ev +0x0000007100365d38,O,000008,_ZN4Stat8getFlag2Ev +0x0000007100365d40,O,000008,_ZN4Stat8getFlag0Ev +0x0000007100365d48,O,000012,_ZN4Stat8setFlag2Eb +0x0000007100365d54,O,000012,_ZN4Stat8setFlag1Eb +0x0000007100365d60,O,000012,_ZN4Stat8setFlag0Eb +0x0000007100365d6c,O,000016,_ZN4Stat11isFlagClearEv 0x0000007100365d7c,U,000328, 0x0000007100365ec4,U,000100, 0x0000007100365f28,U,000268,_ZNSt3__115basic_stringbufIwNS_11char_traitsIwEENS_9allocatorIwEEEC_gen12 @@ -24389,8 +24389,8 @@ Address,Quality,Size,Name 0x000000710036b584,M,000160,_ZN10StoneBlock7VariantC2EiPK13MaterialColorRKNSt3__112basic_stringIwNS4_11char_traitsIwEENS4_9allocatorIwEEEEiiSC_b 0x000000710036b624,O,000012,_ZNK10StoneBlock7Variant8toStringEv 0x000000710036b630,O,000012,_ZNK10StoneBlock7Variant17getSerializedNameEv -0x000000710036b63c,U,000008, -0x000000710036b644,U,000008, +0x000000710036b63c,O,000008,_ZN10StoneBlock7Variant9getNameIdEv +0x000000710036b644,O,000008,_ZN10StoneBlock7Variant16getDescriptionIdEv 0x000000710036b64c,U,000008, 0x000000710036b654,O,000236,_ZN15StoneBrickBlock15blockStaticCtorEv 0x000000710036b740,O,000664,_ZN12EnumPropertyIPN15StoneBrickBlock7VariantEE6createILi4EEEPS3_RKNSt3__112basic_stringIwNS6_11char_traitsIwEENS6_9allocatorIwEEEERKSt9type_infoRAT__S2_P9PredicateIS2_E @@ -24840,7 +24840,7 @@ Address,Quality,Size,Name 0x0000007100381a0c,U,000016, 0x0000007100381a1c,U,000016, 0x0000007100381a2c,U,000332, -0x0000007100381b78,U,000104,_ZN9SwordItemC_gen +0x0000007100381b78,U,000104,_ZN9SwordItemC1EPKN4Item4TierE 0x0000007100381be0,U,000008, 0x0000007100381be8,U,000296,_ZN9SwordItem15getDestroySpeedE12not_null_ptrI12ItemInstanceEP10BlockState 0x0000007100381d10,U,000088,_ZN9SwordItem9hurtEnemyE12not_null_ptrI12ItemInstanceENSt3__110shared_ptrI12LivingEntityEES6_ @@ -25270,9 +25270,9 @@ Address,Quality,Size,Name 0x00000071003929cc,U,000204,_ZN11TimeCommand7executeENSt3__110shared_ptrI13CommandSenderEE15arrayWithLengthIhE 0x0000007100392a98,U,000092, 0x0000007100392af4,U,000144, -0x0000007100392b84,U,000096,_ZN15TintedBlockItemC1EP5Blockb +0x0000007100392b84,O,000096,_ZN15TintedBlockItemC1EP5Blockb 0x0000007100392be4,U,000008, -0x0000007100392bec,U,000148, +0x0000007100392bec,O,000148,_ZN15TintedBlockItem17setDescriptionIdsE15arrayWithLengthIiE 0x0000007100392c80,U,000128, 0x0000007100392d00,U,000004, 0x0000007100392d04,U,000052,_ZN13TippableArrow10staticCtorEv @@ -26039,7 +26039,7 @@ Address,Quality,Size,Name 0x00000071003bded4,U,000008, 0x00000071003bdedc,U,000032,_ZN9WallBlock16shouldRenderFaceEPK10BlockStateP11LevelSourceRK8BlockPosPK9Direction 0x00000071003bdefc,U,000076,_ZN9WallBlock13getBlockStateEi -0x00000071003bdf48,U,000028, +0x00000071003bdf48,O,000028,_ZN9WallBlock7Variant6byDataEi 0x00000071003bdf64,U,000040,_ZN9WallBlock29convertBlockStateToLegacyDataEPK10BlockState 0x00000071003bdf8c,U,000464,_ZN9WallBlock31fillVirtualBlockStatePropertiesEPK10BlockStateP11LevelSourceRK8BlockPos 0x00000071003be15c,U,000196,_ZN9WallBlock26createBlockStateDefinitionEv @@ -26050,7 +26050,7 @@ Address,Quality,Size,Name 0x00000071003be2c0,U,000096,_ZN9WallBlock7VariantE_0C_gen 0x00000071003be320,U,000012, 0x00000071003be32c,U,000012, -0x00000071003be338,U,000008, +0x00000071003be338,O,000008,_ZN9WallBlock7Variant9getNameIdEv 0x00000071003be340,U,000068,_ZN21WallClimberNavigationC_gen 0x00000071003be384,U,000060,_ZN21WallClimberNavigationD2Ev 0x00000071003be3c0,U,000036,_ZN21WallClimberNavigationD0Ev @@ -26130,7 +26130,7 @@ Address,Quality,Size,Name 0x00000071003bf818,O,000212,_ZN14WaterlilyBlock10canSurviveEP5LevelRK8BlockPosPK10BlockState 0x00000071003bf8ec,O,000008,_ZN14WaterlilyBlock29convertBlockStateToLegacyDataEPK10BlockState 0x00000071003bf8f4,O,000008,_ZN14WaterlilyBlock14getRenderShapeEPK10BlockState -0x00000071003bf8fc,U,000052,_ZN18WaterLilyBlockItemC_gen +0x00000071003bf8fc,O,000052,_ZN18WaterLilyBlockItemC1EP5Block 0x00000071003bf930,U,000512, 0x00000071003bfb30,U,000708, 0x00000071003bfdf4,U,000128, @@ -26538,12 +26538,12 @@ Address,Quality,Size,Name 0x00000071003d2fb4,U,000104, 0x00000071003d301c,U,000096, 0x00000071003d307c,U,000096, -0x00000071003d30dc,U,000056,_ZN16WritableBookItemC_gen +0x00000071003d30dc,O,000056,_ZN16WritableBookItemC1Ev 0x00000071003d3114,U,000148,_ZN16WritableBookItem3useEP5LevelNSt3__110shared_ptrI6PlayerEEN15InteractionHand16EInteractionHandE 0x00000071003d31a8,U,000008,_ZN16WritableBookItem7TestUseEP5LevelNSt3__110shared_ptrI6PlayerEEN15InteractionHand16EInteractionHandE 0x00000071003d31b0,U,000204, 0x00000071003d327c,U,000012,_ZN16WritableBookItem13GetUseTooltipERK21ItemToolTipDataHolder -0x00000071003d3288,U,000056,_ZN15WrittenBookItemC_gen +0x00000071003d3288,O,000056,_ZN15WrittenBookItemC1Ev 0x00000071003d32c0,U,000172, 0x00000071003d336c,U,000032, 0x00000071003d338c,U,000816,_ZN15WrittenBookItem7getNameERKNSt3__110shared_ptrI12ItemInstanceEE @@ -26686,7 +26686,7 @@ Address,Quality,Size,Name 0x00000071003d8394,U,000012, 0x00000071003d83a0,U,000008, 0x00000071003d83a8,U,000008, -0x00000071003d83b0,U,000036,_ZN4StatD0Ev +0x00000071003d83b0,O,000036,_ZN4StatD0Ev 0x00000071003d83d4,U,000036,_ZN12SnowballItemD0Ev 0x00000071003d83f8,U,000036,_ZN9SnowBlockD0Ev 0x00000071003d841c,U,000036,_ZN8SnowItemD0Ev @@ -44252,7 +44252,7 @@ Address,Quality,Size,Name 0x0000007100718588,U,000068, 0x00000071007185cc,U,000076,_ZN16ResourceLocationC1ERKS_ 0x0000007100718618,U,000012, -0x0000007100718624,U,000036,_ZN16ResourceLocation4__asERK16ResourceLocation +0x0000007100718624,U,000036,_ZN16ResourceLocationaSERKS_ 0x0000007100718648,U,000100,_ZN16ResourceLocationC1Ev 0x00000071007186ac,U,000192,_ZN16ResourceLocationC_gen 0x000000710071876c,U,000012, @@ -48227,8 +48227,8 @@ Address,Quality,Size,Name 0x00000071007e0404,U,000072, 0x00000071007e044c,U,000252, 0x00000071007e0548,U,000236,_ZNSt3__115basic_stringbufIwNS_11char_traitsIwEENS_9allocatorIwEEEC_gen37 -0x00000071007e0634,U,000136, -0x00000071007e06bc,U,000028,_ZN9PlayerUID4__neERK9PlayerUID +0x00000071007e0634,M,000136,_ZNK9PlayerUIDeqERKS_ +0x00000071007e06bc,O,000028,_ZNK9PlayerUIDneERKS_ 0x00000071007e06d8,U,000128,_ZNK9PlayerUID8toStringEv 0x00000071007e0758,U,000080, 0x00000071007e07a8,U,000216, diff --git a/src/4JLibraries_Source/NX/Render/C4JRender.h b/src/4JLibraries_Source/NX/Render/C4JRender.h index 46ba7dc4..f40622f1 100644 --- a/src/4JLibraries_Source/NX/Render/C4JRender.h +++ b/src/4JLibraries_Source/NX/Render/C4JRender.h @@ -1,6 +1,6 @@ #pragma once -#include "arm_neon.h" +#include class _XSOCIAL_PREVIEWIMAGE; class ImageFileBuffer; @@ -41,7 +41,7 @@ class C4JRender { virtual void MatrixPop() = 0; virtual void MatrixPush() = 0; virtual float32x4_t MatrixMult(float*) = 0; - virtual void MatrixGet(int) = 0; + virtual float* MatrixGet(int) = 0; virtual void Set_matrixDirty() = 0; virtual void Initialise() = 0; virtual void InitialiseContext() = 0; diff --git a/src/4JLibraries_Source/NX/Render/RendererCore.cpp b/src/4JLibraries_Source/NX/Render/RendererCore.cpp index 44bcdeea..29b8a290 100644 --- a/src/4JLibraries_Source/NX/Render/RendererCore.cpp +++ b/src/4JLibraries_Source/NX/Render/RendererCore.cpp @@ -15,12 +15,66 @@ #include __thread Renderer::Context* sContext; +static __thread MatrixStruct sMatrixResult; + +extern "C" Renderer::Context* Renderer__getContext() { + return sContext; +} + +static const MatrixStruct identityMatrix = { + {{1.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 1.0f, 0.0f}, {0.0f, 0.0f, 0.0f, 1.0f}}}; unsigned int textureWidths[6] = {1920, 1280, 512, 256, 128, 64}; unsigned int textureHeights[6] = {1080, 720, 512, 256, 128, 64}; nn::os::MutexType someRendererMutex; -Renderer::Context::Context(Renderer*, bool a2) { - this->m_filler[0] = a2; +// NON_MATCHING | score: 5575 (lower is better) +Renderer::Context::Context(Renderer*, bool creationFlag) { + m_ptr1DE0 = nullptr; + m_ptr1DE8 = nullptr; + m_ptr1DF0 = nullptr; + m_creationFlag = creationFlag; + // Only the base entries are initialized; stack storage and matrix-dirty flags are preserved. + m_matrixDepth[0] = 0; + m_matrixStacks[0][0] = identityMatrix; + m_matrixDepth[1] = 0; + m_matrixDepth[2] = 0; + m_matrixDepth[3] = 0; + m_matrixMode = 0; + m_matrixStacks[1][0] = identityMatrix; + m_matrixStacks[2][0] = identityMatrix; + m_matrixStacks[3][0] = identityMatrix; + m_byte1040 = false; + m_float1044 = 1.0f; + m_lightingEnabled = false; + for (int i = 0; i < 4; i++) { + m_textureBindings[i] = 0; + m_textureBindingDirty[i] = false; + m_textureFlags[i] = false; + } + m_fogEnabled = false; + m_byte1DD8 = false; + m_commandBuffer = nullptr; + m_dword1CE0 = -1; + memset(m_data1CE8, 0, sizeof(m_data1CE8)); + m_byte1CDC = false; + m_byte1D38 = false; + m_fogDirty = false; + m_byte1CE4 = false; + m_textureScaleUI[0] = 1.0f; + m_textureScaleUI[1] = 1.0f; + m_textureScaleUI[2] = 0.0f; + m_textureScaleUI[3] = 0.0f; + nvnBlendStateSetDefaults(&m_blendState); + nvnDepthStencilStateSetDefaults(&m_depthStencilState); + nvnDepthStencilStateSetDepthTestEnable(&m_depthStencilState, true); + nvnDepthStencilStateSetDepthFunc(&m_depthStencilState, NVN_DEPTH_FUNC_LEQUAL); + nvnColorStateSetDefaults(&m_colorState); + nvnPolygonStateSetDefaults(&m_polygonState); + nvnChannelMaskStateSetDefaults(&m_channelMaskState); + m_depthFunc = NVN_DEPTH_FUNC_LEQUAL; + for (int i = 0; i < 6; i++) + m_stateDirty[i] = true; + m_dword1CC0 = 0; } Renderer::Renderer() : C4JRender() { @@ -31,7 +85,7 @@ Renderer::Renderer() : C4JRender() { Renderer::sInstance = this; } -// NON_MATCHING: inline the tls offset getter, could be some compiler flag +// NON_MATCHING | score: 800 (lower is better) void Renderer::InitialiseContext(bool idk) { sContext = new Renderer::Context(this, idk); } @@ -429,3 +483,115 @@ float32x4_t Renderer::MatrixMult(float* matrix) { void Renderer::UpdateGamma(unsigned short gamma) { this->m_gammaIntensity = gamma; } + +void Renderer::MatrixMode(int mode) { + Renderer__getContext()->m_matrixMode = mode; +} + +void Renderer::MatrixSetIdentity() { + Context* context = Renderer__getContext(); + int mode = context->m_matrixMode; + MatrixStruct& top = context->m_matrixStacks[mode][context->m_matrixDepth[mode]]; + top.m__[0] = identityMatrix.m__[0]; + top.m__[1] = identityMatrix.m__[1]; + top.m__[2] = identityMatrix.m__[2]; + top.m__[3] = identityMatrix.m__[3]; + context->m_matrixDirty[context->m_matrixMode] = true; +} + +float32x4_t Renderer::MultWithStack(MatrixStruct input) { + Context* context = Renderer__getContext(); + int mode = context->m_matrixMode; + MatrixStruct& top = context->m_matrixStacks[mode][context->m_matrixDepth[mode]]; + float32x4_t a = top.m__[0]; + float32x4_t b = top.m__[1]; + float32x4_t c = top.m__[2]; + float32x4_t d = top.m__[3]; + float32x4_t result; + for (int i = 0; i < 4; i++) { + float32x4_t column = vmulq_laneq_f32(a, input.m__[i], 0); + column = vfmaq_laneq_f32(column, b, input.m__[i], 1); + column = vfmaq_laneq_f32(column, c, input.m__[i], 2); + result = vfmaq_laneq_f32(column, d, input.m__[i], 3); + top.m__[i] = result; + } + context->m_matrixDirty[context->m_matrixMode] = true; + return result; +} + +void Renderer::MatrixTranslate(float x, float y, float z) { + MatrixStruct matrix = identityMatrix; + matrix.m__[3] = (float32x4_t){x, y, z, 1.0f}; + MultWithStack(matrix); +} + +void Renderer::MatrixScale(float x, float y, float z) { + MatrixStruct matrix + = {{{x, 0.0f, 0.0f, 0.0f}, {0.0f, y, 0.0f, 0.0f}, {0.0f, 0.0f, z, 0.0f}, {0.0f, 0.0f, 0.0f, 1.0f}}}; + MultWithStack(matrix); +} + +void Renderer::MatrixOrthogonal(float left, float right, float bottom, float top, float near, float far) { + float x = 1.0f / (right - left); + float y = 1.0f / (top - bottom); + float z = -1.0f / (far - near); + MatrixStruct matrix = {{{x + x, 0.0f, 0.0f, 0.0f}, + {0.0f, y + y, 0.0f, 0.0f}, + {0.0f, 0.0f, z, 0.0f}, + {-(left + right) * x, -(bottom + top) * y, z * near, 1.0f}}}; + MultWithStack(matrix); +} + +void Renderer::MatrixPush() { + Context* context = Renderer__getContext(); + int mode = context->m_matrixMode; + MatrixStruct* top = &context->m_matrixStacks[mode][context->m_matrixDepth[mode]]; + memcpy(top + 1, top, sizeof(MatrixStruct)); + context->m_matrixDepth[context->m_matrixMode]++; +} + +void Renderer::MatrixPop() { + Context* context = Renderer__getContext(); + context->m_matrixDepth[context->m_matrixMode]--; + context->m_matrixDirty[context->m_matrixMode] = true; +} + +float* Renderer::MatrixGet(int mode) { + Context* context = Renderer__getContext(); + MatrixStruct& top = context->m_matrixStacks[mode][context->m_matrixDepth[mode]]; + float32x4_t a = top.m__[0]; + float32x4_t b = top.m__[1]; + float32x4_t c = top.m__[2]; + float32x4_t d = top.m__[3]; + sMatrixResult.m__[0] = a; + sMatrixResult.m__[1] = b; + sMatrixResult.m__[2] = c; + sMatrixResult.m__[3] = d; + return reinterpret_cast(&sMatrixResult); +} + +void Renderer::Set_matrixDirty() { + Context* context = Renderer__getContext(); + context->m_matrixStacks[0][0].m__[0] = identityMatrix.m__[0]; + context->m_matrixStacks[0][0].m__[1] = identityMatrix.m__[1]; + context->m_matrixStacks[0][0].m__[2] = identityMatrix.m__[2]; + context->m_matrixStacks[0][0].m__[3] = identityMatrix.m__[3]; + context->m_matrixStacks[1][0].m__[0] = identityMatrix.m__[0]; + context->m_matrixStacks[1][0].m__[1] = identityMatrix.m__[1]; + context->m_matrixStacks[1][0].m__[2] = identityMatrix.m__[2]; + context->m_matrixStacks[1][0].m__[3] = identityMatrix.m__[3]; + context->m_matrixStacks[3][0].m__[0] = identityMatrix.m__[0]; + context->m_matrixStacks[3][0].m__[1] = identityMatrix.m__[1]; + context->m_matrixStacks[3][0].m__[2] = identityMatrix.m__[2]; + context->m_matrixStacks[3][0].m__[3] = identityMatrix.m__[3]; + context->m_matrixStacks[2][0].m__[0] = identityMatrix.m__[0]; + context->m_matrixStacks[2][0].m__[1] = identityMatrix.m__[1]; + context->m_matrixStacks[2][0].m__[2] = identityMatrix.m__[2]; + context->m_matrixStacks[2][0].m__[3] = identityMatrix.m__[3]; + context->m_matrixDirty[0] = true; + context->m_matrixDirty[1] = true; + context->m_matrixDirty[3] = true; + context->m_matrixDirty[2] = true; + m_dword29C0 = -1; + m_dword29C4 = -1; +} diff --git a/src/4JLibraries_Source/NX/Render/RendererCore.h b/src/4JLibraries_Source/NX/Render/RendererCore.h index c69dea81..c90bbf18 100644 --- a/src/4JLibraries_Source/NX/Render/RendererCore.h +++ b/src/4JLibraries_Source/NX/Render/RendererCore.h @@ -34,7 +34,49 @@ class Renderer : public C4JRender { public: Context(Renderer*, bool); - char m_filler[0x1F30]; + char m_gap0[0x10]; + MatrixStruct m_matrixStacks[4][16]; + bool m_matrixDirty[4]; + int m_matrixDepth[4]; + int m_matrixMode; + int m_textureBindings[4]; + bool m_textureBindingDirty[4]; + bool m_textureFlags[4]; + bool m_byte1040; + float m_float1044; + NVNblendState m_blendState; + NVNdepthStencilState m_depthStencilState; + NVNcolorState m_colorState; + NVNpolygonState m_polygonState; + NVNchannelMaskState m_channelMaskState; + int m_depthFunc; + bool m_stateDirty[6]; + char m_gap106E[0xC52]; + int m_dword1CC0; + bool m_fogEnabled; + char m_gap1CC5[0x13]; + bool m_fogDirty; + bool m_lightingEnabled; + char m_gap1CDA[2]; + bool m_byte1CDC; + char m_gap1CDD[3]; + int m_dword1CE0; + bool m_byte1CE4; + bool m_creationFlag; + char m_gap1CE6[2]; + char m_data1CE8[0x50]; + bool m_byte1D38; + char m_gap1D39[0x87]; + void* m_commandBuffer; + char m_gap1DC8[0x10]; + bool m_byte1DD8; + char m_gap1DD9[7]; + void* m_ptr1DE0; + void* m_ptr1DE8; + void* m_ptr1DF0; + char m_gap1DF8[0x28]; + float m_textureScaleUI[4]; + char m_gap1E30[0x100]; }; Renderer(); @@ -58,8 +100,8 @@ class Renderer : public C4JRender { virtual void Tick(); virtual void UpdateGamma(unsigned short gamma); - // see OpenGL for more info (modes starts from 0 and ends in 2, they are in the same order as they are in - // OpenGL) + /** NX maintains four independently selected matrix stacks, each with sixteen entries. + */ virtual void MatrixMode(int); virtual void MatrixSetIdentity(); virtual void MatrixTranslate(float, float, float); @@ -70,7 +112,7 @@ class Renderer : public C4JRender { virtual void MatrixPop(); virtual void MatrixPush(); virtual float32x4_t MatrixMult(float* matrix); - virtual void MatrixGet(int); + virtual float* MatrixGet(int); virtual void Set_matrixDirty(); // unused params were probably used in Xbox One virtual void Initialise(); @@ -343,3 +385,13 @@ class Renderer : public C4JRender { int m_elo; int m_elo22; }; + +static_assert(sizeof(MatrixStruct) == 0x40, "Matrix size"); +static_assert(alignof(MatrixStruct) == 0x10, "Matrix alignment"); +static_assert(sizeof(Renderer::Context) == 0x1F30, "Renderer context size"); +static_assert(offsetof(Renderer::Context, m_matrixStacks) == 0x10, "Matrix stack offset"); +static_assert(offsetof(Renderer::Context, m_matrixDirty) == 0x1010, "Matrix dirty offset"); +static_assert(offsetof(Renderer::Context, m_matrixMode) == 0x1024, "Matrix mode offset"); +static_assert(offsetof(Renderer::Context, m_blendState) == 0x1048, "Blend state offset"); +static_assert(offsetof(Renderer::Context, m_creationFlag) == 0x1CE5, "Context flag offset"); +static_assert(offsetof(Renderer::Context, m_textureScaleUI) == 0x1E20, "UI texture scale offset"); diff --git a/src/4JLibraries_Source/fui/fui.cpp b/src/4JLibraries_Source/fui/fui.cpp index 703cd822..2a948b3d 100644 --- a/src/4JLibraries_Source/fui/fui.cpp +++ b/src/4JLibraries_Source/fui/fui.cpp @@ -24,6 +24,7 @@ void fui::setScreenSize(float width, float height) { this->m_screenHeight = height; } +// NON_MATCHING | score: 3004 (lower is better) void fui::unloadScene(fuiFile* file) { if (!file) return; @@ -95,8 +96,9 @@ void fui::render(fuiFile* file, float a1, float a2, float a3, float a4, float a5 file->m_renderNodeStage->render(nullptr, nullptr); } +// NON_MATCHING | score: 5 (lower is better) void fui::dispatchKeyboardEvent(fuiFile* file, bool state, int c) { - FJ_FuiNode* node = file->m_data.m_fuiSymbol->m_stage; // ??? + FJ_FuiNode* node = file->m_renderNodeStage->m_fuiNodeStage; if (FJ_FuiNode* focus = static_cast(node)->getFocus()) node = focus; @@ -105,8 +107,9 @@ void fui::dispatchKeyboardEvent(fuiFile* file, bool state, int c) { } // param names guessed +// NON_MATCHING | score: 5 (lower is better) void fui::dispatchMouseMoveEvent(fuiFile* file, float x, float y) { - FJ_FuiNode* node = file->m_data.m_fuiSymbol->m_stage; + FJ_FuiNode* node = file->m_renderNodeStage->m_fuiNodeStage; if (FJ_FuiNode* focus = static_cast(node)->getFocus()) node = focus; diff --git a/src/4JLibraries_Source/fui/fuiFile.h b/src/4JLibraries_Source/fui/fuiFile.h index e234f508..cb8dbbcb 100644 --- a/src/4JLibraries_Source/fui/fuiFile.h +++ b/src/4JLibraries_Source/fui/fuiFile.h @@ -3,6 +3,7 @@ #include "fui/fuiSymbol.h" #include "net/minecraft/world/ArrayWithLength.h" #include "types.h" +#include // Most structs derived from // https://github.com/NessieHax/fui-research-repo/blob/main/DOCUMENTATION.md @@ -36,6 +37,7 @@ struct fuiMatrix { // spent an hour trying to figure out what this was // finally thought of it being a built in C++ operator... which looks good to me. + // NON_MATCHING | score: 205 (lower is better) fuiMatrix operator*(const fuiMatrix& rhs) const { fuiMatrix out = {}; mul(*this, rhs, out); @@ -46,47 +48,107 @@ struct fuiMatrix { static void mul(const fuiMatrix& lhs, const fuiMatrix& rhs, fuiMatrix& out); }; struct fuiColorTransform { - float m_redMultTerm; - float m_greenMultTerm; - float m_blueMultTerm; - float m_alphaMultTerm; float m_redAddTerm; float m_greenAddTerm; float m_blueAddTerm; float m_alphaAddTerm; + float m_redMultTerm; + float m_greenMultTerm; + float m_blueMultTerm; + float m_alphaMultTerm; }; struct fuiTimeline { int m_symbolIndex; - short m_frameIndex; - short m_frameCount; - short m_actionIndex; - short m_actionCount; + uint16_t m_frameIndex; + uint16_t m_frameCount; + uint16_t m_actionIndex; + uint16_t m_actionCount; fuiRect m_rect; }; -struct fuiTimelineAction; -struct fuiShape; -struct fuiShapeComponent; -struct fuiVert; -struct fuiTimelineFrame; -struct fuiTimelineEvent; -struct timelineEventName; +struct fuiTimelineAction { + uint16_t m_type; + int16_t m_frame; + char m_argument0[64]; + char m_argument1[64]; +}; +struct fuiShape { + int m_symbolIndex; + int m_componentIndex; + int m_componentCount; + fuiRect m_rect; +}; +struct fuiFillStyle { + int m_type; + fuiRGBA m_colour; + int m_bitmapIndex; + fuiMatrix m_matrix; +}; +struct fuiShapeComponent { + fuiFillStyle m_fill; + int m_vertexIndex; + int m_vertexCount; +}; +struct fuiVert { + float m_x, m_y; +}; +struct fuiTimelineFrame { + char m_name[64]; + int m_eventIndex; + int m_eventCount; +}; +struct fuiTimelineEvent { + uint16_t m_type; + uint8_t m_objectType; + uint8_t m_flags; + int16_t m_depth; + int16_t m_objectIndex; + int16_t m_unknown; + int16_t m_nameIndex; + fuiMatrix m_matrix; + fuiColorTransform m_colourTransform; + fuiRGBA m_colour; +}; +struct timelineEventName { + char m_name[64]; +}; struct fuiReference { int m_symbolIndex; char m_name[64]; int m_index; }; -struct fuiEdittext; -struct fuiBitmap; -struct fuiFontName; -struct fuiImportAsset; +struct fuiEdittext { + int m_symbolIndex; + fuiRect m_rect; + int m_fontId; + float m_fontSize; + fuiRGBA m_colour; + int m_flags[6]; + char m_text[256]; +}; +struct fuiBitmap { + int m_symbolIndex; + int m_format; + int m_width; + int m_height; + int m_offset; + int m_size; + int m_alphaOffset; + int m_texture; +}; +struct fuiFontName { + int m_id; + char m_name[256]; +}; +struct fuiImportAsset { + char m_name[64]; +}; class FJ_FuiNode; struct fuiHeader { - bool m_field0; + unsigned char m_signature[8]; int m_contentSize; - int m_field8; - char m_fileName[60]; + char m_fileName[64]; int m_timelineCount; int m_timelineEventNameCount; int m_timelineActionCount; @@ -97,12 +159,11 @@ struct fuiHeader { int m_timelineEventCount; int m_referenceCount; int m_editTextCount; + int m_symbolCount; int m_bitmapCount; int m_imagesSize; - int m_field7C; int m_fontNameCount; int m_importAssetCount; - int m_unk; fuiRect m_stageSize; int m_index; }; @@ -123,7 +184,7 @@ struct fuiData { fuiReference* m_fuiReference; fuiEdittext* m_fuiEdittext; fuiSymbol* m_fuiSymbol; - fuiBitmapFont* m_fuiBitmap; + fuiBitmap* m_fuiBitmap; void* m_imageMaybe; fuiFontName* m_fuiFontName; fuiImportAsset* m_fuiImportAsset; @@ -132,10 +193,11 @@ struct fuiData { struct fuiFile { fuiFile(); ~fuiFile(); - // NOTE: HAD TO CHANGE THE SIGNATURE BECAUSE OF THE METHOD BEING DIFFERENT - // ORIG HAD A CALLBACK METHOD INSTEAD OF DATA + /** Retain the recovered symbol's ABI; its third argument is a byte stride, + * despite the old unsigned-char** declaration in the symbol map. + */ static uint64_t addDataRegion(uint a1, uint a2, uchar** ptr, uint64_t* callbackData); - void load(arrayWithLength, int); + bool load(arrayWithLength, int); bool resolveReferences(fuiFile*); void dumpUnresolvedReferences(); void initialiseRenderTexture(fuiBitmap*, bool); @@ -159,3 +221,15 @@ struct fuiFile { void* m_callbackData; void* m_field138; }; + +static_assert(sizeof(fuiHeader) == 0x9c, "FUI header including runtime file index"); +static_assert(offsetof(fuiHeader, m_contentSize) == 8, "FUI content size"); +static_assert(offsetof(fuiHeader, m_stageSize) == 0x88, "FUI stage rectangle"); +static_assert(sizeof(fuiTimeline) == 0x1c && sizeof(fuiTimelineAction) == 0x84); +static_assert(sizeof(fuiShape) == 0x1c && sizeof(fuiShapeComponent) == 0x2c); +static_assert(sizeof(fuiTimelineFrame) == 0x48 && sizeof(fuiTimelineEvent) == 0x48); +static_assert(sizeof(fuiReference) == 0x48 && sizeof(fuiEdittext) == 0x138); +static_assert(sizeof(fuiBitmap) == 0x20 && sizeof(fuiFontName) == 0x104); +static_assert(offsetof(fuiFile, m_data) == 0xa0); +static_assert(offsetof(fuiFile, m_renderNodeStage) == 0x118); +static_assert(offsetof(fuiFile, m_field138) == 0x138); diff --git a/src/4JLibraries_Source/fui/fuiSymbol.h b/src/4JLibraries_Source/fui/fuiSymbol.h index a880d1e0..33e1c08d 100644 --- a/src/4JLibraries_Source/fui/fuiSymbol.h +++ b/src/4JLibraries_Source/fui/fuiSymbol.h @@ -1,9 +1,9 @@ #pragma once -class FJ_FuiNodeStage; - struct fuiSymbol { - char m_padding[0xf8]; - FJ_FuiNodeStage* - m_stage; // not sure if this is meant to be stage but fui::dispatchKeyboardEvent likes it sooo + char m_name[64]; + int m_objectType; + int m_objectIndex; }; + +static_assert(sizeof(fuiSymbol) == 0x48, "FUI on-disk symbol layout"); diff --git a/src/Minecraft.Client/com/mojang/nbt/CompoundTag.h b/src/Minecraft.Client/com/mojang/nbt/CompoundTag.h index 096796a5..68dcebc8 100644 --- a/src/Minecraft.Client/com/mojang/nbt/CompoundTag.h +++ b/src/Minecraft.Client/com/mojang/nbt/CompoundTag.h @@ -5,6 +5,9 @@ #include "nn/types.h" #include "types.h" #include +#include + +class ListTag; class CompoundTag : public Tag { public: @@ -21,6 +24,10 @@ class CompoundTag : public Tag { void stripEmptyChildren() override; bool isEmpty() const override; void remove(const std::wstring&); + /** Caller owns the returned vector; entries are copies of child names. + */ + std::vector* getAllKeys(); + std::unordered_map* getAllTags(); /** Gets a child `Compound Tag` * @@ -64,27 +71,25 @@ class CompoundTag : public Tag { */ float getFloat(const std::wstring& name); - /** Gets a child `List Tag` (but returns void???) + /** Gets a child `List Tag` * * @param name The name of the child tag - * @param length The length of the list (unconfirmed) + * @param length The element tag type */ - void getList(const std::wstring& name, int length); + ListTag* getList(const std::wstring& name, int length); /** Gets a child `Tag` with the provided name * * @param name The name of the tag that you want to get. */ - CompoundTag* get(const std::wstring& name); + Tag* get(const std::wstring& name); - /** Gets a child `List Tag` (Safe) - * - * Why does this return void + /** Gets a child `List Tag` without allocating * * @param name The name of the child tag - * @param length The length of the list (unconfirmed) + * @param length The element tag type */ - void fjSafeGetListTag(const std::wstring& name, int length); + const ListTag* fjSafeGetListTag(const std::wstring& name, int type) const; /** Checks if a child with the provided name exists * @@ -98,6 +103,7 @@ class CompoundTag : public Tag { * @param type Type of the child tag */ bool contains(const std::wstring& name, int type); + u8 getTagType(const std::wstring& name) const; /** Adds a `Tag` * diff --git a/src/Minecraft.Client/com/mojang/nbt/ListTag.h b/src/Minecraft.Client/com/mojang/nbt/ListTag.h index d3a79141..e21b479f 100644 --- a/src/Minecraft.Client/com/mojang/nbt/ListTag.h +++ b/src/Minecraft.Client/com/mojang/nbt/ListTag.h @@ -3,6 +3,8 @@ #include "com/mojang/nbt/Tag.h" #include +class CompoundTag; + class ListTag : public Tag { public: ListTag(); @@ -20,6 +22,15 @@ class ListTag : public Tag { bool isEmpty() const override; void add(Tag* tag); + /** Replaces an accepted element and deletes its previous owner. Rejected + * replacements remain caller-owned; assigning the same pointer is a no-op. + */ + void set(int index, Tag* tag); + size_t size() const; + int getElementType() const { return m_tagId; } + CompoundTag* getCompound(int) const; + int getInt(int) const; + double getDouble(int) const; private: std::vector m_data; diff --git a/src/Minecraft.Client/com/mojang/nbt/Tag.h b/src/Minecraft.Client/com/mojang/nbt/Tag.h index 0abd8c0f..be5c7732 100644 --- a/src/Minecraft.Client/com/mojang/nbt/Tag.h +++ b/src/Minecraft.Client/com/mojang/nbt/Tag.h @@ -1,5 +1,6 @@ #pragma once +#include "java/io/DataInput.h" #include "nn/types.h" #include #include @@ -23,11 +24,18 @@ class Tag { virtual bool isEmpty() const; virtual std::wstring getAsString(); + /** The exported DataInput vtable is still incomplete on Switch. Host NBT uses + * the one-byte reader explicitly; readChar reads two bytes in Java streams. + */ + static u8 readType(DataInput* input) { return input->readChar(); } static Tag* newTag(u8 id); static const wchar_t* getTagTypeName(u8 id); template - static void deleteElements(const std::vector&); + static void deleteElements(const std::vector& data) { + for (T tag : data) + delete tag; + } static const u8 TAG_End = 0; static const u8 TAG_Byte = 1; diff --git a/src/Minecraft.Client/net/minecraft/client/CMinecraftApp.h b/src/Minecraft.Client/net/minecraft/client/CMinecraftApp.h index ab70ffe7..d9653c43 100644 --- a/src/Minecraft.Client/net/minecraft/client/CMinecraftApp.h +++ b/src/Minecraft.Client/net/minecraft/client/CMinecraftApp.h @@ -71,6 +71,8 @@ class CMinecraftApp { bool IsAppPaused(); void SetAction(int, eXuiAction, void*); void setLevelGenerationOptions(LevelGenerationOptions* options); + // name guessed: records a unique (type, x, z) generation marker. + void addGeneratedFeature(int type, int x, int z); void SetGameHostOption(eGameHostOption option, unsigned int value); void UpdateTrialPausedTimer(); diff --git a/src/Minecraft.Client/net/minecraft/client/color/ColourTable.h b/src/Minecraft.Client/net/minecraft/client/color/ColourTable.h index f1bfa74b..6dacdef0 100644 --- a/src/Minecraft.Client/net/minecraft/client/color/ColourTable.h +++ b/src/Minecraft.Client/net/minecraft/client/color/ColourTable.h @@ -1,9 +1,24 @@ #pragma once #include "net/minecraft/world/level/material/MaterialColor.h" +#include +#include class ColourTable { public: + ColourTable(unsigned char*, unsigned int); + ColourTable(const ColourTable&, unsigned char*, unsigned int); static void staticCtor(); unsigned int getColour(eMinecraftColour); + void read(unsigned char*, unsigned int); + void setColour(const std::wstring&, unsigned int); + + static constexpr unsigned int COLOUR_COUNT = 486; + unsigned int m_colours[COLOUR_COUNT]; + +private: + static const wchar_t* const s_colourNames[COLOUR_COUNT]; + static std::unordered_map s_nameToColour; }; + +static_assert(sizeof(ColourTable) == 0x798, "Original colour table contains 486 words"); diff --git a/src/Minecraft.Client/net/minecraft/client/multiplayer/ClientChunkCache.h b/src/Minecraft.Client/net/minecraft/client/multiplayer/ClientChunkCache.h index 6ed5841d..afc6c1f0 100644 --- a/src/Minecraft.Client/net/minecraft/client/multiplayer/ClientChunkCache.h +++ b/src/Minecraft.Client/net/minecraft/client/multiplayer/ClientChunkCache.h @@ -23,7 +23,7 @@ class ClientChunkCache : public ChunkSource { void save(bool, ProgressListener*) override; bool shouldSave() override; ChunkSource* getCache() override; - std::vector* getMobsAt(MobCategory*, const BlockPos&) override; + std::vector* getMobsAt(MobCategory*, const BlockPos&) override; void findNearestMapFeature(Level*, const std::wstring&, const BlockPos&, bool) override; int getLoadedChunks() override; void recreateLogicStructuresForChunk(LevelChunk*, int, int) override; diff --git a/src/Minecraft.Client/net/minecraft/client/renderer/texture/TextureAtlasSprite.h b/src/Minecraft.Client/net/minecraft/client/renderer/texture/TextureAtlasSprite.h index 35ca2881..0a26f298 100644 --- a/src/Minecraft.Client/net/minecraft/client/renderer/texture/TextureAtlasSprite.h +++ b/src/Minecraft.Client/net/minecraft/client/renderer/texture/TextureAtlasSprite.h @@ -33,5 +33,16 @@ class TextureAtlasSprite { void adjustUV(float&, float&); void initUVs(float u0, float v0, float u1, float v1); - char m_filler[0x90 - 8]; + char m_filler[0x60 - 8]; + int m_x; + int m_y; + int m_width; + int m_height; + float m_u0; + float m_u1; + float m_v0; + float m_v1; + char m_gap80[0x10]; }; + +static_assert(sizeof(TextureAtlasSprite) == 0x90, "TextureAtlasSprite size"); diff --git a/src/Minecraft.Client/net/minecraft/core/BlockPos.h b/src/Minecraft.Client/net/minecraft/core/BlockPos.h index 7a3aacad..dcbca8ba 100644 --- a/src/Minecraft.Client/net/minecraft/core/BlockPos.h +++ b/src/Minecraft.Client/net/minecraft/core/BlockPos.h @@ -23,9 +23,12 @@ class BlockPos : public Vec3i { static BlockPosIterator* between(const BlockPos&, const BlockPos&); bool equals(const BlockPos& pos) const; + bool operator!=(const BlockPos& pos) const; bool equals(const BlockPos* pos) const; BlockPos offset(int x, int y, int z) const; + BlockPos offset(double x, double y, double z) const; + BlockPos offset(const Vec3i&) const; BlockPos relative(const Direction*) const; BlockPos relative(const Direction*, int) const; @@ -44,7 +47,7 @@ class BlockPos : public Vec3i { BlockPos east(int) const; long long compressBlockPos() const; - void decompressBlockPos(long long); + static BlockPos decompressBlockPos(long long); }; ASSERT_SIZEOF(BlockPos, 0xC) diff --git a/src/Minecraft.Client/net/minecraft/core/Direction.h b/src/Minecraft.Client/net/minecraft/core/Direction.h index 7f2dc9de..cc7a77e7 100644 --- a/src/Minecraft.Client/net/minecraft/core/Direction.h +++ b/src/Minecraft.Client/net/minecraft/core/Direction.h @@ -1,6 +1,7 @@ #pragma once #include "net/minecraft/core/StringRepresentable.h" +#include "net/minecraft/world/ArrayWithLength.h" #include "net/minecraft/world/level/block/state/properties/AbstractProperty.h" #include #include @@ -20,6 +21,7 @@ class Direction : public StringRepresentable { bool apply(const Direction*) const override; const Direction* getRandomDirection(Random&); + arrayWithLength iterator(); }; class AxisDirection { public: @@ -44,6 +46,11 @@ class Direction : public StringRepresentable { std::wstring toString() const override; std::wstring getSerializedName() const override; + + private: + std::wstring m_name; + Plane* m_plane; + int m_id; }; static const Direction* DOWN; @@ -62,6 +69,7 @@ class Direction : public StringRepresentable { static void staticCtor(); static const Direction* from3DDataValue(int value); + static const Direction* from2DDataValue(int value); Direction(int, int, int, const std::wstring&, Direction::AxisDirection*, Direction::Axis*, Vec3i*, unsigned char); @@ -75,6 +83,8 @@ class Direction : public StringRepresentable { int get2DDataValue() const; Axis* getAxis() const; + Vec3i getNormal() const; + AxisDirection* getAxisDirection() const; std::wstring getName() const; @@ -93,3 +103,6 @@ class Direction : public StringRepresentable { int m_y; int m_z; }; + +static_assert(sizeof(Direction::Axis) == 0x38, "Direction::Axis Switch layout"); +static_assert(sizeof(Direction) == 0x58, "Direction Switch layout"); diff --git a/src/Minecraft.Client/net/minecraft/core/MutableBlockPos.h b/src/Minecraft.Client/net/minecraft/core/MutableBlockPos.h index 11777a7c..12f0b268 100644 --- a/src/Minecraft.Client/net/minecraft/core/MutableBlockPos.h +++ b/src/Minecraft.Client/net/minecraft/core/MutableBlockPos.h @@ -4,6 +4,7 @@ class MutableBlockPos : public BlockPos { public: + MutableBlockPos(); MutableBlockPos(int, int, int); MutableBlockPos(const BlockPos&); @@ -19,4 +20,6 @@ class MutableBlockPos : public BlockPos { } void set(const BlockPos&); + MutableBlockPos* set(const Vec3i&); + MutableBlockPos* move(const Direction*, int amount); }; diff --git a/src/Minecraft.Client/net/minecraft/core/NonNullList.h b/src/Minecraft.Client/net/minecraft/core/NonNullList.h index 06262f7e..f73d9daa 100644 --- a/src/Minecraft.Client/net/minecraft/core/NonNullList.h +++ b/src/Minecraft.Client/net/minecraft/core/NonNullList.h @@ -5,7 +5,40 @@ template class NonNullList : arrayWithLength { public: - static NonNullList withSize(int, const T&); + NonNullList() = default; + + /** Copies are views of the same array. The owner must delete the backing data; + * destroying a view only releases its default value, as in the executable. + */ + // name guessed + // NON_MATCHING | score: 5197 (lower is better) + static NonNullList withSize(int size, const T& defaultValue) { + NonNullList list; + if (size > 0) { + list.m_data = new T[size]; + list.m_length = size; + for (unsigned int i = 0; i < list.m_length; ++i) + list.m_data[i] = defaultValue; + } + list.m_baseNotNull = defaultValue; + return list; + } + + unsigned int size() const { return this->m_length; } + T& operator[](unsigned int index) { return this->m_data[index]; } + const T& operator[](unsigned int index) const { return this->m_data[index]; } + void set(unsigned int index, const T& value) { this->m_data[index] = value; } + + void clear() { + for (unsigned int i = 0; i < size(); ++i) + set(i, m_baseNotNull); + } + + void deleteData() { + delete[] this->m_data; + this->m_data = nullptr; + this->m_length = 0; + } T m_baseNotNull; // idk if this should be not_null_ptr by default or specified in template, so decided it // not to be for a while diff --git a/src/Minecraft.Client/net/minecraft/core/System.h b/src/Minecraft.Client/net/minecraft/core/System.h index fca8e4c7..295829af 100644 --- a/src/Minecraft.Client/net/minecraft/core/System.h +++ b/src/Minecraft.Client/net/minecraft/core/System.h @@ -1,5 +1,8 @@ #pragma once +#include +#include + #include "net/minecraft/world/ArrayWithLength.h" #include "net/minecraft/world/level/biome/Biome.h" #include "nn/os/os_MutexTypes.h" @@ -12,7 +15,8 @@ class Node; // TODO: Find locations void InitializeCriticalSection(nn::os::MutexType* mutexType); void InitializeCriticalSectionAndSpinCount(nn::os::MutexType* mutexType, unsigned long spinCount); -long InterlockedCompareExchangeRelease(volatile long*, long, long); +void DeleteCriticalSection(nn::os::MutexType* mutexType); +std::intptr_t InterlockedCompareExchangeRelease(volatile std::intptr_t*, std::intptr_t, std::intptr_t); template const std::wstring _toString(T type) { std::wstringstream ss; diff --git a/src/Minecraft.Client/net/minecraft/core/Vec3i.h b/src/Minecraft.Client/net/minecraft/core/Vec3i.h index 5b383dd9..ca111e86 100644 --- a/src/Minecraft.Client/net/minecraft/core/Vec3i.h +++ b/src/Minecraft.Client/net/minecraft/core/Vec3i.h @@ -9,7 +9,9 @@ class Vec3i { int getX() const; int getY() const; int getZ() const; + Vec3i multiply(int) const; double distSqr(const Vec3i&) const; + double distSqr(double x, double y, double z) const; int m_x; int m_y; diff --git a/src/Minecraft.Client/net/minecraft/resources/ResourceLocation.h b/src/Minecraft.Client/net/minecraft/resources/ResourceLocation.h index 30b79d90..bdc2c248 100644 --- a/src/Minecraft.Client/net/minecraft/resources/ResourceLocation.h +++ b/src/Minecraft.Client/net/minecraft/resources/ResourceLocation.h @@ -13,6 +13,7 @@ class ResourceLocation { ResourceLocation(); ResourceLocation(const std::wstring&); ResourceLocation(const ResourceLocation&); + ResourceLocation& operator=(const ResourceLocation&); ~ResourceLocation(); bool operator==(const ResourceLocation* other) const; @@ -22,6 +23,7 @@ class ResourceLocation { const std::wstring& getNamespace() const; const std::wstring& getPath() const; + std::int64_t hashCode() const; virtual std::wstring toString() const; @@ -31,10 +33,17 @@ class ResourceLocation { char m_byte48; }; -// this is actually ResourceLocation::hashCode template <> -struct std::hash { - std::size_t operator()(const ResourceLocation& rl) const { - return std::hash()(rl.getPath()) ^ (std::hash()(rl.getNamespace()) << 1); +struct std::equal_to { + // name guessed + bool operator()(const ResourceLocation& lhs, const ResourceLocation& rhs) const { + return lhs.operator==(&rhs); } }; + +/** Uses the original LCE resource-key hash. + */ +template <> +struct std::hash { + std::size_t operator()(const ResourceLocation& rl) const { return rl.hashCode(); } +}; diff --git a/src/Minecraft.Client/net/minecraft/server/level/ServerChunkCache.cpp b/src/Minecraft.Client/net/minecraft/server/level/ServerChunkCache.cpp index 8e44a8e8..4e81237e 100644 --- a/src/Minecraft.Client/net/minecraft/server/level/ServerChunkCache.cpp +++ b/src/Minecraft.Client/net/minecraft/server/level/ServerChunkCache.cpp @@ -1,5 +1,7 @@ #include "net/minecraft/server/level/ServerChunkCache.h" +#include + #include "NX/Platform.h" #include "net/minecraft/core/BlockPos.h" @@ -58,7 +60,7 @@ ServerChunkCache::~ServerChunkCache() { delete *it; } - nn::os::FinalizeMutex(&m_mutex); + DeleteCriticalSection(&m_mutex); } LevelChunk* ServerChunkCache::getChunkIfLoaded(int chunkX, int chunkZ) { @@ -116,7 +118,7 @@ LevelChunk* ServerChunkCache::getChunkIfGenerated(int chunkX, int chunkZ, bool u return loadedChunk; } -// NON_MATCHING: Regswap +// NON_MATCHING | score: 290 (lower is better) LevelChunk* ServerChunkCache::load(int chunkX, int chunkZ, LevelChunk* chunk) { LevelChunk* active = chunk; if (!m_chunkStorage) @@ -145,7 +147,7 @@ LevelChunk* ServerChunkCache::load(int chunkX, int chunkZ, LevelChunk* chunk) { return active; } -// NON_MATCHING: A couple instructions placed in the wrong positions +// NON_MATCHING | score: 860 (lower is better) LevelChunk* ServerChunkCache::updateCacheAndPostProcess(int chunkX, int chunkZ, LevelChunk* newChunk, LevelChunk* oldChunk, bool unk) { if (!inBounds(chunkX, chunkZ)) { @@ -154,8 +156,9 @@ LevelChunk* ServerChunkCache::updateCacheAndPostProcess(int chunkX, int chunkZ, int idx = computeIdx(chunkX, chunkZ); - if (InterlockedCompareExchangeRelease((volatile long*)&m_chunks[idx], (long)newChunk, (long)oldChunk) - == (long)oldChunk) { + if (InterlockedCompareExchangeRelease((volatile intptr_t*)&m_chunks[idx], (intptr_t)newChunk, + (intptr_t)oldChunk) + == (intptr_t)oldChunk) { EnterCriticalSection(&m_mutex); PIXBeginNamedEvent(0.0, "Lighting chunk"); @@ -440,7 +443,7 @@ std::wstring ServerChunkCache::gatherStats() { return L"ServerChunkCache: "; } -std::vector* ServerChunkCache::getMobsAt(MobCategory* category, const BlockPos& pos) { +std::vector* ServerChunkCache::getMobsAt(MobCategory* category, const BlockPos& pos) { return m_chunkGenerator->getMobsAt(category, pos); } diff --git a/src/Minecraft.Client/net/minecraft/server/level/ServerChunkCache.h b/src/Minecraft.Client/net/minecraft/server/level/ServerChunkCache.h index ffad2af7..f1dfa15c 100644 --- a/src/Minecraft.Client/net/minecraft/server/level/ServerChunkCache.h +++ b/src/Minecraft.Client/net/minecraft/server/level/ServerChunkCache.h @@ -37,7 +37,7 @@ class ServerChunkCache : public ChunkSource { void save(bool, ProgressListener*) override; bool shouldSave() override; ChunkSource* getCache() override; - std::vector* getMobsAt(MobCategory* category, const BlockPos& pos) override; + std::vector* getMobsAt(MobCategory* category, const BlockPos& pos) override; void findNearestMapFeature(Level* level, const std::wstring& name, const BlockPos& pos, bool unk) override; int getLoadedChunks() override; diff --git a/src/Minecraft.Client/net/minecraft/sounds/SoundEvent.h b/src/Minecraft.Client/net/minecraft/sounds/SoundEvent.h index ae63bc86..93afa4b2 100644 --- a/src/Minecraft.Client/net/minecraft/sounds/SoundEvent.h +++ b/src/Minecraft.Client/net/minecraft/sounds/SoundEvent.h @@ -1,9 +1,31 @@ #pragma once +#include "net/minecraft/resources/ResourceLocation.h" +#include + class SoundEvent { public: static const SoundEvent* UI_PRESS; static const SoundEvent* ITEM_PICKUP; static const SoundEvent* ENTER_THERMAL; static const SoundEvent* ENTER_BOOST; + + static MappedRegistry Registry; + static int NEXT_ID; + static SoundEvent* registerEvent(SoundEvent*); + + /** The default overload takes its string by value: registerSound copies the + * caller's string before entering the original constructor. + */ + SoundEvent(std::wstring name, float range); + SoundEvent(std::wstring name, float range, int flags); + std::wstring getName(); + float getRange(); + bool isUISound(); + void setId(int id); + + std::wstring m_name; + int m_id; + float m_range; + int m_flags; }; diff --git a/src/Minecraft.Client/net/minecraft/sounds/SoundEvents.h b/src/Minecraft.Client/net/minecraft/sounds/SoundEvents.h index ac18abe9..940fdbf9 100644 --- a/src/Minecraft.Client/net/minecraft/sounds/SoundEvents.h +++ b/src/Minecraft.Client/net/minecraft/sounds/SoundEvents.h @@ -6,13 +6,606 @@ class SoundEvent; class SoundEvents { public: - static SoundEvent* BACK; - static SoundEvent* FIRE_AMBIENT; - static SoundEvent* ENCHANT_THORNS_HIT; - static SoundEvent* RANDOM_CLICK; - static SoundEvent* SHOVEL_FLATTEN; - static SoundEvent* registerSound(const std::wstring&); - static void staticCtor(); + + static SoundEvent* BACK; // name guessed: 0x71017a4210 + static SoundEvent* CRAFT; // name guessed: 0x71017a4218 + static SoundEvent* CRAFTFAIL; // name guessed: 0x71017a4220 + static SoundEvent* FOCUS; // name guessed: 0x71017a4228 + static SoundEvent* SCROLL; // name guessed: 0x71017a4238 + static SoundEvent* AMBIENT_CAVE_CAVE; // name guessed: 0x71017a3070 + static SoundEvent* DIG_STONE; // name guessed: 0x71017a3078 + static SoundEvent* RANDOM_ANVIL_BREAK; // name guessed: 0x71017a3080 + static SoundEvent* RANDOM_ANVIL_LAND; // name guessed: 0x71017a3088 + static SoundEvent* STEP_STONE; // name guessed: 0x71017a3090 + static SoundEvent* RANDOM_ANVIL_LAND_2; // name guessed: 0x71017a3098 + static SoundEvent* RANDOM_ANVIL_LAND_3; // name guessed: 0x71017a30a0 + static SoundEvent* STEP_STONE_2; // name guessed: 0x71017a30a8 + static SoundEvent* RANDOM_ANVIL_USE; // name guessed: 0x71017a30b0 + static SoundEvent* ENTITY_ARMORSTAND_BREAK; // name guessed: 0x71017a30b8 + static SoundEvent* DIG_WOOD; // name guessed: 0x71017a30c0 + static SoundEvent* ENTITY_ARMORSTAND_HIT; // name guessed: 0x71017a30c8 + static SoundEvent* DIG_STONE_2; // name guessed: 0x71017a30d0 + static SoundEvent* ITEM_ARMOR_EQUIP_CHAIN; // name guessed: 0x71017a30d8 + static SoundEvent* ITEM_ARMOR_EQUIP_DIAMOND; // name guessed: 0x71017a30e0 + static SoundEvent* ITEM_ARMOR_EQUIP_GENERIC; // name guessed: 0x71017a30f0 + static SoundEvent* ITEM_ARMOR_EQUIP_GOLD; // name guessed: 0x71017a30f8 + static SoundEvent* ITEM_ARMOR_EQUIP_IRON; // name guessed: 0x71017a3100 + static SoundEvent* ITEM_ARMOR_EQUIP_LEATHER; // name guessed: 0x71017a3108 + static SoundEvent* ITEM_ARMOR_EQUIP_LEATHER_2; // name guessed: 0x71017a30e8 + static SoundEvent* RANDOM_BOWHIT; // name guessed: 0x71017a3110 + static SoundEvent* RANDOM_SUCCESSFUL_HIT; // name guessed: 0x71017a3118 + static SoundEvent* RANDOM_BOW; // name guessed: 0x71017a3120 + static SoundEvent* MOB_BAT_IDLE; // name guessed: 0x71017a3128 + static SoundEvent* MOB_BAT_DEATH; // name guessed: 0x71017a3130 + static SoundEvent* MOB_BAT_HURT; // name guessed: 0x71017a3138 + static SoundEvent* MOB_BAT_TAKEOFF; // name guessed: 0x71017a3140 + static SoundEvent* MOB_BLAZE_BREATHE; // name guessed: 0x71017a3148 + static SoundEvent* FIRE_FIRE; // name guessed: 0x71017a3150 + static SoundEvent* MOB_BLAZE_DEATH; // name guessed: 0x71017a3158 + static SoundEvent* MOB_BLAZE_HIT; // name guessed: 0x71017a3160 + static SoundEvent* MOB_GHAST_FIREBALL; // name guessed: 0x71017a3168 + static SoundEvent* ENTITY_BOAT_PADDLE_LAND; // name guessed: 0x71017a4268 + static SoundEvent* ENTITY_BOAT_PADDLE_WATER; // name guessed: 0x71017a4270 + static SoundEvent* ENTITY_BOBBER_RETRIEVE; // name guessed: 0x71017a4278 + static SoundEvent* ENTITY_BOBBER_THROW; // name guessed: 0x71017a3170 + static SoundEvent* ENTITY_BOBBER_RETRIEVE_2; // name guessed: 0x71017a3178 + static SoundEvent* ITEM_BOTTLE_EMPTY; // name guessed: 0x71017a3180 + static SoundEvent* ITEM_BOTTLE_FILL; // name guessed: 0x71017a3188 + static SoundEvent* ITEM_BOTTLE_FILL_DRAGONBREATH; // name guessed: 0x71017a3190 + static SoundEvent* BLOCK_BREWING_STAND_BREW; // name guessed: 0x71017a3198 + static SoundEvent* ITEM_BUCKET_EMPTY; // name guessed: 0x71017a31a0 + static SoundEvent* ITEM_BUCKET_EMPTY_LAVA; // name guessed: 0x71017a31a8 + static SoundEvent* ITEM_BUCKET_FILL; // name guessed: 0x71017a31b0 + static SoundEvent* ITEM_BUCKET_FILL_LAVA; // name guessed: 0x71017a31b8 + static SoundEvent* MOB_CAT_MEOW; // name guessed: 0x71017a31c0 + static SoundEvent* MOB_CAT_HIT; // name guessed: 0x71017a31c8 + static SoundEvent* MOB_CAT_HISS; // name guessed: 0x71017a31d0 + static SoundEvent* MOB_CAT_HIT_2; // name guessed: 0x71017a31d8 + static SoundEvent* MOB_CAT_PURR; // name guessed: 0x71017a31e0 + static SoundEvent* MOB_CAT_PURREOW; // name guessed: 0x71017a31e8 + static SoundEvent* RANDOM_CHESTCLOSED; // name guessed: 0x71017a31f0 + static SoundEvent* RANDOM_DOOR_CLOSE; // name guessed: 0x71017a31f8 + static SoundEvent* RANDOM_CHESTOPEN; // name guessed: 0x71017a3200 + static SoundEvent* MOB_CHICKEN_IDLE; // name guessed: 0x71017a3208 + static SoundEvent* MOB_CHICKEN_HURT; // name guessed: 0x71017a3210 + static SoundEvent* MOB_CHICKEN_PLOP; // name guessed: 0x71017a3218 + static SoundEvent* MOB_CHICKEN_HURT_2; // name guessed: 0x71017a3220 + static SoundEvent* MOB_CHICKEN_STEP; // name guessed: 0x71017a3228 + static SoundEvent* BLOCK_CHORUS_FLOWER_DEATH; // name guessed: 0x71017a3230 + static SoundEvent* BLOCK_CHORUS_FLOWER_GROW; // name guessed: 0x71017a3238 + static SoundEvent* MOB_ENDERMEN_PORTAL; // name guessed: 0x71017a3240 + static SoundEvent* DIG_CLOTH; // name guessed: 0x71017a3248 + static SoundEvent* STEP_CLOTH; // name guessed: 0x71017a3250 + static SoundEvent* STEP_CLOTH_2; // name guessed: 0x71017a3258 + static SoundEvent* DIG_CLOTH_2; // name guessed: 0x71017a3260 + static SoundEvent* STEP_CLOTH_3; // name guessed: 0x71017a3268 + static SoundEvent* RANDOM_CLICK_73; // name guessed: 0x71017a3270 + static SoundEvent* MOB_COW_IDLE; // name guessed: 0x71017a3278 + static SoundEvent* MOB_COW_HURT; // name guessed: 0x71017a3280 + static SoundEvent* MOB_COW_HURT_2; // name guessed: 0x71017a3288 + static SoundEvent* ENTITY_COW_MILK; // name guessed: 0x71017a3290 + static SoundEvent* MOB_COW_STEP; // name guessed: 0x71017a3298 + static SoundEvent* MOB_CREEPER_DEATH; // name guessed: 0x71017a32a0 + static SoundEvent* MOB_CREEPER_HURT; // name guessed: 0x71017a32a8 + static SoundEvent* RANDOM_FUSE; // name guessed: 0x71017a32b0 + static SoundEvent* RANDOM_CLICK_2; // name guessed: 0x71017a32b8 + static SoundEvent* RANDOM_CLICK_3; // name guessed: 0x71017a32c0 + static SoundEvent* RANDOM_BOW_2; // name guessed: 0x71017a32c8 + static SoundEvent* MOB_HORSE_DONKEY_IDLE; // name guessed: 0x71017a32d0 + static SoundEvent* MOB_HORSE_DONKEY_ANGRY; // name guessed: 0x71017a32d8 + static SoundEvent* MOB_CHICKEN_PLOP_2; // name guessed: 0x71017a32e0 + static SoundEvent* MOB_HORSE_DONKEY_DEATH; // name guessed: 0x71017a32e8 + static SoundEvent* MOB_HORSE_DONKEY_HIT; // name guessed: 0x71017a32f0 + static SoundEvent* RANDOM_BOW_3; // name guessed: 0x71017a32f8 + static SoundEvent* MOB_GUARDIAN_ELDER_IDLE; // name guessed: 0x71017a3300 + static SoundEvent* MOB_GUARDIAN_LAND_IDLE; // name guessed: 0x71017a3308 + static SoundEvent* MOB_GUARDIAN_CURSE; // name guessed: 0x71017a3310 + static SoundEvent* MOB_GUARDIAN_ELDER_DEATH; // name guessed: 0x71017a3318 + static SoundEvent* MOB_GUARDIAN_LAND_DEATH; // name guessed: 0x71017a3320 + static SoundEvent* MOB_GUARDIAN_FLOP; // name guessed: 0x71017a3328 + static SoundEvent* MOB_GUARDIAN_ELDER_HIT; // name guessed: 0x71017a3330 + static SoundEvent* MOB_GUARDIAN_LAND_HIT; // name guessed: 0x71017a3338 + static SoundEvent* ITEM_ELYTRA_FLYING; // name guessed: 0x71017a3340 + static SoundEvent* BLOCK_ENCHANTMENT_TABLE_ENCHANT; // name guessed: 0x71017a3348 + static SoundEvent* BLOCK_ENDERCHEST_CLOSE; // name guessed: 0x71017a3350 + static SoundEvent* BLOCK_ENDERCHEST_OPEN; // name guessed: 0x71017a3358 + static SoundEvent* MOB_ENDERDRAGON_GROWL; // name guessed: 0x71017a3360 + static SoundEvent* MOB_ENDERDRAGON_END; // name guessed: 0x71017a3368 + static SoundEvent* RANDOM_EXPLODE; // name guessed: 0x71017a3370 + static SoundEvent* MOB_ENDERDRAGON_WINGS; // name guessed: 0x71017a3378 + static SoundEvent* MOB_ENDERDRAGON_GROWL_2; // name guessed: 0x71017a3380 + static SoundEvent* MOB_ENDERDRAGON_HIT; // name guessed: 0x71017a3388 + static SoundEvent* MOB_GHAST_FIREBALL_2; // name guessed: 0x71017a3390 + static SoundEvent* ENTITY_ENDEREYE_LAUNCH; // name guessed: 0x71017a3398 + static SoundEvent* ENTITY_ENDEREYE_DEATH; // name guessed: 0x71017a33a0 + static SoundEvent* MOB_ENDERMEN_IDLE; // name guessed: 0x71017a33a8 + static SoundEvent* MOB_ENDERMEN_DEATH; // name guessed: 0x71017a33b0 + static SoundEvent* MOB_ENDERMEN_HIT; // name guessed: 0x71017a33b8 + static SoundEvent* MOB_ENDERMAN_SCREAM; // name guessed: 0x71017a33c0 + static SoundEvent* MOB_ENDERMAN_STARE; // name guessed: 0x71017a33c8 + static SoundEvent* MOB_ENDERMEN_PORTAL_2; // name guessed: 0x71017a33d0 + static SoundEvent* MOB_SILVERFISH_IDLE; // name guessed: 0x71017a33d8 + static SoundEvent* MOB_SILVERFISH_KILL; // name guessed: 0x71017a33e0 + static SoundEvent* MOB_SILVERFISH_HIT; // name guessed: 0x71017a33e8 + static SoundEvent* MOB_SILVERFISH_STEP; // name guessed: 0x71017a33f0 + static SoundEvent* RANDOM_BOW_4; // name guessed: 0x71017a33f8 + static SoundEvent* RANDOM_EXPLODE_2; // name guessed: 0x71017a3400 + static SoundEvent* BLOCK_END_PORTAL_FRAME_FILL; // name guessed: 0x71017a3408 + static SoundEvent* BLOCK_END_PORTAL_SPAWN; // name guessed: 0x71017a3410 + static SoundEvent* ENTITY_EVOCATION_FANGS_ATTACK; // name guessed: 0x71017a3418 + static SoundEvent* ENTITY_EVOCATION_ILLAGER_AMBIENT; // name guessed: 0x71017a3420 + static SoundEvent* ENTITY_EVOCATION_ILLAGER_CAST_SPELL; // name guessed: 0x71017a3428 + static SoundEvent* ENTITY_EVOCATION_ILLAGER_DEATH; // name guessed: 0x71017a3430 + static SoundEvent* ENTITY_EVOCATION_ILLAGER_HURT; // name guessed: 0x71017a3438 + static SoundEvent* ENTITY_EVOCATION_ILLAGER_PREPARE_ATTACK; // name guessed: 0x71017a3440 + static SoundEvent* ENTITY_EVOCATION_ILLAGER_PREPARE_SUMMON; // name guessed: 0x71017a3448 + static SoundEvent* ENTITY_EVOCATION_ILLAGER_PREPARE_WOLOLO; // name guessed: 0x71017a3450 + static SoundEvent* RANDOM_BOW_5; // name guessed: 0x71017a3458 + static SoundEvent* RANDOM_ORB; // name guessed: 0x71017a3460 + static SoundEvent* RANDOM_ORB_2; // name guessed: 0x71017a3468 + static SoundEvent* BLOCK_FENCE_GATE_CLOSE; // name guessed: 0x71017a3470 + static SoundEvent* BLOCK_FENCE_GATE_OPEN; // name guessed: 0x71017a3478 + static SoundEvent* MOB_GHAST_FIREBALL_3; // name guessed: 0x71017a3480 + static SoundEvent* FIREWORKS_BLAST; // name guessed: 0x71017a3488 + static SoundEvent* FIREWORKS_BLAST_FAR; // name guessed: 0x71017a3490 + static SoundEvent* FIREWORKS_LARGE_BLAST; // name guessed: 0x71017a3498 + static SoundEvent* FIREWORKS_LARGE_BLAST_FAR; // name guessed: 0x71017a34a0 + static SoundEvent* FIREWORKS_LAUNCH; // name guessed: 0x71017a34a8 + static SoundEvent* RANDOM_BOW_6; // name guessed: 0x71017a34b0 + static SoundEvent* FIREWORKS_TWINKLE; // name guessed: 0x71017a34b8 + static SoundEvent* FIREWORKS_TWINKLE_FAR; // name guessed: 0x71017a34c0 + static SoundEvent* FIRE_AMBIENT; // name guessed: 0x71017a34c8 + static SoundEvent* RANDOM_FIZZ; // name guessed: 0x71017a34d0 + static SoundEvent* FIRE_IGNITE; // name guessed: 0x71017a34d8 + static SoundEvent* BLOCK_FURNACE_FIRE_CRACKLE; // name guessed: 0x71017a34e0 + static SoundEvent* DAMAGE_FALLBIG; // name guessed: 0x71017a34e8 + static SoundEvent* RANDOM_FIZZ_2; // name guessed: 0x71017a34f0 + static SoundEvent* DAMAGE_HURTFLESH; // name guessed: 0x71017a34f8 + static SoundEvent* RANDOM_DRINK; // name guessed: 0x71017a3500 + static SoundEvent* RANDOM_EAT; // name guessed: 0x71017a3508 + static SoundEvent* RANDOM_EXPLODE_3; // name guessed: 0x71017a3510 + static SoundEvent* RANDOM_FIZZ_3; // name guessed: 0x71017a3518 + static SoundEvent* DAMAGE_HURTFLESH_2; // name guessed: 0x71017a3520 + static SoundEvent* DAMAGE_FALLSMALL; // name guessed: 0x71017a3528 + static SoundEvent* RANDOM_SPLASH; // name guessed: 0x71017a3530 + static SoundEvent* LIQUID_SWIM; // name guessed: 0x71017a3538 + static SoundEvent* MOB_GHAST_MOAN; // name guessed: 0x71017a3540 + static SoundEvent* MOB_GHAST_DEATH; // name guessed: 0x71017a3548 + static SoundEvent* MOB_GHAST_SCREAM; // name guessed: 0x71017a3550 + static SoundEvent* MOB_GHAST_SCREAM_2; // name guessed: 0x71017a3558 + static SoundEvent* MOB_GHAST_FIREBALL_4; // name guessed: 0x71017a3560 + static SoundEvent* MOB_GHAST_CHARGE; // name guessed: 0x71017a3568 + static SoundEvent* RANDOM_GLASS; // name guessed: 0x71017a3570 + static SoundEvent* STEP_STONE_3; // name guessed: 0x71017a3578 + static SoundEvent* STEP_STONE_4; // name guessed: 0x71017a3580 + static SoundEvent* DIG_STONE_3; // name guessed: 0x71017a3588 + static SoundEvent* STEP_STONE_5; // name guessed: 0x71017a3590 + static SoundEvent* DIG_GRASS; // name guessed: 0x71017a3598 + static SoundEvent* STEP_GRASS; // name guessed: 0x71017a35a0 + static SoundEvent* STEP_GRASS_2; // name guessed: 0x71017a35a8 + static SoundEvent* DIG_GRASS_2; // name guessed: 0x71017a35b0 + static SoundEvent* STEP_GRASS_3; // name guessed: 0x71017a35b8 + static SoundEvent* DIG_GRAVEL; // name guessed: 0x71017a35c0 + static SoundEvent* STEP_GRAVEL; // name guessed: 0x71017a35c8 + static SoundEvent* STEP_GRAVEL_2; // name guessed: 0x71017a35d0 + static SoundEvent* DIG_GRAVEL_2; // name guessed: 0x71017a35d8 + static SoundEvent* STEP_GRAVEL_3; // name guessed: 0x71017a35e0 + static SoundEvent* ENTITY_GUARDIAN_IDLE; // name guessed: 0x71017a35e8 + static SoundEvent* MOB_GUARDIAN_LAND_IDLE_2; // name guessed: 0x71017a35f0 + static SoundEvent* MOB_GUARDIAN_ATTACK; // name guessed: 0x71017a35f8 + static SoundEvent* MOB_GUARDIAN_DEATH; // name guessed: 0x71017a3600 + static SoundEvent* MOB_GUARDIAN_LAND_DEATH_2; // name guessed: 0x71017a3608 + static SoundEvent* MOB_GUARDIAN_FLOP_2; // name guessed: 0x71017a3610 + static SoundEvent* MOB_GUARDIAN_HIT; // name guessed: 0x71017a3618 + static SoundEvent* MOB_GUARDIAN_LAND_HIT_2; // name guessed: 0x71017a3620 + static SoundEvent* ITEM_HOE_TILL; // name guessed: 0x71017a3628 + static SoundEvent* MOB_HORSE_IDLE; // name guessed: 0x71017a3630 + static SoundEvent* MOB_HORSE_ANGRY; // name guessed: 0x71017a3638 + static SoundEvent* MOB_HORSE_ARMOR; // name guessed: 0x71017a3640 + static SoundEvent* MOB_HORSE_BREATHE; // name guessed: 0x71017a3648 + static SoundEvent* MOB_HORSE_DEATH; // name guessed: 0x71017a3650 + static SoundEvent* ENTITY_HORSE_EAT; // name guessed: 0x71017a3658 + static SoundEvent* MOB_HORSE_GALLOP; // name guessed: 0x71017a3660 + static SoundEvent* MOB_HORSE_HIT; // name guessed: 0x71017a3668 + static SoundEvent* MOB_HORSE_JUMP; // name guessed: 0x71017a3670 + static SoundEvent* MOB_HORSE_LAND; // name guessed: 0x71017a3678 + static SoundEvent* MOB_HORSE_LEATHER; // name guessed: 0x71017a3680 + static SoundEvent* MOB_HORSE_SOFT; // name guessed: 0x71017a3688 + static SoundEvent* MOB_HORSE_WOOD; // name guessed: 0x71017a3690 + static SoundEvent* GAME_HOSTILE_HURT_FALL_BIG; // name guessed: 0x71017a3698 + static SoundEvent* GAME_HOSTILE_DIE; // name guessed: 0x71017a36a0 + static SoundEvent* DAMAGE_HURTFLESH_3; // name guessed: 0x71017a36a8 + static SoundEvent* GAME_HOSTILE_HURT_FALL_SMALL; // name guessed: 0x71017a36b0 + static SoundEvent* GAME_HOSTILE_SWIM_SPLASH; // name guessed: 0x71017a36b8 + static SoundEvent* GAME_HOSTILE_SWIM; // name guessed: 0x71017a36c0 + static SoundEvent* ENTITY_HUSK_IDLE; // name guessed: 0x71017a36c8 + static SoundEvent* ENTITY_HUSK_DEATH; // name guessed: 0x71017a36d0 + static SoundEvent* ENTITY_HUSK_HURT; // name guessed: 0x71017a36d8 + static SoundEvent* ENTITY_HUSK_STEP; // name guessed: 0x71017a36e0 + static SoundEvent* ENTITY_ILLUSION_ILLAGER_AMBIENT; // name guessed: 0x71017a36e8 + static SoundEvent* ENTITY_ILLUSION_ILLAGER_CAST_SPELL; // name guessed: 0x71017a36f0 + static SoundEvent* ENTITY_ILLUSION_ILLAGER_DEATH; // name guessed: 0x71017a36f8 + static SoundEvent* ENTITY_ILLUSION_ILLAGER_HURT; // name guessed: 0x71017a3700 + static SoundEvent* ENTITY_ILLUSION_ILLAGER_MIRROR_MOVE; // name guessed: 0x71017a3708 + static SoundEvent* ENTITY_ILLUSION_ILLAGER_PREPARE_BLINDNESS; // name guessed: 0x71017a3710 + static SoundEvent* ENTITY_ILLUSION_ILLAGER_PREPARE_MIRROR; // name guessed: 0x71017a3718 + static SoundEvent* MOB_IRONGOLEM_THROW; // name guessed: 0x71017a3720 + static SoundEvent* MOB_IRONGOLEM_DEATH; // name guessed: 0x71017a3728 + static SoundEvent* MOB_IRONGOLEM_HIT; // name guessed: 0x71017a3730 + static SoundEvent* MOB_IRONGOLEM_WALK; // name guessed: 0x71017a3738 + static SoundEvent* BLOCK_IRON_DOOR_CLOSE; // name guessed: 0x71017a3740 + static SoundEvent* BLOCK_IRON_DOOR_OPEN; // name guessed: 0x71017a3748 + static SoundEvent* BLOCK_IRON_TRAPDOOR_CLOSE; // name guessed: 0x71017a3750 + static SoundEvent* BLOCK_IRON_TRAPDOOR_OPEN; // name guessed: 0x71017a3758 + static SoundEvent* ENTITY_ITEMFRAME_ADDITEM; // name guessed: 0x71017a3760 + static SoundEvent* ENTITY_ITEMFRAME_BREAK; // name guessed: 0x71017a3768 + static SoundEvent* ENTITY_ITEMFRAME_PLACE; // name guessed: 0x71017a3770 + static SoundEvent* ENTITY_ITEMFRAME_REMOVEITEM; // name guessed: 0x71017a3778 + static SoundEvent* ENTITY_ITEMFRAME_ROTATEITEM; // name guessed: 0x71017a3780 + static SoundEvent* RANDOM_BREAK; // name guessed: 0x71017a3788 + static SoundEvent* DIG_WOOD_2; // name guessed: 0x71017a3798 + static SoundEvent* STEP_LADDER; // name guessed: 0x71017a37a0 + static SoundEvent* STEP_LADDER_2; // name guessed: 0x71017a37a8 + static SoundEvent* DIG_WOOD_3; // name guessed: 0x71017a37b0 + static SoundEvent* STEP_LADDER_3; // name guessed: 0x71017a37b8 + static SoundEvent* RANDOM_FIZZ_4; // name guessed: 0x71017a37c8 + static SoundEvent* LIQUID_LAVA; // name guessed: 0x71017a37c0 + static SoundEvent* LIQUID_LAVAPOP; // name guessed: 0x71017a37d0 + static SoundEvent* ENTITY_LEASHKNOT_BREAK; // name guessed: 0x71017a37d8 + static SoundEvent* ENTITY_LEASHKNOT_PLACE; // name guessed: 0x71017a37e0 + static SoundEvent* RANDOM_CLICK_4; // name guessed: 0x71017a37e8 + static SoundEvent* RANDOM_EXPLODE_4; // name guessed: 0x71017a37f0 + static SoundEvent* AMBIENT_WEATHER_THUNDER; // name guessed: 0x71017a37f8 + static SoundEvent* RANDOM_BOW_7; // name guessed: 0x71017a3800 + static SoundEvent* ENTITY_LLAMA_AMBIENT; // name guessed: 0x71017a3808 + static SoundEvent* ENTITY_LLAMA_ANGRY; // name guessed: 0x71017a3810 + static SoundEvent* MOB_CHICKEN_PLOP_3; // name guessed: 0x71017a3818 + static SoundEvent* ENTITY_LLAMA_DEATH; // name guessed: 0x71017a3820 + static SoundEvent* ENTITY_LLAMA_EAT; // name guessed: 0x71017a3828 + static SoundEvent* ENTITY_LLAMA_HURT; // name guessed: 0x71017a3830 + static SoundEvent* ENTITY_LLAMA_SPIT; // name guessed: 0x71017a3838 + static SoundEvent* ENTITY_LLAMA_STEP; // name guessed: 0x71017a3840 + static SoundEvent* ENTITY_LLAMA_SWAG; // name guessed: 0x71017a3848 + static SoundEvent* MOB_SLIME_BIG; // name guessed: 0x71017a3850 + static SoundEvent* MOB_SLIME_BIG_2; // name guessed: 0x71017a3858 + static SoundEvent* MOB_MAGMACUBE_JUMP; // name guessed: 0x71017a3860 + static SoundEvent* MOB_MAGMACUBE_BIG; // name guessed: 0x71017a3868 + static SoundEvent* DIG_STONE_4; // name guessed: 0x71017a3870 + static SoundEvent* STEP_STONE_6; // name guessed: 0x71017a3878 + static SoundEvent* STEP_STONE_7; // name guessed: 0x71017a3880 + static SoundEvent* DIG_STONE_5; // name guessed: 0x71017a3888 + static SoundEvent* STEP_STONE_8; // name guessed: 0x71017a38a0 + static SoundEvent* RANDOM_CLICK_5; // name guessed: 0x71017a3890 + static SoundEvent* RANDOM_CLICK_6; // name guessed: 0x71017a3898 + static SoundEvent* MINECART_INSIDE; // name guessed: 0x71017a38a8 + static SoundEvent* MINECART_BASE; // name guessed: 0x71017a38b0 + static SoundEvent* MOB_SHEEP_SHEAR; // name guessed: 0x71017a38b8 + static SoundEvent* MOB_HORSE_DONKEY_IDLE_2; // name guessed: 0x71017a38c0 + static SoundEvent* MOB_HORSE_DONKEY_DEATH_2; // name guessed: 0x71017a38c8 + static SoundEvent* MOB_HORSE_DONKEY_HIT_2; // name guessed: 0x71017a38d0 + static SoundEvent* MOB_CHICKEN_PLOP_4; // name guessed: 0x71017a38d8 + static SoundEvent* NOTE_BD; // name guessed: 0x71017a38e0 + static SoundEvent* NOTE_BASSATTACK; // name guessed: 0x71017a38e8 + static SoundEvent* NOTE_HARP; // name guessed: 0x71017a38f0 + static SoundEvent* NOTE_HAT; // name guessed: 0x71017a38f8 + static SoundEvent* NOTE_PLING; // name guessed: 0x71017a3900 + static SoundEvent* NOTE_SNARE; // name guessed: 0x71017a3908 + static SoundEvent* BLOCK_NOTE_BELL; // name guessed: 0x71017a4248 + static SoundEvent* BLOCK_NOTE_CHIME; // name guessed: 0x71017a4250 + static SoundEvent* BLOCK_NOTE_FLUTE; // name guessed: 0x71017a4258 + static SoundEvent* BLOCK_NOTE_GUITAR; // name guessed: 0x71017a4260 + static SoundEvent* BLOCK_NOTE_XYLOPHONE; // name guessed: 0x71017a4240 + static SoundEvent* ENTITY_PAINTING_BREAK; // name guessed: 0x71017a3910 + static SoundEvent* ENTITY_PAINTING_PLACE; // name guessed: 0x71017a3918 + static SoundEvent* ENTITY_PARROT_AMBIENT; // name guessed: 0x71017a3920 + static SoundEvent* ENTITY_PARROT_DEATH; // name guessed: 0x71017a3928 + static SoundEvent* ENTITY_PARROT_EAT; // name guessed: 0x71017a3930 + static SoundEvent* ENTITY_PARROT_FLY; // name guessed: 0x71017a3938 + static SoundEvent* ENTITY_PARROT_HURT; // name guessed: 0x71017a3940 + static SoundEvent* ENTITY_PARROT_STEP; // name guessed: 0x71017a3a20 + static SoundEvent* MOB_PIG_IDLE; // name guessed: 0x71017a3a28 + static SoundEvent* MOB_PIG_DEATH; // name guessed: 0x71017a3a30 + static SoundEvent* MOB_PIG_IDLE_2; // name guessed: 0x71017a3a38 + static SoundEvent* MOB_HORSE_LEATHER_2; // name guessed: 0x71017a3a40 + static SoundEvent* MOB_PIG_STEP; // name guessed: 0x71017a3a48 + static SoundEvent* TILE_PISTON_IN; // name guessed: 0x71017a3a50 + static SoundEvent* TILE_PISTON_OUT; // name guessed: 0x71017a3a58 + static SoundEvent* ENTITY_PLAYER_ATTACK_CRIT; // name guessed: 0x71017a3a60 + static SoundEvent* ENTITY_PLAYER_ATTACK_KNOCKBACK; // name guessed: 0x71017a3a68 + static SoundEvent* ENTITY_PLAYER_ATTACK_WEAK; // name guessed: 0x71017a3a70 + static SoundEvent* ENTITY_PLAYER_ATTACK_STRONG; // name guessed: 0x71017a3a78 + static SoundEvent* ENTITY_PLAYER_ATTACK_SWEEP; // name guessed: 0x71017a3a80 + static SoundEvent* ENTITY_PLAYER_ATTACK_WEAK_2; // name guessed: 0x71017a3a88 + static SoundEvent* GAME_PLAYER_HURT_FALL_BIG; // name guessed: 0x71017a3a90 + static SoundEvent* RANDOM_BREATH; // name guessed: 0x71017a3a98 + static SoundEvent* RANDOM_BURP; // name guessed: 0x71017a3aa0 + static SoundEvent* DAMAGE_HURTFLESH_4; // name guessed: 0x71017a3aa8 + static SoundEvent* DAMAGE_HURTFLESH_5; // name guessed: 0x71017a3ab0 + static SoundEvent* RANDOM_LEVELUP; // name guessed: 0x71017a3ab8 + static SoundEvent* DAMAGE_FALLSMALL_2; // name guessed: 0x71017a3ac0 + static SoundEvent* GAME_PLAYER_SWIM_SPLASH; // name guessed: 0x71017a3ac8 + static SoundEvent* GAME_PLAYER_SWIM; // name guessed: 0x71017a3ad0 + static SoundEvent* ENTITY_PLAYER_HURT_DROWN; // name guessed: 0x71017a4280 + static SoundEvent* ENTITY_PLAYER_HURT_ON_FIRE; // name guessed: 0x71017a4288 + static SoundEvent* ENTITY_POLARBEAR_IDLE; // name guessed: 0x71017a3ad8 + static SoundEvent* ENTITY_POLARBEAR_BABYIDLE; // name guessed: 0x71017a3ae0 + static SoundEvent* ENTITY_POLARBEAR_DEATH; // name guessed: 0x71017a3ae8 + static SoundEvent* ENTITY_POLARBEAR_HURT; // name guessed: 0x71017a3af0 + static SoundEvent* ENTITY_POLARBEAR_STEP; // name guessed: 0x71017a3af8 + static SoundEvent* ENTITY_POLARBEAR_WARNING; // name guessed: 0x71017a3b00 + static SoundEvent* PORTAL_PORTAL; // name guessed: 0x71017a3b08 + static SoundEvent* PORTAL_TRAVEL; // name guessed: 0x71017a3b10 + static SoundEvent* PORTAL_TRIGGER; // name guessed: 0x71017a3b18 + static SoundEvent* ENTITY_RABBIT_IDLE; // name guessed: 0x71017a3b20 + static SoundEvent* ENTITY_RABBIT_ATTACK; // name guessed: 0x71017a3b28 + static SoundEvent* MOB_RABBIT_DEATH; // name guessed: 0x71017a3b30 + static SoundEvent* ENTITY_RABBIT_HURT; // name guessed: 0x71017a3b38 + static SoundEvent* ENTITY_RABBIT_HOP; // name guessed: 0x71017a3b40 + static SoundEvent* RECORD_11; // name guessed: 0x71017a3b48 + static SoundEvent* RECORD_13; // name guessed: 0x71017a3b50 + static SoundEvent* BLOCKS; // name guessed: 0x71017a3b58 + static SoundEvent* CAT; // name guessed: 0x71017a3b60 + static SoundEvent* CHIRP; // name guessed: 0x71017a3b68 + static SoundEvent* FAR; // name guessed: 0x71017a3b70 + static SoundEvent* MALL; // name guessed: 0x71017a3b78 + static SoundEvent* MELLOHI; // name guessed: 0x71017a3b80 + static SoundEvent* STAL; // name guessed: 0x71017a3b88 + static SoundEvent* STRAD; // name guessed: 0x71017a3b90 + static SoundEvent* WHERE_ARE_WE_NOW; // name guessed: 0x71017a3b98 + static SoundEvent* WARD; // name guessed: 0x71017a3ba0 + static SoundEvent* RANDOM_FIZZ_5; // name guessed: 0x71017a3ba8 + static SoundEvent* DIG_SAND; // name guessed: 0x71017a3bb0 + static SoundEvent* STEP_SAND; // name guessed: 0x71017a3bb8 + static SoundEvent* STEP_SAND_2; // name guessed: 0x71017a3bc0 + static SoundEvent* DIG_SAND_2; // name guessed: 0x71017a3bc8 + static SoundEvent* STEP_SAND_3; // name guessed: 0x71017a3bd0 + static SoundEvent* MOB_SHEEP_IDLE; // name guessed: 0x71017a3bd8 + static SoundEvent* MOB_SHEEP_IDLE_2; // name guessed: 0x71017a3be0 + static SoundEvent* MOB_SHEEP_IDLE_3; // name guessed: 0x71017a3be8 + static SoundEvent* MOB_SHEEP_SHEAR_2; // name guessed: 0x71017a3bf0 + static SoundEvent* MOB_SHEEP_STEP; // name guessed: 0x71017a3bf8 + static SoundEvent* ITEM_SHIELD_BLOCK; // name guessed: 0x71017a3c00 + static SoundEvent* RANDOM_BREAK_2; // name guessed: 0x71017a3c08 + static SoundEvent* SHOVEL_FLATTEN; // name guessed: 0x71017a3c10 + static SoundEvent* ITEM_TOTEM_USE; // name guessed: 0x71017a3e00 + static SoundEvent* BLOCK_SHULKER_BOX_CLOSE; // name guessed: 0x71017a3c28 + static SoundEvent* BLOCK_SHULKER_BOX_OPEN; // name guessed: 0x71017a3c20 + static SoundEvent* ENTITY_SHULKER_AMBIENT; // name guessed: 0x71017a3c18 + static SoundEvent* ENTITY_SHULKER_CLOSE; // name guessed: 0x71017a3c40 + static SoundEvent* ENTITY_SHULKER_DEATH; // name guessed: 0x71017a3c48 + static SoundEvent* ENTITY_SHULKER_HURT; // name guessed: 0x71017a3c50 + static SoundEvent* ENTITY_SHULKER_HURT_CLOSED; // name guessed: 0x71017a3c58 + static SoundEvent* ENTITY_SHULKER_OPEN; // name guessed: 0x71017a3c60 + static SoundEvent* ENTITY_SHULKER_SHOOT; // name guessed: 0x71017a3c68 + static SoundEvent* MOB_ENDERMEN_PORTAL_3; // name guessed: 0x71017a3c70 + static SoundEvent* ENTITY_SHULKER_BULLET_HIT; // name guessed: 0x71017a3c30 + static SoundEvent* ENTITY_SHULKER_BULLET_HIT_2; // name guessed: 0x71017a3c38 + static SoundEvent* MOB_SILVERFISH_IDLE_2; // name guessed: 0x71017a3c78 + static SoundEvent* MOB_SILVERFISH_KILL_2; // name guessed: 0x71017a3c80 + static SoundEvent* MOB_SILVERFISH_HIT_2; // name guessed: 0x71017a3c88 + static SoundEvent* MOB_SILVERFISH_STEP_2; // name guessed: 0x71017a3c90 + static SoundEvent* MOB_SKELETON_IDLE; // name guessed: 0x71017a3c98 + static SoundEvent* MOB_SKELETON_DEATH; // name guessed: 0x71017a3ca0 + static SoundEvent* MOB_SKELETON_HURT; // name guessed: 0x71017a3cc0 + static SoundEvent* RANDOM_BOW_8; // name guessed: 0x71017a3cc8 + static SoundEvent* MOB_SKELETON_STEP; // name guessed: 0x71017a3cd0 + static SoundEvent* MOB_HORSE_SKELETON_IDLE; // name guessed: 0x71017a3ca8 + static SoundEvent* MOB_HORSE_SKELETON_DEATH; // name guessed: 0x71017a3cb0 + static SoundEvent* MOB_HORSE_SKELETON_HIT; // name guessed: 0x71017a3cb8 + static SoundEvent* MOB_SLIME_BIG_3; // name guessed: 0x71017a3cd8 + static SoundEvent* MOB_SLIME_SMALL; // name guessed: 0x71017a3ce0 + static SoundEvent* MOB_SLIME_SMALL_2; // name guessed: 0x71017a3ce8 + static SoundEvent* MOB_SLIME_BIG_4; // name guessed: 0x71017a3cf0 + static SoundEvent* MOB_SLIME_SMALL_3; // name guessed: 0x71017a3cf8 + static SoundEvent* MOB_SLIME_ATTACK; // name guessed: 0x71017a2df8 + static SoundEvent* MOB_SLIME_BIG_5; // name guessed: 0x71017a2e18 + static SoundEvent* MOB_SLIME_BIG_6; // name guessed: 0x71017a2e08 + static SoundEvent* MOB_SLIME_BIG_7; // name guessed: 0x71017a2e38 + static SoundEvent* MOB_SLIME_BIG_8; // name guessed: 0x71017a2e28 + static SoundEvent* MOB_SLIME_SMALL_4; // name guessed: 0x71017a3d00 + static SoundEvent* MOB_SLIME_SMALL_5; // name guessed: 0x71017a3d08 + static SoundEvent* MOB_MAGMACUBE_SMALL; // name guessed: 0x71017a3d10 + static SoundEvent* MOB_SLIME_SMALL_6; // name guessed: 0x71017a2e10 + static SoundEvent* MOB_SLIME_SMALL_7; // name guessed: 0x71017a2e00 + static SoundEvent* MOB_SLIME_SMALL_8; // name guessed: 0x71017a2e30 + static SoundEvent* MOB_SLIME_SMALL_9; // name guessed: 0x71017a2e20 + static SoundEvent* RANDOM_BOW_9; // name guessed: 0x71017a2e40 + static SoundEvent* ENTITY_SNOWMAN_AMBIENT; // name guessed: 0x71017a2ea8 + static SoundEvent* ENTITY_SNOWMAN_DEATH; // name guessed: 0x71017a2eb8 + static SoundEvent* ENTITY_SNOWMAN_HURT; // name guessed: 0x71017a2eb0 + static SoundEvent* RANDOM_BOW_10; // name guessed: 0x71017a2ea0 + static SoundEvent* DIG_SNOW; // name guessed: 0x71017a3d18 + static SoundEvent* STEP_SNOW; // name guessed: 0x71017a3d20 + static SoundEvent* STEP_SNOW_2; // name guessed: 0x71017a3d28 + static SoundEvent* DIG_SNOW_2; // name guessed: 0x71017a3d30 + static SoundEvent* STEP_SNOW_3; // name guessed: 0x71017a3d38 + static SoundEvent* MOB_SPIDER_IDLE; // name guessed: 0x71017a3d40 + static SoundEvent* MOB_SPIDER_DEATH; // name guessed: 0x71017a3d48 + static SoundEvent* MOB_SPIDER_IDLE_2; // name guessed: 0x71017a3d50 + static SoundEvent* MOB_SPIDER_STEP; // name guessed: 0x71017a3d58 + static SoundEvent* RANDOM_GLASS_2; // name guessed: 0x71017a3d60 + static SoundEvent* RANDOM_BOW_11; // name guessed: 0x71017a3d68 + static SoundEvent* ENTITY_SQUID_IDLE; // name guessed: 0x71017a3d70 + static SoundEvent* ENTITY_SQUID_DEATH; // name guessed: 0x71017a3d78 + static SoundEvent* ENTITY_SQUID_HURT; // name guessed: 0x71017a3d80 + static SoundEvent* DIG_STONE_6; // name guessed: 0x71017a3d88 + static SoundEvent* STEP_STONE_9; // name guessed: 0x71017a3da0 + static SoundEvent* STEP_STONE_10; // name guessed: 0x71017a3da8 + static SoundEvent* DIG_STONE_7; // name guessed: 0x71017a3db0 + static SoundEvent* STEP_STONE_11; // name guessed: 0x71017a3dc8 + static SoundEvent* RANDOM_CLICK_7; // name guessed: 0x71017a3d90 + static SoundEvent* RANDOM_CLICK_8; // name guessed: 0x71017a3d98 + static SoundEvent* RANDOM_CLICK_9; // name guessed: 0x71017a3db8 + static SoundEvent* RANDOM_CLICK_10; // name guessed: 0x71017a3dc0 + static SoundEvent* ENTITY_STRAY_IDLE; // name guessed: 0x71017a3dd0 + static SoundEvent* ENTITY_STRAY_DEATH; // name guessed: 0x71017a3dd8 + static SoundEvent* ENTITY_STRAY_HURT; // name guessed: 0x71017a3de0 + static SoundEvent* ENTITY_STRAY_STEP; // name guessed: 0x71017a3de8 + static SoundEvent* ENCHANT_THORNS_HIT; // name guessed: 0x71017a3df0 + static SoundEvent* RANDOM_FUSE_2; // name guessed: 0x71017a3df8 + static SoundEvent* RANDOM_CLICK_11; // name guessed: 0x71017a3e08 + static SoundEvent* RANDOM_CLICK_12; // name guessed: 0x71017a3e10 + static SoundEvent* RANDOM_CLICK_13; // name guessed: 0x71017a3e18 + static SoundEvent* RANDOM_BOWHIT_2; // name guessed: 0x71017a3e20 + static SoundEvent* RANDOM_CLICK; // name guessed: 0x71017a3e28 + static SoundEvent* ENTITY_VEX_IDLE; // name guessed: 0x71017a3e30 + static SoundEvent* ENTITY_VEX_CHARGE; // name guessed: 0x71017a3e38 + static SoundEvent* ENTITY_VEX_DEATH; // name guessed: 0x71017a3e40 + static SoundEvent* ENTITY_VEX_HURT; // name guessed: 0x71017a3e48 + static SoundEvent* MOB_VILLAGER_IDLE; // name guessed: 0x71017a3e50 + static SoundEvent* MOB_VILLAGER_DEATH; // name guessed: 0x71017a3e58 + static SoundEvent* MOB_VILLAGER_HIT; // name guessed: 0x71017a3e60 + static SoundEvent* MOB_VILLAGER_NO; // name guessed: 0x71017a3e68 + static SoundEvent* MOB_VILLAGER_HAGGLE; // name guessed: 0x71017a3e70 + static SoundEvent* MOB_VILLAGER_YES; // name guessed: 0x71017a3e78 + static SoundEvent* ENTITY_VINDICATION_ILLAGER_AMBIENT; // name guessed: 0x71017a3e80 + static SoundEvent* ENTITY_VINDICATION_ILLAGER_DEATH; // name guessed: 0x71017a3e88 + static SoundEvent* ENTITY_VINDICATION_ILLAGER_HURT; // name guessed: 0x71017a3e90 + static SoundEvent* BLOCK_WATERLILY_PLACE; // name guessed: 0x71017a3e98 + static SoundEvent* LIQUID_WATER; // name guessed: 0x71017a3ea0 + static SoundEvent* AMBIENT_WEATHER_RAIN; // name guessed: 0x71017a3ea8 + static SoundEvent* AMBIENT_WEATHER_RAIN_2; // name guessed: 0x71017a3eb0 + static SoundEvent* ENTITY_WITCH_IDLE; // name guessed: 0x71017a3eb8 + static SoundEvent* ENTITY_WITCH_DEATH; // name guessed: 0x71017a3ec0 + static SoundEvent* ENTITY_WITCH_DRINK; // name guessed: 0x71017a3ec8 + static SoundEvent* ENTITY_WITCH_HURT; // name guessed: 0x71017a3ed0 + static SoundEvent* ENTITY_WITCH_THROW; // name guessed: 0x71017a3ed8 + static SoundEvent* MOB_WITHER_IDLE; // name guessed: 0x71017a3ee0 + static SoundEvent* MOB_ZOMBIE_WOODBREAK; // name guessed: 0x71017a3ee8 + static SoundEvent* MOB_WITHER_DEATH; // name guessed: 0x71017a3ef0 + static SoundEvent* MOB_WITHER_HURT; // name guessed: 0x71017a3ef8 + static SoundEvent* MOB_WITHER_SHOOT; // name guessed: 0x71017a3f00 + static SoundEvent* MOB_WITHER_SPAWN; // name guessed: 0x71017a3f28 + static SoundEvent* MOB_SKELETON_IDLE_2; // name guessed: 0x71017a3f08 + static SoundEvent* MOB_SKELETON_DEATH_2; // name guessed: 0x71017a3f10 + static SoundEvent* MOB_SKELETON_HURT_2; // name guessed: 0x71017a3f18 + static SoundEvent* MOB_SKELETON_STEP_2; // name guessed: 0x71017a3f20 + static SoundEvent* MOB_WOLF_BARK; // name guessed: 0x71017a3f30 + static SoundEvent* MOB_WOLF_DEATH; // name guessed: 0x71017a3f38 + static SoundEvent* MOB_WOLF_GROWL; // name guessed: 0x71017a3f40 + static SoundEvent* MOB_WOLF_HOWL; // name guessed: 0x71017a3f48 + static SoundEvent* MOB_WOLF_HURT; // name guessed: 0x71017a3f50 + static SoundEvent* MOB_WOLF_PANTING; // name guessed: 0x71017a3f58 + static SoundEvent* MOB_WOLF_SHAKE; // name guessed: 0x71017a3f60 + static SoundEvent* MOB_WOLF_STEP; // name guessed: 0x71017a3f68 + static SoundEvent* MOB_WOLF_WHINE; // name guessed: 0x71017a3f70 + static SoundEvent* BLOCK_WOODEN_DOOR_CLOSE; // name guessed: 0x71017a3f78 + static SoundEvent* BLOCK_WOODEN_DOOR_OPEN; // name guessed: 0x71017a3f80 + static SoundEvent* BLOCK_WOODEN_TRAPDOOR_CLOSE; // name guessed: 0x71017a3f88 + static SoundEvent* BLOCK_WOODEN_TRAPDOOR_OPEN; // name guessed: 0x71017a3f90 + static SoundEvent* DIG_WOOD_4; // name guessed: 0x71017a3f98 + static SoundEvent* STEP_WOOD; // name guessed: 0x71017a3fb0 + static SoundEvent* STEP_WOOD_2; // name guessed: 0x71017a3fb8 + static SoundEvent* DIG_WOOD_5; // name guessed: 0x71017a3fc0 + static SoundEvent* STEP_WOOD_3; // name guessed: 0x71017a3fd8 + static SoundEvent* RANDOM_CLICK_14; // name guessed: 0x71017a3fa0 + static SoundEvent* RANDOM_CLICK_15; // name guessed: 0x71017a3fa8 + static SoundEvent* RANDOM_CLICK_16; // name guessed: 0x71017a3fc8 + static SoundEvent* RANDOM_CLICK_17; // name guessed: 0x71017a3fd0 + static SoundEvent* MOB_ZOMBIE_IDLE; // name guessed: 0x71017a3fe0 + static SoundEvent* MOB_ZOMBIE_WOOD; // name guessed: 0x71017a3fe8 + static SoundEvent* MOB_ZOMBIE_METAL; // name guessed: 0x71017a3ff0 + static SoundEvent* MOB_ZOMBIE_WOODBREAK_2; // name guessed: 0x71017a3ff8 + static SoundEvent* MOB_ZOMBIE_DEATH; // name guessed: 0x71017a4000 + static SoundEvent* MOB_ZOMBIE_HURT; // name guessed: 0x71017a4020 + static SoundEvent* MOB_ZOMBIE_INFECT; // name guessed: 0x71017a4028 + static SoundEvent* MOB_ZOMBIE_STEP; // name guessed: 0x71017a4050 + static SoundEvent* MOB_HORSE_ZOMBIE_IDLE; // name guessed: 0x71017a4008 + static SoundEvent* MOB_HORSE_ZOMBIE_DEATH; // name guessed: 0x71017a4010 + static SoundEvent* MOB_HORSE_ZOMBIE_HIT; // name guessed: 0x71017a4018 + static SoundEvent* MOB_ZOMBIEPIG_IDLE; // name guessed: 0x71017a4030 + static SoundEvent* MOB_ZOMBIEPIG_ANGRY; // name guessed: 0x71017a4038 + static SoundEvent* MOB_ZOMBIEPIG_DEATH; // name guessed: 0x71017a4040 + static SoundEvent* MOB_ZOMBIEPIG_HURT; // name guessed: 0x71017a4048 + static SoundEvent* MOB_ZOMBIE_IDLE_2; // name guessed: 0x71017a4058 + static SoundEvent* MOB_ZOMBIE_UNFECT; // name guessed: 0x71017a4060 + static SoundEvent* MOB_ZOMBIE_REMEDY; // name guessed: 0x71017a4068 + static SoundEvent* MOB_ZOMBIE_DEATH_2; // name guessed: 0x71017a4070 + static SoundEvent* MOB_ZOMBIE_HURT_2; // name guessed: 0x71017a4078 + static SoundEvent* MOB_ZOMBIE_STEP_2; // name guessed: 0x71017a4080 + static SoundEvent* MG01_SHOWDOWN; // name guessed: 0x71017a4088 + static SoundEvent* MG01_CELEBRATION; // name guessed: 0x71017a4090 + static SoundEvent* MG01_CHEST; // name guessed: 0x71017a4098 + static SoundEvent* MG01_DEATH; // name guessed: 0x71017a40a0 + static SoundEvent* MG01_GRACE; // name guessed: 0x71017a40a8 + static SoundEvent* MG01_GRACEZERO; // name guessed: 0x71017a40b0 + static SoundEvent* MG01_LOBBY; // name guessed: 0x71017a40b8 + static SoundEvent* MG01_LOBBYACCENT; // name guessed: 0x71017a40c0 + static SoundEvent* MG01_LOBBYZERO; // name guessed: 0x71017a40c8 + static SoundEvent* MG01_GAMESTART; // name guessed: 0x71017a40d0 + static SoundEvent* MG01_STARTCOUNTDOWN; // name guessed: 0x71017a40d8 + static SoundEvent* MG02_SHOWDOWN; // name guessed: 0x71017a40e0 + static SoundEvent* MG02_GAMESTART; // name guessed: 0x71017a40e8 + static SoundEvent* MG02_GAMEEND; // name guessed: 0x71017a40f0 + static SoundEvent* MG02_DEATH; // name guessed: 0x71017a40f8 + static SoundEvent* MG02_STARTCOUNTDOWN; // name guessed: 0x71017a4100 + static SoundEvent* MG02_FALLING; // name guessed: 0x71017a4108 + static SoundEvent* MG03_DEATH; // name guessed: 0x71017a4110 + static SoundEvent* MG03_CHECKPOINT; // name guessed: 0x71017a4118 + static SoundEvent* MG03_BESTTIME; // name guessed: 0x71017a4128 + static SoundEvent* MG03_FINISHLINE; // name guessed: 0x71017a4130 + static SoundEvent* MG03_FINISHLINEBESTSCORE; // name guessed: 0x71017a4138 + static SoundEvent* MG03_FINISHLINEBESTTIME; // name guessed: 0x71017a4140 + static SoundEvent* MG03_FINISHLINE1ST; // name guessed: 0x71017a4148 + static SoundEvent* MG03_FINISHLINE1STBESTSCORE; // name guessed: 0x71017a4150 + static SoundEvent* MG03_FINISHLINE1STBESTTIME; // name guessed: 0x71017a4158 + static SoundEvent* MG03_FINISHLINE2ND; // name guessed: 0x71017a4160 + static SoundEvent* MG03_FINISHLINE2NDBESTSCORE; // name guessed: 0x71017a4168 + static SoundEvent* MG03_FINISHLINE2NDBESTTIME; // name guessed: 0x71017a4170 + static SoundEvent* MG03_FINISHLINE3RD; // name guessed: 0x71017a4178 + static SoundEvent* MG03_FINISHLINE3RDBESTSCORE; // name guessed: 0x71017a4180 + static SoundEvent* MG03_FINISHLINE3RDBESTTIME; // name guessed: 0x71017a4188 + static SoundEvent* MG03_WINNER; // name guessed: 0x71017a4198 + static SoundEvent* MG03_WINNERANNOUNCE; // name guessed: 0x71017a41a0 + static SoundEvent* MG03_BESTSCORE; // name guessed: 0x71017a41a8 + static SoundEvent* MG03_REDALERTLOOP; // name guessed: 0x71017a41b0 + static SoundEvent* MG03_FARALERTSOLO; // name guessed: 0x71017a41b8 + static SoundEvent* MG03_EMERALDPOINTTICK; // name guessed: 0x71017a41c0 + static SoundEvent* MG03_EMERALDPOINTTOK; // name guessed: 0x71017a41c8 + static SoundEvent* MG03_GOLDPOINTTICK; // name guessed: 0x71017a41d0 + static SoundEvent* MG03_GOLDPOINTTOK; // name guessed: 0x71017a41d8 + static SoundEvent* MG03_DIAMONDPOINT; // name guessed: 0x71017a41e0 + static SoundEvent* MG03_RESPAWN; // name guessed: 0x71017a41e8 + static SoundEvent* MG03_COUNTDOWNZERO; // name guessed: 0x71017a41f0 + static SoundEvent* MG03_FALLBIG_ALIAS; // name guessed: 0x71017a41f8 + static SoundEvent* MG03_FALLSMALL_ALIAS; // name guessed: 0x71017a4200 + static SoundEvent* MG03_HIT_ALIAS; // name guessed: 0x71017a4208 + static SoundEvent* MOB_BLAZE_BREATHE_ALIAS; // name guessed: 0x71017a3948 + static SoundEvent* RANDOM_FUSE_ALIAS; // name guessed: 0x71017a3950 + static SoundEvent* MOB_GUARDIAN_LAND_IDLE_ALIAS; // name guessed: 0x71017a3958 + static SoundEvent* MOB_ENDERDRAGON_GROWL_ALIAS; // name guessed: 0x71017a3960 + static SoundEvent* MOB_ENDERMEN_IDLE_ALIAS; // name guessed: 0x71017a3968 + static SoundEvent* MOB_SILVERFISH_IDLE_ALIAS; // name guessed: 0x71017a3970 + static SoundEvent* ENTITY_EVOCATION_ILLAGER_AMBIENT_ALIAS; // name guessed: 0x71017a3978 + static SoundEvent* MOB_GHAST_MOAN_ALIAS; // name guessed: 0x71017a3980 + static SoundEvent* ENTITY_HUSK_IDLE_ALIAS; // name guessed: 0x71017a3988 + static SoundEvent* ENTITY_ILLUSION_ILLAGER_AMBIENT_ALIAS; // name guessed: 0x71017a3990 + static SoundEvent* MOB_MAGMACUBE_BIG_ALIAS; // name guessed: 0x71017a3998 + static SoundEvent* ENTITY_POLARBEAR_IDLE_ALIAS; // name guessed: 0x71017a39a0 + static SoundEvent* ENTITY_SHULKER_AMBIENT_ALIAS; // name guessed: 0x71017a39a8 + static SoundEvent* MOB_SILVERFISH_IDLE_ALIAS_2; // name guessed: 0x71017a39b0 + static SoundEvent* MOB_SKELETON_IDLE_ALIAS; // name guessed: 0x71017a39b8 + static SoundEvent* MOB_SLIME_BIG_ALIAS; // name guessed: 0x71017a39c0 + static SoundEvent* MOB_SPIDER_IDLE_ALIAS; // name guessed: 0x71017a39c8 + static SoundEvent* ENTITY_STRAY_IDLE_ALIAS; // name guessed: 0x71017a39d0 + static SoundEvent* ENTITY_VEX_IDLE_ALIAS; // name guessed: 0x71017a39d8 + static SoundEvent* ENTITY_VINDICATION_ILLAGER_AMBIENT_ALIAS; // name guessed: 0x71017a39e0 + static SoundEvent* ENTITY_WITCH_IDLE_ALIAS; // name guessed: 0x71017a39e8 + static SoundEvent* MOB_WITHER_IDLE_ALIAS; // name guessed: 0x71017a39f0 + static SoundEvent* MOB_SKELETON_IDLE_ALIAS_2; // name guessed: 0x71017a39f8 + static SoundEvent* MOB_WOLF_BARK_ALIAS; // name guessed: 0x71017a3a00 + static SoundEvent* MOB_ZOMBIE_IDLE_ALIAS; // name guessed: 0x71017a3a08 + static SoundEvent* MOB_ZOMBIEPIG_IDLE_ALIAS; // name guessed: 0x71017a3a10 + static SoundEvent* MOB_ZOMBIE_IDLE_ALIAS_2; // name guessed: 0x71017a3a18 + static SoundEvent* RANDOM_EXPLODE_ALIAS; // name guessed: 0x71017a4290 + static SoundEvent* RANDOM_SPLASH_ALIAS; // name guessed: 0x71017a4298 + static SoundEvent* RANDOM_SPLASH_ALIAS_2; // name guessed: 0x71017a42a0 + static SoundEvent* RANDOM_SPLASH_ALIAS_3; // name guessed: 0x71017a42b0 + static SoundEvent* RANDOM_SPLASH_ALIAS_4; // name guessed: 0x71017a42b8 + static SoundEvent* RANDOM_SPLASH_ALIAS_5; // name guessed: 0x71017a42c0 + static SoundEvent* RANDOM_SPLASH_ALIAS_6; // name guessed: 0x71017a42c8 + static SoundEvent* RANDOM_SPLASH_ALIAS_7; // name guessed: 0x71017a42d0 + static SoundEvent* RANDOM_SPLASH_ALIAS_8; // name guessed: 0x71017a42a8 }; diff --git a/src/Minecraft.World/UnityWorldAchievements.cpp b/src/Minecraft.World/UnityWorldAchievements.cpp new file mode 100644 index 00000000..db81ee3b --- /dev/null +++ b/src/Minecraft.World/UnityWorldAchievements.cpp @@ -0,0 +1,3 @@ +#include "net/minecraft/world/stats/Achievement.cpp" +#include "net/minecraft/world/stats/Achievements.cpp" +#include "net/minecraft/world/stats/Stat.cpp" diff --git a/src/Minecraft.World/java/io/DataInput.h b/src/Minecraft.World/java/io/DataInput.h index eb87b6a9..0b50a95d 100644 --- a/src/Minecraft.World/java/io/DataInput.h +++ b/src/Minecraft.World/java/io/DataInput.h @@ -12,9 +12,9 @@ class DataInput { virtual int readUnsignedShort() = 0; virtual wchar_t readChar() = 0; // is this correct? i swapped the two readFully methods for a match in ByteArrayTag::load - virtual void readFully(arrayWithLength) = 0; - virtual void readFully(arrayWithLength) = 0; - virtual void readBytes(arrayWithLength) = 0; + virtual bool readFully(arrayWithLength) = 0; + virtual bool readFully(arrayWithLength) = 0; + virtual bool readBytes(arrayWithLength) = 0; virtual double readDouble() = 0; virtual float readFloat() = 0; virtual int readInt() = 0; diff --git a/src/Minecraft.World/java/io/DataInputStream.h b/src/Minecraft.World/java/io/DataInputStream.h index c4dcf4e5..e0eccab2 100644 --- a/src/Minecraft.World/java/io/DataInputStream.h +++ b/src/Minecraft.World/java/io/DataInputStream.h @@ -25,9 +25,9 @@ class DataInputStream : public InputStream, public DataInput { int readUnsignedShort() override; wchar_t readChar() override; // todo: wrong order likely, need to maintain matching tho - void readBytes(arrayWithLength) override; - void readFully(arrayWithLength) override; - void readFully(arrayWithLength) override; + bool readBytes(arrayWithLength) override; + bool readFully(arrayWithLength) override; + bool readFully(arrayWithLength) override; double readDouble() override; float readFloat() override; int readInt() override; @@ -44,6 +44,8 @@ class DataInputStream : public InputStream, public DataInput { BlockPos* readBlockPosPointer(); not_null_ptr readItem(); CompoundTag* readNbt(); + CompoundTag* readCompressedNbt(); + void deleteChildStream(); InputStream* m_inputStream; }; diff --git a/src/Minecraft.World/java/io/DataOutputStream.h b/src/Minecraft.World/java/io/DataOutputStream.h index 9ca985d5..859ad7b8 100644 --- a/src/Minecraft.World/java/io/DataOutputStream.h +++ b/src/Minecraft.World/java/io/DataOutputStream.h @@ -39,7 +39,7 @@ class DataOutputStream : public OutputStream, public DataOutput { void writeVarInt(int); void writeVarLong(long); - void writeBlockPos(const BlockPos&) const; + void writeBlockPos(const BlockPos&); void writeItem(not_null_ptr); void writeNbt(CompoundTag*); diff --git a/src/Minecraft.World/net/minecraft/util/Mth.h b/src/Minecraft.World/net/minecraft/util/Mth.h index 97227879..2d8c8959 100644 --- a/src/Minecraft.World/net/minecraft/util/Mth.h +++ b/src/Minecraft.World/net/minecraft/util/Mth.h @@ -1,5 +1,6 @@ #pragma once +#include #include class Random; @@ -10,11 +11,13 @@ class Mth { static constexpr float PI = 3.1415927; static float* SIN; + static float* ATAN; static float sin(float); static float cos(float); static int floor(double); static int floor(float); + static int ceil(float); static float sqrt(float v); static float sqrt(double v); static double clamp(double, double, double); @@ -26,15 +29,17 @@ class Mth { static float abs(float i); static double abs(double i); static float wrapDegrees(float); - static void cached_atan_index(int, int); + static double wrapDegrees(double); + static int cached_atan_index(int, int); static void init(); static long lfloor(double); + static long round(double); static double clampedLerp(double, double, double); static double frac(double); static int hsvToRgb(float, float, float); static int nextInt(Random* random, int i, int j); static float nextFloat(Random* random, float i, float j); static double nextDouble(Random* random, double i, double j); - static std::wstring createInsecureUUID(Random* random); + static std::wstring createInsecureUUID(Random* random) asm("createInsecureUUID__3MthSFP6Random"); static int64_t getSeed(int, int, int); }; diff --git a/src/Minecraft.World/net/minecraft/util/datafix/DataFixTypes.h b/src/Minecraft.World/net/minecraft/util/datafix/DataFixTypes.h new file mode 100644 index 00000000..ed344804 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/util/datafix/DataFixTypes.h @@ -0,0 +1,6 @@ +#pragma once + +class DataFixTypes { +public: + enum EDataFixTypes { ITEM = 5, STRUCTURE = 7 }; +}; diff --git a/src/Minecraft.World/net/minecraft/util/datafix/DataFixer.h b/src/Minecraft.World/net/minecraft/util/datafix/DataFixer.h new file mode 100644 index 00000000..4210b16f --- /dev/null +++ b/src/Minecraft.World/net/minecraft/util/datafix/DataFixer.h @@ -0,0 +1,11 @@ +#pragma once + +#include "net/minecraft/util/datafix/DataFixTypes.h" + +class CompoundTag; + +class DataFixer { +public: + DataFixer(); + virtual CompoundTag* update(DataFixTypes::EDataFixTypes, CompoundTag*, int version) = 0; +}; diff --git a/src/Minecraft.World/net/minecraft/util/datafix/DataFixerUpper.h b/src/Minecraft.World/net/minecraft/util/datafix/DataFixerUpper.h new file mode 100644 index 00000000..00e312ea --- /dev/null +++ b/src/Minecraft.World/net/minecraft/util/datafix/DataFixerUpper.h @@ -0,0 +1,33 @@ +#pragma once + +#include "net/minecraft/util/datafix/DataFixer.h" +#include +#include +#include + +class CompoundTag; +class DataFix; +class DataWalker; + +class DataFixerUpper : public DataFixer { +public: + explicit DataFixerUpper(int version); + CompoundTag* updateData(DataFixTypes::EDataFixTypes, CompoundTag*); + CompoundTag* update(DataFixTypes::EDataFixTypes, CompoundTag*, int version) override; + CompoundTag* applyFixes(DataFixTypes::EDataFixTypes, CompoundTag*, int version); + CompoundTag* applyWalkers(DataFixTypes::EDataFixTypes, CompoundTag*, int version); + std::vector* getOrCreateWalker(DataFixTypes::EDataFixTypes); + std::vector* getOrCreateFix(DataFixTypes::EDataFixTypes); + void addWalker(DataFixTypes::EDataFixTypes, DataWalker*); + void addFixer(DataFixTypes::EDataFixTypes, DataFix*); + + int m_version; + std::unordered_map*> m_walkers; + std::unordered_map*> m_fixes; + static const std::wstring DATA_VERSION_KEY; +}; + +static_assert(sizeof(DataFixerUpper) == 0x60, "Original fixer-upper allocation"); +static_assert(__builtin_offsetof(DataFixerUpper, m_version) == 8, "Original target-version offset"); +static_assert(__builtin_offsetof(DataFixerUpper, m_walkers) == 0x10, "Original walker registry offset"); +static_assert(__builtin_offsetof(DataFixerUpper, m_fixes) == 0x38, "Original fix registry offset"); diff --git a/src/Minecraft.World/net/minecraft/world/ArrayWithLength.h b/src/Minecraft.World/net/minecraft/world/ArrayWithLength.h index 7bb6b677..3f3dbb4e 100644 --- a/src/Minecraft.World/net/minecraft/world/ArrayWithLength.h +++ b/src/Minecraft.World/net/minecraft/world/ArrayWithLength.h @@ -18,6 +18,13 @@ class arrayWithLength { this->m_data = initialData; this->m_length = length; } + template + // name guessed + arrayWithLength(T (&initialData)[N]) { + this->m_data = initialData; + this->m_length = N; + } + // NON_MATCHING | score: 3114 (lower is better) arrayWithLength(unsigned int size, bool a3) { T* temp; if (a3) @@ -28,7 +35,10 @@ class arrayWithLength { this->m_length = size; } + // name guessed T& operator[](unsigned int i) { return m_data[i]; } + // name guessed + const T& operator[](unsigned int i) const { return m_data[i]; } T& get(unsigned int i) { return m_data[i]; } void resize(unsigned int newSize) { @@ -51,7 +61,7 @@ class arrayWithLength { m_length = newSize; } - // NON_MATCHING + // NON_MATCHING | score: 3195 (lower is better) static void copy(T* dest, T* src, unsigned int size) { if (size) { unsigned int i = 0; diff --git a/src/Minecraft.World/net/minecraft/world/CensoredString.h b/src/Minecraft.World/net/minecraft/world/CensoredString.h index 33725cf7..b2529af1 100644 --- a/src/Minecraft.World/net/minecraft/world/CensoredString.h +++ b/src/Minecraft.World/net/minecraft/world/CensoredString.h @@ -3,6 +3,7 @@ class CensoredString { public: CensoredString(); + CensoredString(int, int); void* m_qword0; void* m_qword8; char m_byte10; diff --git a/src/Minecraft.World/net/minecraft/world/Container.h b/src/Minecraft.World/net/minecraft/world/Container.h index 91d1d5bc..56db73de 100644 --- a/src/Minecraft.World/net/minecraft/world/Container.h +++ b/src/Minecraft.World/net/minecraft/world/Container.h @@ -11,20 +11,20 @@ class ItemInstance; class Container : virtual public Nameable { public: virtual ~Container(); - virtual void getContainerSize() = 0; - virtual void isEmpty() = 0; + virtual int getContainerSize() = 0; + virtual bool isEmpty() = 0; virtual not_null_ptr getItem(unsigned int) = 0; virtual not_null_ptr removeItem(unsigned int, int) = 0; - virtual void removeItemNoUpdate(int) = 0; + virtual not_null_ptr removeItemNoUpdate(int) = 0; virtual void setItem(unsigned int, not_null_ptr) = 0; virtual int getMaxStackSize() = 0; virtual void setChanged() = 0; - virtual void stillValid(std::shared_ptr) = 0; + virtual bool stillValid(std::shared_ptr) = 0; virtual void startOpen(std::shared_ptr) = 0; virtual void stopOpen(std::shared_ptr) = 0; - virtual void canPlaceItem(int, not_null_ptr) = 0; - virtual void getContainerData(int) = 0; + virtual bool canPlaceItem(int, not_null_ptr) = 0; + virtual int getContainerData(int) = 0; virtual void setContainerData(int, int) = 0; - virtual void getContainerDataCount() = 0; + virtual int getContainerDataCount() = 0; virtual void clearContent() = 0; }; diff --git a/src/Minecraft.World/net/minecraft/world/Difficulty.cpp b/src/Minecraft.World/net/minecraft/world/Difficulty.cpp new file mode 100644 index 00000000..844866d9 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/Difficulty.cpp @@ -0,0 +1,9 @@ +#include "net/minecraft/world/Difficulty.h" + +Difficulty* Difficulty::byId(int id) { + return DIFFICULTIES[id % 4]; +} + +int Difficulty::getId() const { + return m_id; +} diff --git a/src/Minecraft.World/net/minecraft/world/Difficulty.h b/src/Minecraft.World/net/minecraft/world/Difficulty.h index 8d04280e..54cd9bd0 100644 --- a/src/Minecraft.World/net/minecraft/world/Difficulty.h +++ b/src/Minecraft.World/net/minecraft/world/Difficulty.h @@ -6,7 +6,13 @@ class Difficulty { static const Difficulty* EASY; static const Difficulty* NORMAL; static const Difficulty* HARD; + static Difficulty* DIFFICULTIES[4]; static Difficulty* byId(int id); int getId() const; + +private: + int m_id; }; + +static_assert(sizeof(Difficulty) == 4, "Difficulty ID layout"); diff --git a/src/Minecraft.World/net/minecraft/world/Nameable.h b/src/Minecraft.World/net/minecraft/world/Nameable.h index cf1cccb4..1ff2e28e 100644 --- a/src/Minecraft.World/net/minecraft/world/Nameable.h +++ b/src/Minecraft.World/net/minecraft/world/Nameable.h @@ -1,11 +1,13 @@ #pragma once +#include + class Nameable { public: Nameable(); - virtual void getName() = 0; - virtual void getCustomName() = 0; - virtual void hasCustomName() = 0; - virtual void getDisplayName() = 0; + virtual std::wstring getName() = 0; + virtual std::wstring getCustomName() = 0; + virtual bool hasCustomName() = 0; + virtual std::wstring getDisplayName() = 0; }; diff --git a/src/Minecraft.World/net/minecraft/world/PlayerUID.cpp b/src/Minecraft.World/net/minecraft/world/PlayerUID.cpp index 8d921944..bff18dfa 100644 --- a/src/Minecraft.World/net/minecraft/world/PlayerUID.cpp +++ b/src/Minecraft.World/net/minecraft/world/PlayerUID.cpp @@ -5,6 +5,20 @@ PlayerUID::PlayerUID(int uid) { memset(this, 0, sizeof(PlayerUID)); } +// name guessed +// NON_MATCHING | score: 3335 (lower is better) +bool PlayerUID::operator==(const PlayerUID& other) const { + if (m_leastSigBits == 0 || other.m_leastSigBits == 0) { + if (m_gap0 != other.m_gap0 || m_mostSigBits != other.m_mostSigBits) + return false; + } else if (m_leastSigBits != other.m_leastSigBits) { + return false; + } + if ((m_byte18 & 2) != (other.m_byte18 & 2)) + return false; + return !(m_byte18 & 2) || ((m_byte18 ^ other.m_byte18) & 12) == 0; +} +// name guessed bool PlayerUID::operator!=(const PlayerUID& other) const { return !(*this == other); } diff --git a/src/Minecraft.World/net/minecraft/world/PlayerUID.h b/src/Minecraft.World/net/minecraft/world/PlayerUID.h index ed3d46dd..171b92e2 100644 --- a/src/Minecraft.World/net/minecraft/world/PlayerUID.h +++ b/src/Minecraft.World/net/minecraft/world/PlayerUID.h @@ -2,6 +2,7 @@ #include "types.h" #include +#include class PlayerUID { public: @@ -17,7 +18,7 @@ class PlayerUID { const std::wstring toString() const; long m_gap0; - long m_mostSigBits; // grabbed from JDK, doubt those are correct but yeah, pure guess - long m_leastSigBits; + long m_mostSigBits; // name guessed: UUID high bits + long m_leastSigBits; // name guessed: UUID low bits char m_byte18; }; diff --git a/src/Minecraft.World/net/minecraft/world/Random.cpp b/src/Minecraft.World/net/minecraft/world/Random.cpp index 0aff1331..a62b8f1e 100644 --- a/src/Minecraft.World/net/minecraft/world/Random.cpp +++ b/src/Minecraft.World/net/minecraft/world/Random.cpp @@ -43,11 +43,11 @@ int Random::nextInt(int a1) { } float Random::nextFloat() { - return this->next(24) * (float)0x33800000; + return this->next(24) * 5.960464477539063e-8f; } double Random::nextDouble() { - return ((static_cast(this->next(26)) << 27) + this->next(27)) * 1.11022302e-16; + return ((static_cast(this->next(26)) << 27) + this->next(27)) * 1.1102230246251565e-16; } int Random::nextInt() { diff --git a/src/Minecraft.World/net/minecraft/world/damagesource/DamageSource.cpp b/src/Minecraft.World/net/minecraft/world/damagesource/DamageSource.cpp index db5e980c..bfd27b8e 100644 --- a/src/Minecraft.World/net/minecraft/world/damagesource/DamageSource.cpp +++ b/src/Minecraft.World/net/minecraft/world/damagesource/DamageSource.cpp @@ -1,9 +1,11 @@ #include "net/minecraft/world/damagesource/DamageSource.h" + +#include "net/minecraft/world/damagesource/EntityDamageSource.h" #include "net/minecraft/world/food/FoodConstants.h" DamageSource::DamageSource(ClientboundChatPacket::EChatPacketMessage unk0, ClientboundChatPacket::EChatPacketMessage unk1) { - this->m_field0xa = false; + this->m_bypassMagic = false; this->m_bypassInvul = false; this->m_bypassArmour = false; this->m_exhaustion = FoodConstants::ExhaustionAttack(); @@ -42,10 +44,81 @@ DamageSource* DamageSource::setMagic() { return this; } +// name guessed +DamageSource* DamageSource::setFire() { + m_isFireSource = true; + return this; +} + +DamageSource* DamageSource::bypassArmour() { + m_bypassArmour = true; + m_exhaustion = 0.0f; + return this; +} + +// name guessed +DamageSource* DamageSource::bypassMagic() { + m_bypassMagic = true; + m_exhaustion = 0.0f; + return this; +} + +// name guessed +DamageSource* DamageSource::bypassInvul() { + m_bypassInvul = true; + return this; +} + +// name guessed +DamageSource* DamageSource::setProjectile() { + m_isProjectile = true; + return this; +} + +// name guessed +DamageSource* DamageSource::setExplosion() { + m_isExplosion = true; + return this; +} + +// name guessed +DamageSource* DamageSource::setScalesWithDifficulty() { + m_scalesWithDifficulty = true; + return this; +} + +// name guessed +bool DamageSource::isBypassArmour() const { + return m_bypassArmour; +} + +// name guessed +bool DamageSource::isBypassMagic() const { + return m_bypassMagic; +} + +// name guessed +bool DamageSource::isMagic() const { + return m_isMagic; +} + +// name guessed +float DamageSource::getExhaustion() const { + return m_exhaustion; +} + +void DamageSource::GetBaseDamageSource() {} + +DamageSource* DamageSource::CreateThorns(std::shared_ptr entity) { + const auto message = ClientboundChatPacket::EChatPacketMessage_PlayerWasKilledTryingToHurtSource; + return (new EntityDamageSource(message, message, entity))->setThorns()->setMagic(); +} + bool DamageSource::isBypassInvul() const { return this->m_bypassInvul; } +// name guessed bool DamageSource::isFire() const { return this->m_isFireSource; } @@ -54,6 +127,7 @@ bool DamageSource::isProjectile() const { return this->m_isProjectile; } +// name guessed bool DamageSource::isExplosion() const { return this->m_isExplosion; } diff --git a/src/Minecraft.World/net/minecraft/world/damagesource/DamageSource.h b/src/Minecraft.World/net/minecraft/world/damagesource/DamageSource.h index e8f73b0a..a80709f1 100644 --- a/src/Minecraft.World/net/minecraft/world/damagesource/DamageSource.h +++ b/src/Minecraft.World/net/minecraft/world/damagesource/DamageSource.h @@ -4,13 +4,21 @@ #include class EntityDamageSource; +// name guessed class DamageSource { public: static DamageSource* BYPASS_ARMOUR; // this name is wrong static DamageSource* IN_FIRE; static DamageSource* WITHER; + static DamageSource* STARVE; + static DamageSource* MAGIC; + static DamageSource* POISON; + static DamageSource* INSTANT_MAGIC; static DamageSource* CreateThorns(std::shared_ptr entity); + static EntityDamageSource* CreateIndirectMagic(std::shared_ptr source, + std::shared_ptr indirectSource, + DamageSource* baseSource); DamageSource(ClientboundChatPacket::EChatPacketMessage, ClientboundChatPacket::EChatPacketMessage); virtual ~DamageSource() = default; @@ -25,16 +33,27 @@ class DamageSource { virtual void GetBaseDamageSource(); DamageSource* setMagic(); + DamageSource* setFire(); + DamageSource* bypassArmour(); + DamageSource* bypassMagic(); + DamageSource* bypassInvul(); + DamageSource* setProjectile(); + DamageSource* setExplosion(); + DamageSource* setScalesWithDifficulty(); + bool isBypassArmour() const; + bool isBypassMagic() const; bool isBypassInvul() const; + bool isMagic() const; bool isFire() const; bool isExplosion() const; bool isProjectile() const; + float getExhaustion() const; protected: bool m_bypassArmour; bool m_bypassInvul; - bool m_field0xa; + bool m_bypassMagic; float m_exhaustion; bool m_isFireSource; bool m_isExplosion; @@ -45,3 +64,5 @@ class DamageSource { ClientboundChatPacket::EChatPacketMessage m_field0x18; ClientboundChatPacket::EChatPacketMessage m_field0x1c; }; + +static_assert(sizeof(DamageSource) == 0x20, "DamageSource Switch layout"); diff --git a/src/Minecraft.World/net/minecraft/world/effect/AbsoptionMobEffect.cpp b/src/Minecraft.World/net/minecraft/world/effect/AbsoptionMobEffect.cpp new file mode 100644 index 00000000..d7ccfd6e --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/effect/AbsoptionMobEffect.cpp @@ -0,0 +1,21 @@ +#include "net/minecraft/world/effect/MobEffectTypes.h" + +// name guessed +void AbsoptionMobEffect::removeAttributeModifiers(const std::shared_ptr& entity, + BaseAttributeMap* attributes, int amplifier) { + entity->setAbsorptionAmount( + entity->getAbsorptionAmount() + - static_cast(static_cast(static_cast(amplifier) * 4 + 4))); + MobEffect::removeAttributeModifiers(entity, attributes, amplifier); +} + +// name guessed +void AbsoptionMobEffect::addAttributeModifiers(const std::shared_ptr& entity, + BaseAttributeMap* attributes, int amplifier) { + entity->setAbsorptionAmount( + entity->getAbsorptionAmount() + + static_cast(static_cast(static_cast(amplifier) * 4 + 4))); + MobEffect::addAttributeModifiers(entity, attributes, amplifier); +} + +AbsoptionMobEffect::AbsoptionMobEffect(bool harmful, eMinecraftColour color) : MobEffect(harmful, color) {} diff --git a/src/Minecraft.World/net/minecraft/world/effect/AttackDamageMobEffect.cpp b/src/Minecraft.World/net/minecraft/world/effect/AttackDamageMobEffect.cpp new file mode 100644 index 00000000..95524fae --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/effect/AttackDamageMobEffect.cpp @@ -0,0 +1,10 @@ +#include "net/minecraft/world/effect/MobEffectTypes.h" + +// name guessed +AttackDamageMobEffect::AttackDamageMobEffect(bool harmful, eMinecraftColour color, double damage) + : MobEffect(harmful, color), m_damage(damage) {} + +// name guessed +double AttackDamageMobEffect::getAttributeModifierValue(int amplifier, AttributeModifier*) { + return static_cast(static_cast(amplifier) + 1) * m_damage; +} diff --git a/src/Minecraft.World/net/minecraft/world/effect/HealthBoostMobEffect.cpp b/src/Minecraft.World/net/minecraft/world/effect/HealthBoostMobEffect.cpp new file mode 100644 index 00000000..4cdd71c1 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/effect/HealthBoostMobEffect.cpp @@ -0,0 +1,14 @@ +#include "net/minecraft/world/effect/MobEffectTypes.h" + +// name guessed +void HealthBoostMobEffect::removeAttributeModifiers(const std::shared_ptr& entity, + BaseAttributeMap* attributes, int amplifier) { + MobEffect::removeAttributeModifiers(entity, attributes, amplifier); + if (entity->getHealth() > entity->getMaxHealth()) { + entity->setHealth(entity->getMaxHealth()); + } +} + +// name guessed +HealthBoostMobEffect::HealthBoostMobEffect(bool harmful, eMinecraftColour color) + : MobEffect(harmful, color) {} diff --git a/src/Minecraft.World/net/minecraft/world/effect/InstantenousMobEffect.cpp b/src/Minecraft.World/net/minecraft/world/effect/InstantenousMobEffect.cpp new file mode 100644 index 00000000..56249c90 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/effect/InstantenousMobEffect.cpp @@ -0,0 +1,15 @@ +#include "net/minecraft/world/effect/MobEffectTypes.h" + +// name guessed +InstantenousMobEffect::InstantenousMobEffect(bool harmful, eMinecraftColour color) + : MobEffect(harmful, color) {} + +// name guessed +bool InstantenousMobEffect::isInstantenous() { + return true; +} + +// name guessed +bool InstantenousMobEffect::isDurationEffectTick(int tick, int) { + return tick > 0; +} diff --git a/src/Minecraft.World/net/minecraft/world/effect/MobEffect.cpp b/src/Minecraft.World/net/minecraft/world/effect/MobEffect.cpp index 332fb06c..a87285ec 100644 --- a/src/Minecraft.World/net/minecraft/world/effect/MobEffect.cpp +++ b/src/Minecraft.World/net/minecraft/world/effect/MobEffect.cpp @@ -1,4 +1,14 @@ #include "net/minecraft/world/effect/MobEffect.h" + +#include "net/minecraft/world/entity/ai/attributes/AttributeModifier.h" + +#include "net/minecraft/world/entity/ai/attributes/AttributeInstance.h" +#include "net/minecraft/world/entity/ai/attributes/BaseAttributeMap.h" + +#include "net/minecraft/world/damagesource/EntityDamageSource.h" +#include "net/minecraft/world/entity/player/Player.h" +#include "net/minecraft/world/food/FoodConstants.h" + #include "net/minecraft/world/effect/MobEffects.h" MobEffect::MobEffect(bool harmful, eMinecraftColour color) { @@ -90,3 +100,121 @@ int MobEffect::getDescriptionId() { eMinecraftColour MobEffect::getColor() const { return m_color; } + +static inline __attribute__((__always_inline__)) int effectAmount(int base, int amplifier) { + // ARM64 masks the variable shift count. + return base << amplifier; +} + +// name guessed +// NON_MATCHING | score: 986 (lower is better) +void MobEffect::applyEffectTick(const std::shared_ptr& entity, int amplifier) { + if (this == MobEffects::REGENERATION) { + if (entity->getHealth() < entity->getMaxHealth()) { + entity->heal(1.0f); + } + } else if (this == MobEffects::POISON) { + if (entity->getHealth() > 1.0f) { + entity->hurt(DamageSource::POISON, 1.0f); + } + } else if (this == MobEffects::WITHER) { + entity->hurt(DamageSource::WITHER, 1.0f); + } else if (this == MobEffects::HUNGER && entity->isType(ePlayer)) { + std::shared_ptr player = std::dynamic_pointer_cast(entity); + const float exhaustion = FoodConstants::ExhaustionMine(); + player->causeFoodExhaustion(static_cast(static_cast(amplifier) + 1) * exhaustion); + } else if (this == MobEffects::SATURATION && entity->isType(ePlayer)) { + if (!entity->m_level->m_isLocal) { + std::shared_ptr player = std::dynamic_pointer_cast(entity); + player->getFoodData()->eat(static_cast(static_cast(amplifier) + 1), 1.0f); + } + } else if ((this == MobEffects::INSTANT_HEALTH && !entity->isInvertedHealAndHarm()) + || (this == MobEffects::INSTANT_DAMAGE && entity->isInvertedHealAndHarm())) { + const int amount = effectAmount(4, amplifier); + entity->heal(static_cast(amount < 0 ? 0 : amount)); + } else if ((this == MobEffects::INSTANT_DAMAGE && !entity->isInvertedHealAndHarm()) + || (this == MobEffects::INSTANT_HEALTH && entity->isInvertedHealAndHarm())) { + entity->hurt(DamageSource::INSTANT_MAGIC, static_cast(effectAmount(6, amplifier))); + } +} + +// name guessed +void MobEffect::applyInstantenousEffect(const std::shared_ptr& source, + const std::shared_ptr& indirectSource, + const std::shared_ptr& target, int amplifier, + double proximity) { + if ((this == MobEffects::INSTANT_HEALTH && !target->isInvertedHealAndHarm()) + || (this == MobEffects::INSTANT_DAMAGE && target->isInvertedHealAndHarm())) { + const float amount = static_cast(effectAmount(4, amplifier) * proximity + 0.5); + target->heal(amount); + } else if ((this == MobEffects::INSTANT_DAMAGE && !target->isInvertedHealAndHarm()) + || (this == MobEffects::INSTANT_HEALTH && target->isInvertedHealAndHarm())) { + const float amount = static_cast(effectAmount(6, amplifier) * proximity + 0.5); + if (!source) { + target->hurt(DamageSource::MAGIC, amount); + } else { + EntityDamageSource* damage + = DamageSource::CreateIndirectMagic(source, indirectSource, DamageSource::INSTANT_MAGIC); + target->hurt(damage, amount); + delete damage; + } + } +} + +MobEffect* MobEffect::addAttributeModifier(Attribute* attribute, eMODIFIER_ID id, double amount, + int operation) { + AttributeModifier* modifier = new AttributeModifier(static_cast(id), amount, operation); + m_attributeModifiers.insert(std::make_pair(attribute, modifier)); + return this; +} + +// name guessed +void MobEffect::removeAttributeModifiers(const std::shared_ptr&, BaseAttributeMap* attributes, + int) { + for (const auto& entry : m_attributeModifiers) { + AttributeInstance* instance = attributes->getInstance(entry.first); + if (instance != nullptr) + instance->removeModifier(entry.second); + } +} + +// name guessed +void MobEffect::addAttributeModifiers(const std::shared_ptr&, BaseAttributeMap* attributes, + int amplifier) { + for (const auto& entry : m_attributeModifiers) { + AttributeInstance* instance = attributes->getInstance(entry.first); + if (instance != nullptr) { + AttributeModifier* modifier = entry.second; + instance->removeModifier(modifier); + instance->addModifier(new AttributeModifier( + modifier->getId(), getAttributeModifierValue(amplifier, modifier), modifier->getOperation())); + } + } +} + +MappedRegistry* MobEffect::REGISTRY; // name guessed +int MobEffect::EFFECT_COUNT; + +// name guessed +MobEffect* MobEffect::byId(int id) { + return REGISTRY->byId(id); +} + +// name guessed +int MobEffect::getId(MobEffect* effect) { + return REGISTRY->getId(effect); +} + +// name guessed +int MobEffect::GetEffectCount() { + return EFFECT_COUNT; +} + +std::unordered_map& MobEffect::getAttributeModifiers() { + return m_attributeModifiers; +} + +double MobEffect::getAttributeModifierValue(int amplifier, AttributeModifier* modifier) { + double amount = modifier->getAmount(); + return static_cast(static_cast(amplifier) + 1) * amount; +} diff --git a/src/Minecraft.World/net/minecraft/world/effect/MobEffect.h b/src/Minecraft.World/net/minecraft/world/effect/MobEffect.h index 04a54411..5fde5bbb 100644 --- a/src/Minecraft.World/net/minecraft/world/effect/MobEffect.h +++ b/src/Minecraft.World/net/minecraft/world/effect/MobEffect.h @@ -1,5 +1,6 @@ #pragma once +#include "net/minecraft/resources/ResourceLocation.h" #include "net/minecraft/world/entity/Entity.h" #include "net/minecraft/world/entity/LivingEntity.h" #include "net/minecraft/world/level/material/MaterialColor.h" @@ -9,7 +10,7 @@ class Attribute; class AttributeModifier; class BaseAttributeMap; -enum class eMODIFIER_ID { Unknown = 0 }; +enum class eMODIFIER_ID : unsigned int { Unknown = 0 }; class MobEffect { public: @@ -42,22 +43,28 @@ class MobEffect { }; virtual void applyEffectTick(const std::shared_ptr&, int); - virtual void applyInstantenousEffect(std::shared_ptr, std::shared_ptr, int, double); + virtual void applyInstantenousEffect(const std::shared_ptr& source, + const std::shared_ptr& indirectSource, + const std::shared_ptr& target, int amplifier, + double proximity); virtual bool isDurationEffectTick(int, int); virtual bool isInstantenous(); virtual double getDurationModifier() const; virtual void setBeneficial(); virtual bool isBeneficial() const; virtual eMinecraftColour getColor() const; - virtual void addAttributeModifier(Attribute*, eMODIFIER_ID, double, int); - virtual void getAttributeModifiers(); - virtual void removeAttributeModifiers(std::shared_ptr, BaseAttributeMap*, int); - virtual void addAttributeModifiers(std::shared_ptr, BaseAttributeMap*, int); - virtual void getAttributeModifierValue(int, AttributeModifier*); + virtual MobEffect* addAttributeModifier(Attribute*, eMODIFIER_ID, double, int); + virtual std::unordered_map& getAttributeModifiers(); + virtual void removeAttributeModifiers(const std::shared_ptr&, BaseAttributeMap*, int); + virtual void addAttributeModifiers(const std::shared_ptr&, BaseAttributeMap*, int); + virtual double getAttributeModifierValue(int, AttributeModifier*); virtual ~MobEffect(); static int getId(MobEffect*); static MobEffect* byId(int id); + static int GetEffectCount(); + static MappedRegistry* REGISTRY; + static int EFFECT_COUNT; MobEffect(bool harmful, eMinecraftColour color); void setIcon(EMobEffectIcon icon); diff --git a/src/Minecraft.World/net/minecraft/world/effect/MobEffectInstance.h b/src/Minecraft.World/net/minecraft/world/effect/MobEffectInstance.h index e19cfbec..b15de3a6 100644 --- a/src/Minecraft.World/net/minecraft/world/effect/MobEffectInstance.h +++ b/src/Minecraft.World/net/minecraft/world/effect/MobEffectInstance.h @@ -1,5 +1,7 @@ #pragma once +#include + #include "types.h" #include diff --git a/src/Minecraft.World/net/minecraft/world/effect/MobEffectTypes.h b/src/Minecraft.World/net/minecraft/world/effect/MobEffectTypes.h new file mode 100644 index 00000000..bb1f2846 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/effect/MobEffectTypes.h @@ -0,0 +1,43 @@ +#pragma once + +#include "net/minecraft/world/effect/MobEffect.h" + +/** Preserve the original subclass vtables as external dependencies while their + * destructors await reconstruction. + */ +class AbsoptionMobEffect : public MobEffect { +public: + AbsoptionMobEffect(bool harmful, eMinecraftColour color); + ~AbsoptionMobEffect() override; + void removeAttributeModifiers(const std::shared_ptr&, BaseAttributeMap*, int) override; + void addAttributeModifiers(const std::shared_ptr&, BaseAttributeMap*, int) override; +}; + +class AttackDamageMobEffect : public MobEffect { +public: + AttackDamageMobEffect(bool harmful, eMinecraftColour color, double damage); + ~AttackDamageMobEffect() override; + double getAttributeModifierValue(int amplifier, AttributeModifier*) override; + + double m_damage; +}; + +class HealthBoostMobEffect : public MobEffect { +public: + HealthBoostMobEffect(bool harmful, eMinecraftColour color); + ~HealthBoostMobEffect() override; + void removeAttributeModifiers(const std::shared_ptr&, BaseAttributeMap*, int) override; +}; + +class InstantenousMobEffect : public MobEffect { +public: + InstantenousMobEffect(bool harmful, eMinecraftColour color); + ~InstantenousMobEffect() override; + bool isInstantenous() override; + bool isDurationEffectTick(int tick, int amplifier) override; +}; + +ASSERT_SIZEOF(AbsoptionMobEffect, 0x50) +ASSERT_SIZEOF(AttackDamageMobEffect, 0x58) +ASSERT_SIZEOF(HealthBoostMobEffect, 0x50) +ASSERT_SIZEOF(InstantenousMobEffect, 0x50) diff --git a/src/Minecraft.World/net/minecraft/world/effect/MobEffects.cpp b/src/Minecraft.World/net/minecraft/world/effect/MobEffects.cpp new file mode 100644 index 00000000..09fcab2d --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/effect/MobEffects.cpp @@ -0,0 +1,66 @@ +#include "net/minecraft/world/effect/MobEffects.h" + +#include "net/minecraft/world/effect/MobEffect.h" + +MobEffect* MobEffects::SPEED; // name guessed +MobEffect* MobEffects::SLOWNESS; +MobEffect* MobEffects::HASTE; +MobEffect* MobEffects::MINING_FATIGUE; // name guessed +MobEffect* MobEffects::STRENGTH; +MobEffect* MobEffects::INSTANT_HEALTH; +MobEffect* MobEffects::INSTANT_DAMAGE; // name guessed +MobEffect* MobEffects::JUMP_BOOST; +MobEffect* MobEffects::NAUSEA; +MobEffect* MobEffects::REGENERATION; // name guessed +MobEffect* MobEffects::RESISTANCE; +MobEffect* MobEffects::FIRE_RESISTANCE; +MobEffect* MobEffects::WATER_BREATHING; // name guessed +MobEffect* MobEffects::INVISIBILITY; +MobEffect* MobEffects::BLINDNESS; +MobEffect* MobEffects::NIGHT_VISION; // name guessed +MobEffect* MobEffects::HUNGER; +MobEffect* MobEffects::WEAKNESS; +MobEffect* MobEffects::POISON; // name guessed +MobEffect* MobEffects::WITHER; +MobEffect* MobEffects::HEALTH_BOOST; +MobEffect* MobEffects::ABSORPTION; // name guessed +MobEffect* MobEffects::SATURATION; +MobEffect* MobEffects::GLOWING; +MobEffect* MobEffects::LEVITATION; +MobEffect* MobEffects::LUCK; // name guessed +MobEffect* MobEffects::UNLUCK; + +// name guessed +MobEffect* MobEffects::get(const std::wstring& name) { + return MobEffect::REGISTRY->get(ResourceLocation(name)); +} + +void MobEffects::staticCtor() { + SPEED = get(L"speed"); + SLOWNESS = get(L"slowness"); + HASTE = get(L"haste"); + MINING_FATIGUE = get(L"mining_fatigue"); + STRENGTH = get(L"strength"); + INSTANT_HEALTH = get(L"instant_health"); + INSTANT_DAMAGE = get(L"instant_damage"); + JUMP_BOOST = get(L"jump_boost"); + NAUSEA = get(L"nausea"); + REGENERATION = get(L"regeneration"); + RESISTANCE = get(L"resistance"); + FIRE_RESISTANCE = get(L"fire_resistance"); + WATER_BREATHING = get(L"water_breathing"); + INVISIBILITY = get(L"invisibility"); + BLINDNESS = get(L"blindness"); + NIGHT_VISION = get(L"night_vision"); + HUNGER = get(L"hunger"); + WEAKNESS = get(L"weakness"); + POISON = get(L"poison"); + WITHER = get(L"wither"); + HEALTH_BOOST = get(L"health_boost"); + ABSORPTION = get(L"absorption"); + SATURATION = get(L"saturation"); + GLOWING = get(L"glowing"); + LEVITATION = get(L"levitation"); + LUCK = get(L"luck"); + UNLUCK = get(L"unluck"); +} diff --git a/src/Minecraft.World/net/minecraft/world/effect/MobEffects.h b/src/Minecraft.World/net/minecraft/world/effect/MobEffects.h index b3680ffd..cc41fbaf 100644 --- a/src/Minecraft.World/net/minecraft/world/effect/MobEffects.h +++ b/src/Minecraft.World/net/minecraft/world/effect/MobEffects.h @@ -1,5 +1,7 @@ #pragma once +#include + class MobEffect; class MobEffects { @@ -33,4 +35,5 @@ class MobEffects { static MobEffect* UNLUCK; static void staticCtor(); + static MobEffect* get(const std::wstring& name); }; diff --git a/src/Minecraft.World/net/minecraft/world/entity/Entity.cpp b/src/Minecraft.World/net/minecraft/world/entity/Entity.cpp index 3d55236d..d0d7f891 100644 --- a/src/Minecraft.World/net/minecraft/world/entity/Entity.cpp +++ b/src/Minecraft.World/net/minecraft/world/entity/Entity.cpp @@ -29,6 +29,35 @@ void Entity::setId(int id) { m_id = id; } +void Entity::setRot(float yRot, float xRot) { + float wrappedYRot = Mth::wrapDegrees(yRot); + float wrappedXRot = Mth::wrapDegrees(xRot); + m_yRot = wrappedYRot; + m_xRot = wrappedXRot; +} + +void Entity::interpolateTurn(float yRot, float xRot) { + m_yRot += yRot * 0.15f; + m_xRot -= xRot * 0.15f; + m_xRot = Mth::clamp(m_xRot, -90.0f, 90.0f); +} + +bool Entity::getSharedFlag(int flag) { + if (!m_entityData) + return false; + return (m_entityData->get(qword_7101789FA0) & (1 << flag)) != 0; +} + +void Entity::setSharedFlag(int flag, bool value) { + if (m_entityData) { + int flags = m_entityData->get(qword_7101789FA0); + if (value) + m_entityData->set(qword_7101789FA0, flags | (1 << flag), true); + else + m_entityData->set(qword_7101789FA0, flags & ~(1 << flag), true); + } +} + void Entity::staticCtor() { // TODO: Find names for these based on the places they are used qword_7101789FA0 = SynchedEntityData::defineId(eSerializer, eSerializer, @@ -51,7 +80,7 @@ void Entity::staticCtor() { EntityDataSerializers::sBOOLEAN_EntityDataSerializer); } -// NON_MATCHING: a couple things need to be moved around to move instructions into the right place +// NON_MATCHING | score: 330 (lower is better) void Entity::_init(bool synched, Level* level) { if (synched && TlsGetValue(sTlsIndex)) { m_id = getSmallId(); @@ -329,12 +358,21 @@ void Entity::playSound(const SoundEvent* sound, float volume, float pitch) { } } -/* SynchedEntityData crap -bool Entity::isSilent() {} -void Entity::setSilent(bool) {} -void Entity::isNoGravity() {} -void Entity::setNoGravity(bool) {} -*/ +bool Entity::isSilent() { + return m_entityData->get(qword_7101789FC0); +} + +void Entity::setSilent(bool value) { + m_entityData->set(qword_7101789FC0, value, true); +} + +bool Entity::isNoGravity() { + return m_entityData->get(qword_7101789FC8); +} + +void Entity::setNoGravity(bool value) { + m_entityData->set(qword_7101789FC8, value, true); +} bool Entity::makeStepSound() { return true; @@ -364,6 +402,35 @@ void Entity::burn(int howMuch) { this->hurt(DamageSource::IN_FIRE, howMuch); } +bool Entity::isInWater() { + return m_wasInWater; +} + +void Entity::push(double x, double y, double z) { + m_deltaMovementX += x; + m_deltaMovementY += y; + m_deltaMovementZ += z; + m_hasImpulse = true; +} + +void Entity::markHurt() { + m_isHurtMarked = true; +} + +Vec3* Entity::calculateViewVector(float xRot, float yRot) { + const float* degreesToRadiansAddress = &sDegreesToRadians; +#ifdef MATCHING_HACK + // Prevent constant folding of the original global load after TU consolidation. + asm("" : "+r"(degreesToRadiansAddress)); +#endif + const float degreesToRadians = *degreesToRadiansAddress; + float yCos = Mth::cos(-Mth::PI - degreesToRadians * yRot); + float ySin = Mth::sin(-Mth::PI - degreesToRadians * yRot); + float xCos = -Mth::cos(-degreesToRadians * xRot); + float xSin = Mth::sin(-degreesToRadians * xRot); + return Vec3::newTemp(ySin * xCos, xSin, yCos * xCos); +} + Vec3* Entity::getViewVector(float partialTicks) { if (partialTicks == 1.0f) { return this->calculateViewVector(this->m_xRot, this->m_yRot); @@ -372,6 +439,98 @@ Vec3* Entity::getViewVector(float partialTicks) { this->m_yRotO + ((this->m_yRot - this->m_yRotO) * partialTicks)); } } + +bool Entity::isAlive() { + return !m_isRemoved; +} + +void Entity::lerpTo(double x, double y, double z, float yRot, float xRot, int, bool) { + setPos(x, y, z); + setRot(yRot, xRot); +} + +void Entity::lerpMotion(double x, double y, double z) { + m_deltaMovementX = x; + m_deltaMovementY = y; + m_deltaMovementZ = z; +} + +bool Entity::isOnFire() { + bool isServer = !m_level || !m_level->m_isLocal; + return !m_isImmuneToFire && (m_remainingFireTicks > 0 || (!isServer && getSharedFlag(0))); +} + +bool Entity::isPassenger() { + return m_vehicle != nullptr; +} + +bool Entity::isSneaking() { + return getSharedFlag(1); +} + +void Entity::setSneaking(bool value) { + setSharedFlag(1, value); +} + +bool Entity::isIdle() { + return getSharedFlag(6); +} + +void Entity::setIsIdle(bool value) { + setSharedFlag(6, value); +} + +bool Entity::isSprinting() { + return getSharedFlag(3); +} + +void Entity::setSprinting(bool value) { + setSharedFlag(3, value); +} + +bool Entity::isGlowing() { + return m_isGlowing || (m_level->m_isLocal && getSharedFlag(8)); +} + +void Entity::setGlowing(bool value) { + m_isGlowing = value; + if (!m_level->m_isLocal) + setSharedFlag(8, value); +} + +bool Entity::isInvisible() { + return getSharedFlag(5); +} + +void Entity::setInvisible(bool value) { + setSharedFlag(5, value); +} + +Vec3* Entity::getPos(float partialTicks) { + if (partialTicks >= 1.0f) + return Vec3::newTemp(m_x, m_y, m_z); + return Vec3::newTemp(m_xo + (m_x - m_xo) * partialTicks, m_yo + (m_y - m_yo) * partialTicks, + m_zo + (m_z - m_zo) * partialTicks); +} + +void Entity::makeStuckInWeb() { + m_isInWeb = true; + m_fallDistance = 0.0f; + m_fallTicks = 0; + ++m_hardLandingsCount; +} + +void Entity::stopCurrentLerp() { + m_xOld = m_x; + m_yOld = m_y; + m_zOld = m_z; + m_xo = m_x; + m_yo = m_y; + m_zo = m_z; + m_yRotO = m_yRot; + m_xRotO = m_xRot; +} + void Entity::readAdditionContructionTag(CompoundTag*) {} void Entity::SetPositionLocked(bool) {} void Entity::SetGlideCollisionDamage(bool) {} @@ -379,3 +538,7 @@ void Entity::SetLiftForceModifier(double) {} void Entity::onLoadedFromSave() {} void Entity::setUsingItemFlag(bool) {} void Entity::fjDebugCheckSmallIdLeaks() {} + +// name guessed: radians-per-degree constant at 0x7100e093d8. + +const float Entity::sDegreesToRadians = 0.017453292f; diff --git a/src/Minecraft.World/net/minecraft/world/entity/Entity.h b/src/Minecraft.World/net/minecraft/world/entity/Entity.h index ea148673..ca4b710f 100644 --- a/src/Minecraft.World/net/minecraft/world/entity/Entity.h +++ b/src/Minecraft.World/net/minecraft/world/entity/Entity.h @@ -59,6 +59,7 @@ class Entity : public std::enable_shared_from_this, public CommandSender static int sEntityAmount; static int sTlsIndex; static double sViewScale; + static const float sDegreesToRadians; static void staticCtor(); static int getSmallId(); @@ -294,6 +295,9 @@ class Entity : public std::enable_shared_from_this, public CommandSender Vec3* getPos(float); bool isType(eINSTANCEOF); + void setRot(float, float); + void interpolateTurn(float, float); + bool getSharedFlag(int); void setSharedFlag(int, bool); Vec3* calculateViewVector(float, float); int getId(); diff --git a/src/Minecraft.World/net/minecraft/world/entity/EntityIO.cpp b/src/Minecraft.World/net/minecraft/world/entity/EntityIO.cpp new file mode 100644 index 00000000..321bdab8 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/entity/EntityIO.cpp @@ -0,0 +1,220 @@ +#include "net/minecraft/world/entity/EntityIO.h" + +#include "net/minecraft/client/ui/StringIDs.h" +#include "net/minecraft/world/entity/EntityIOFactories.h" +#include "net/minecraft/world/entity/mob/MinecartType.h" + +std::unordered_map EntityIO::SPAWN_EGGS; // name guessed +ResourceLocation EntityIO::DEFAULT_TYPE(L"LightningBolt"); +std::unordered_set EntityIO::KNOWN_TYPES; + +void EntityIO::bootStrap() { + registerEntity(EntityIOFactories::createItem, 1, L"item", static_cast(0x0800000a), L"Item"); + registerEntity(EntityIOFactories::createXpOrb, 2, L"xp_orb", static_cast(0x08000003), + L"XPOrb"); + registerEntity(EntityIOFactories::createAreaEffectCloud, 3, L"area_effect_cloud", + static_cast(0x0800000f), L"AreaEffectCloud"); + registerEntity(EntityIOFactories::createElderGuardian, 4, L"elder_guardian", + static_cast(0x5d544001), L"ElderGuardian"); + registerEntity(EntityIOFactories::createWitherSkeleton, 5, L"wither_skeleton", + static_cast(0x5d540402), L"WitherSkeleton"); + registerEntity(EntityIOFactories::createStray, 6, L"stray", static_cast(0x5d540403), + L"Stray"); + registerEntity(EntityIOFactories::createEgg, 7, L"egg", static_cast(0x8a200002), + L"ThrownEgg"); + registerEntity(EntityIOFactories::createLeashKnot, 8, L"leash_knot", static_cast(0x0a080003), + L"LeashKnot"); + registerEntity(EntityIOFactories::createPainting, 9, L"painting", static_cast(0x0a080001), + L"Painting"); + registerEntity(EntityIOFactories::createArrow, 10, L"arrow", static_cast(0x8a020002), + L"Arrow"); + registerEntity(EntityIOFactories::createSnowball, 11, L"snowball", static_cast(0x8a200001), + L"Snowball"); + registerEntity(EntityIOFactories::createFireball, 12, L"fireball", static_cast(0x8a400003), + L"Fireball"); + registerEntity(EntityIOFactories::createSmallFireball, 13, L"small_fireball", + static_cast(0x8a400004), L"SmallFireball"); + registerEntity(EntityIOFactories::createEnderPearl, 14, L"ender_pearl", + static_cast(0x8a200003), L"ThrownEnderpearl"); + registerEntity(EntityIOFactories::createEyeOfEnderSignal, 15, L"eye_of_ender_signal", + static_cast(0x88000004), L"EyeOfEnderSignal"); + registerEntity(EntityIOFactories::createPotion, 16, L"potion", static_cast(0x8a200004), + L"ThrownPotion"); + registerEntity(EntityIOFactories::createXpBottle, 17, L"xp_bottle", static_cast(0x8a200005), + L"ThrownExpBottle"); + registerEntity(EntityIOFactories::createItemFrame, 18, L"item_frame", + static_cast(0x0a080002), L"ItemFrame"); + registerEntity(EntityIOFactories::createWitherSkull, 19, L"wither_skull", + static_cast(0x8a400002), L"WitherSkull"); + registerEntity(EntityIOFactories::createTnt, 20, L"tnt", static_cast(0x0800000b), + L"PrimedTnt"); + registerEntity(EntityIOFactories::createFallingBlock, 21, L"falling_block", + static_cast(0x08000009), L"FallingSand"); + registerEntity(EntityIOFactories::createFireworksRocket, 22, L"fireworks_rocket", + static_cast(0x88000005), L"FireworksRocketEntity"); + registerEntity(EntityIOFactories::createHusk, 23, L"husk", static_cast(0x5d550003), L"Husk"); + registerEntity(EntityIOFactories::createSpectralArrow, 24, L"spectral_arrow", + static_cast(0x8a020001), L"SpectralArrow"); + registerEntity(EntityIOFactories::createShulkerBullet, 25, L"shulker_bullet", + static_cast(0x08000010), L"ShulkerBullet"); + registerEntity(EntityIOFactories::createDragonFireball, 26, L"dragon_fireball", + static_cast(0x8a400001), L"DragonFireball"); + registerEntity(EntityIOFactories::createZombieVillager, 27, L"zombie_villager", + static_cast(0x5d550002), L"ZombieVillager"); + registerEntity(EntityIOFactories::createSkeletonHorse, 28, L"skeleton_horse", + static_cast(0x2d690002), L"SkeletonHorse"); + registerEntity(EntityIOFactories::createZombieHorse, 29, L"zombie_horse", + static_cast(0x2d690003), L"ZombieHorse"); + registerEntity(EntityIOFactories::createArmorStand, 30, L"armor_stand", + static_cast(0x0c000001), L"ArmorStand"); + registerEntity(EntityIOFactories::createDonkey, 31, L"donkey", static_cast(0x2d698001), + L"Donkey"); + registerEntity(EntityIOFactories::createMule, 32, L"mule", static_cast(0x2d698002), L"Mule"); + registerEntity(EntityIOFactories::createEvocationFangs, 33, L"evocation_fangs", + static_cast(0x08000011), L"EvocationFangs"); + registerEntity(EntityIOFactories::createEvocationIllager, 34, L"evocation_illager", + static_cast(0x5d541801), L"EvocationIllager"); + registerEntity(EntityIOFactories::createVex, 35, L"vex", static_cast(0x5d540008), L"Vex"); + registerEntity(EntityIOFactories::createVindicationIllager, 36, L"vindication_illager", + static_cast(0x5d541001), L"VindicationIllager"); + registerEntity(EntityIOFactories::createIllusionIllager, 37, L"illusion_illager", + static_cast(0x5d541802), L"IllusionIllager"); + registerEntity(EntityIOFactories::createBoat, 41, L"boat", static_cast(0x08000008), L"Boat"); + registerEntity(EntityIOFactories::createMinecart, 42, L"minecart", static_cast(0x0a800001), + MinecartType::RIDEABLE->getName()); + registerEntity(EntityIOFactories::createChestMinecart, 43, L"chest_minecart", + static_cast(0x0a840002), MinecartType::CHEST->getName()); + registerEntity(EntityIOFactories::createFurnaceMinecart, 44, L"furnace_minecart", + static_cast(0x0a800003), MinecartType::FURNACE->getName()); + registerEntity(EntityIOFactories::createTntMinecart, 45, L"tnt_minecart", + static_cast(0x0a800004), MinecartType::TNT->getName()); + registerEntity(EntityIOFactories::createHopperMinecart, 46, L"hopper_minecart", + static_cast(0x0a840005), MinecartType::HOPPER->getName()); + registerEntity(EntityIOFactories::createSpawnerMinecart, 47, L"spawner_minecart", + static_cast(0x0a800006), MinecartType::SPAWNER->getName()); + registerEntity(EntityIOFactories::createCreeper, 50, L"creeper", static_cast(0x5d540001), + L"Creeper"); + registerEntity(EntityIOFactories::createSkeleton, 51, L"skeleton", static_cast(0x5d540401), + L"Skeleton"); + registerEntity(EntityIOFactories::createSpider, 52, L"spider", static_cast(0x5d560000), + L"Spider"); + registerEntity(EntityIOFactories::createGiant, 53, L"giant", static_cast(0x5d540002), + L"Giant"); + registerEntity(EntityIOFactories::createZombie, 54, L"zombie", static_cast(0x5d550000), + L"Zombie"); + registerEntity(EntityIOFactories::createSlime, 55, L"slime", static_cast(0x5d108000), + L"Slime"); + registerEntity(EntityIOFactories::createGhast, 56, L"ghast", static_cast(0x5d001001), + L"Ghast"); + registerEntity(EntityIOFactories::createZombiePigman, 57, L"zombie_pigman", + static_cast(0x5d550001), L"PigZombie"); + registerEntity(EntityIOFactories::createEnderman, 58, L"enderman", static_cast(0x5d540003), + L"Enderman"); + registerEntity(EntityIOFactories::createCaveSpider, 59, L"cave_spider", + static_cast(0x5d560001), L"CaveSpider"); + registerEntity(EntityIOFactories::createSilverfish, 60, L"silverfish", + static_cast(0x5d540004), L"Silverfish"); + registerEntity(EntityIOFactories::createBlaze, 61, L"blaze", static_cast(0x5d540005), + L"Blaze"); + registerEntity(EntityIOFactories::createMagmaCube, 62, L"magma_cube", + static_cast(0x5d108001), L"LavaSlime"); + registerEntity(EntityIOFactories::createEnderDragon, 63, L"ender_dragon", + static_cast(0x0d000005), L"EnderDragon"); + registerEntity(EntityIOFactories::createWither, 64, L"wither", static_cast(0x5d540007), + L"WitherBoss"); + registerEntity(EntityIOFactories::createBat, 65, L"bat", static_cast(0x1d004001), L"Bat"); + registerEntity(EntityIOFactories::createWitch, 66, L"witch", static_cast(0x5d540006), + L"Witch"); + registerEntity(EntityIOFactories::createEndermite, 67, L"endermite", static_cast(0x4d54000b), + L"Endermite"); + registerEntity(EntityIOFactories::createGuardian, 68, L"guardian", static_cast(0x5d544000), + L"Guardian"); + registerEntity(EntityIOFactories::createShulker, 69, L"shulker", static_cast(0x4d580003), + L"Shulker"); + registerEntity(EntityIOFactories::createPig, 90, L"pig", static_cast(0x2d680003), L"Pig"); + registerEntity(EntityIOFactories::createSheep, 91, L"sheep", static_cast(0x2d680002), + L"Sheep"); + registerEntity(EntityIOFactories::createCow, 92, L"cow", static_cast(0x2d6a0000), L"Cow"); + registerEntity(EntityIOFactories::createChicken, 93, L"chicken", static_cast(0x0d680004), + L"Chicken"); + registerEntity(EntityIOFactories::createSquid, 94, L"squid", static_cast(0x0d102001), + L"Squid"); + registerEntity(EntityIOFactories::createWolf, 95, L"wolf", static_cast(0x0d6c0002), L"Wolf"); + registerEntity(EntityIOFactories::createMooshroom, 96, L"mooshroom", static_cast(0x2d6a0001), + L"MushroomCow"); + registerEntity(EntityIOFactories::createSnowman, 97, L"snowman", static_cast(0x2d580001), + L"SnowMan"); + registerEntity(EntityIOFactories::createOcelot, 98, L"ocelot", static_cast(0x2d6c0001), + L"Ozelot"); + registerEntity(EntityIOFactories::createVillagerGolem, 99, L"villager_golem", + static_cast(0x0d580002), L"VillagerGolem"); + registerEntity(EntityIOFactories::createHorse, 100, L"horse", static_cast(0x2d690001), + L"Horse"); + registerEntity(EntityIOFactories::createRabbit, 101, L"rabbit", static_cast(0x2d680005), + L"Rabbit"); + registerEntity(EntityIOFactories::createPolarBear, 102, L"polar_bear", + static_cast(0x2d680006), L"PolarBear"); + registerEntity(EntityIOFactories::createLlama, 103, L"llama", static_cast(0x2d698003), + L"Llama"); + registerEntity(EntityIOFactories::createLlamaSpit, 104, L"llama_spit", + static_cast(0x88000012), L"LlamaSpit"); + registerEntity(EntityIOFactories::createParrot, 105, L"parrot", static_cast(0x2d6c0003), + L"Parrot"); + registerEntity(EntityIOFactories::createVillager, 120, L"villager", static_cast(0x0d600001), + L"Villager"); + registerEntity(EntityIOFactories::createEnderCrystal, 200, L"ender_crystal", + static_cast(0x0800000e), L"EnderCrystal"); + + registerEgg(StringIDs::Bat, L"bat", 323, 324); + registerEgg(StringIDs::Blaze, L"blaze", 301, 302); + registerEgg(StringIDs::CaveSpider, L"cave_spider", 297, 298); + registerEgg(StringIDs::Chicken, L"chicken", 311, 312); + registerEgg(StringIDs::Cow, L"cow", 309, 310); + registerEgg(StringIDs::Creeper, L"creeper", 281, 282); + registerEgg(StringIDs::Donkey, L"donkey", 345, 346); + registerEgg(StringIDs::ElderGuardian, L"elder_guardian", 339, 340); + registerEgg(StringIDs::Enderman, L"enderman", 295, 296); + registerEgg(StringIDs::Endermite, L"endermite", 329, 330); + registerEgg(StringIDs::Evoker, L"evocation_illager", 341, 342); + registerEgg(StringIDs::Ghast, L"ghast", 291, 292); + registerEgg(StringIDs::Guardian, L"guardian", 331, 332); + registerEgg(StringIDs::Horse_1, L"horse", 327, 328); + registerEgg(StringIDs::Husk, L"husk", 355, 356); + registerEgg(StringIDs::Llama, L"llama", 343, 344); + registerEgg(StringIDs::MagmaCube, L"magma_cube", 303, 304); + registerEgg(StringIDs::Mooshroom, L"mooshroom", 317, 318); + registerEgg(StringIDs::Mule, L"mule", 351, 352); + registerEgg(StringIDs::Ocelot, L"ocelot", 319, 320); + registerEgg(StringIDs::Parrot, L"parrot", 363, 364); + registerEgg(StringIDs::Pig, L"pig", 305, 306); + registerEgg(StringIDs::PolarBear, L"polar_bear", 335, 336); + registerEgg(StringIDs::Rabbit, L"rabbit", 333, 334); + registerEgg(StringIDs::Sheep, L"sheep", 307, 308); + registerEgg(StringIDs::Shulker, L"shulker", 337, 338); + registerEgg(StringIDs::Silverfish, L"silverfish", 299, 300); + registerEgg(StringIDs::Skeleton, L"skeleton", 283, 284); + registerEgg(StringIDs::SkeletonHorse, L"skeleton_horse", 347, 348); + registerEgg(StringIDs::Slime, L"slime", 289, 290); + registerEgg(StringIDs::Spider, L"spider", 285, 286); + registerEgg(StringIDs::Squid, L"squid", 313, 314); + registerEgg(StringIDs::Stray, L"stray", 353, 354); + registerEgg(StringIDs::Vex, L"vex", 357, 358); + registerEgg(StringIDs::Villager, L"villager", 321, 322); + registerEgg(StringIDs::Vindicator, L"vindication_illager", 359, 360); + registerEgg(StringIDs::Witch_1, L"witch", 325, 326); + registerEgg(StringIDs::WitherSkeleton, L"wither_skeleton", 365, 366); + registerEgg(StringIDs::Wolf, L"wolf", 315, 316); + registerEgg(StringIDs::Zombie, L"zombie", 287, 288); + registerEgg(StringIDs::ZombieHorse, L"zombie_horse", 349, 350); + registerEgg(StringIDs::ZombiePigman, L"zombie_pigman", 293, 294); + registerEgg(StringIDs::ZombieVillager, L"zombie_villager", 361, 362); + KNOWN_TYPES.insert(DEFAULT_TYPE); +} + +// name guessed +EntityIO::SpawnEggInfo EntityIO::registerEgg(std::uint32_t hash, const std::wstring name, int primaryColor, + int secondaryColor) { + ResourceLocation key(name); + SPAWN_EGGS[key] = new SpawnEggInfo(hash, key, primaryColor, secondaryColor); + return *SPAWN_EGGS[key]; +} diff --git a/src/Minecraft.World/net/minecraft/world/entity/EntityIO.h b/src/Minecraft.World/net/minecraft/world/entity/EntityIO.h index c4be2406..100931e8 100644 --- a/src/Minecraft.World/net/minecraft/world/entity/EntityIO.h +++ b/src/Minecraft.World/net/minecraft/world/entity/EntityIO.h @@ -1,6 +1,48 @@ #pragma once +#include "net/minecraft/resources/ResourceLocation.h" +#include +#include +#include +#include + +class Entity; +class Level; + class EntityIO { public: + struct SpawnEggInfo { + SpawnEggInfo(std::uint32_t, const ResourceLocation&, int, int); + SpawnEggInfo(const SpawnEggInfo&); + ~SpawnEggInfo(); + + std::uint32_t hash; + ResourceLocation key; + union { + std::uint64_t colors; + struct { + int primaryColor; + int secondaryColor; + }; + }; + std::uint64_t unknown96; + std::uint64_t unknown104; + }; + static void bootStrap(); + static ResourceLocation getKey(eINSTANCEOF); + static void registerEntity(Entity* (*)(Level*), int, const std::wstring&, eINSTANCEOF, + const std::wstring&); + static SpawnEggInfo registerEgg(std::uint32_t, const std::wstring, int, int); + + static std::unordered_map SPAWN_EGGS; + static ResourceLocation DEFAULT_TYPE; + static std::unordered_set KNOWN_TYPES; }; + +#ifdef SAFETY_CHECKS +static_assert(sizeof(EntityIO::SpawnEggInfo) == 112, "Spawn egg metadata layout"); +static_assert(offsetof(EntityIO::SpawnEggInfo, key) == 8, "Spawn egg resource key"); +static_assert(offsetof(EntityIO::SpawnEggInfo, colors) == 88, "Spawn egg colors"); +static_assert(offsetof(EntityIO::SpawnEggInfo, unknown104) == 104, "Spawn egg tail"); +#endif diff --git a/src/Minecraft.World/net/minecraft/world/entity/EntityIOFactories.h b/src/Minecraft.World/net/minecraft/world/entity/EntityIOFactories.h new file mode 100644 index 00000000..e5ae381a --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/entity/EntityIOFactories.h @@ -0,0 +1,91 @@ +#pragma once + +class Entity; +class Level; + +/** Factory entry points referenced by EntityIO::bootStrap; definitions remain external. */ +// name guessed: callback names describe their returned entity types. +namespace EntityIOFactories { +Entity* createItem(Level*); +Entity* createXpOrb(Level*); +Entity* createAreaEffectCloud(Level*); +Entity* createElderGuardian(Level*); +Entity* createWitherSkeleton(Level*); +Entity* createStray(Level*); +Entity* createEgg(Level*); +Entity* createLeashKnot(Level*); +Entity* createPainting(Level*); +Entity* createArrow(Level*); +Entity* createSnowball(Level*); +Entity* createFireball(Level*); +Entity* createSmallFireball(Level*); +Entity* createEnderPearl(Level*); +Entity* createEyeOfEnderSignal(Level*); +Entity* createPotion(Level*); +Entity* createXpBottle(Level*); +Entity* createItemFrame(Level*); +Entity* createWitherSkull(Level*); +Entity* createTnt(Level*); +Entity* createFallingBlock(Level*); +Entity* createFireworksRocket(Level*); +Entity* createHusk(Level*); +Entity* createSpectralArrow(Level*); +Entity* createShulkerBullet(Level*); +Entity* createDragonFireball(Level*); +Entity* createZombieVillager(Level*); +Entity* createSkeletonHorse(Level*); +Entity* createZombieHorse(Level*); +Entity* createArmorStand(Level*); +Entity* createDonkey(Level*); +Entity* createMule(Level*); +Entity* createEvocationFangs(Level*); +Entity* createEvocationIllager(Level*); +Entity* createVex(Level*); +Entity* createVindicationIllager(Level*); +Entity* createIllusionIllager(Level*); +Entity* createBoat(Level*); +Entity* createMinecart(Level*); +Entity* createChestMinecart(Level*); +Entity* createFurnaceMinecart(Level*); +Entity* createTntMinecart(Level*); +Entity* createHopperMinecart(Level*); +Entity* createSpawnerMinecart(Level*); +Entity* createCreeper(Level*); +Entity* createSkeleton(Level*); +Entity* createSpider(Level*); +Entity* createGiant(Level*); +Entity* createZombie(Level*); +Entity* createSlime(Level*); +Entity* createGhast(Level*); +Entity* createZombiePigman(Level*); +Entity* createEnderman(Level*); +Entity* createCaveSpider(Level*); +Entity* createSilverfish(Level*); +Entity* createBlaze(Level*); +Entity* createMagmaCube(Level*); +Entity* createEnderDragon(Level*); +Entity* createWither(Level*); +Entity* createBat(Level*); +Entity* createWitch(Level*); +Entity* createEndermite(Level*); +Entity* createGuardian(Level*); +Entity* createShulker(Level*); +Entity* createPig(Level*); +Entity* createSheep(Level*); +Entity* createCow(Level*); +Entity* createChicken(Level*); +Entity* createSquid(Level*); +Entity* createWolf(Level*); +Entity* createMooshroom(Level*); +Entity* createSnowman(Level*); +Entity* createOcelot(Level*); +Entity* createVillagerGolem(Level*); +Entity* createHorse(Level*); +Entity* createRabbit(Level*); +Entity* createPolarBear(Level*); +Entity* createLlama(Level*); +Entity* createLlamaSpit(Level*); +Entity* createParrot(Level*); +Entity* createVillager(Level*); +Entity* createEnderCrystal(Level*); +} // namespace EntityIOFactories diff --git a/src/Minecraft.World/net/minecraft/world/entity/LivingEntity.cpp b/src/Minecraft.World/net/minecraft/world/entity/LivingEntity.cpp index 0a9849aa..3019947b 100644 --- a/src/Minecraft.World/net/minecraft/world/entity/LivingEntity.cpp +++ b/src/Minecraft.World/net/minecraft/world/entity/LivingEntity.cpp @@ -34,6 +34,71 @@ eINSTANCEOF LivingEntity::GetType() { return eLivingEntity; } + +int LivingEntity::getUseItemRemainingTicks() { + return m_useItemRemaining; +} + +void LivingEntity::jumpInWater() { + m_deltaMovementY += 0.04f; +} + +void LivingEntity::jumpInLava() { + m_deltaMovementY += 0.04f; +} + +float LivingEntity::getWaterSlowDown() { + return 0.8f; +} + +float LivingEntity::getSpeed() { + return m_speed; +} + +void LivingEntity::setSpeed(float speed) { + m_speed = speed; +} + +void LivingEntity::setJumping(bool jumping) { + m_isJumping = jumping; +} + +void LivingEntity::lerpTo(double x, double y, double z, float yRot, float xRot, int steps, bool) { + m_lerpX = x; + m_lerpY = y; + m_lerpZ = z; + m_lerpYRot = yRot; + m_lerpXRot = xRot; + m_lerpSteps = steps; +} + +Vec3* LivingEntity::getViewVector(float partialTicks) { + if (partialTicks == 1.0f) + return calculateViewVector(m_xRot, m_yHeadRot); + return calculateViewVector(m_xRotO + (m_xRot - m_xRotO) * partialTicks, + m_yHeadRotO + (m_yHeadRot - m_yHeadRotO) * partialTicks); +} + +bool LivingEntity::isEffectiveAi() { + return !m_level->m_isLocal; +} + +void LivingEntity::setYHeadRot(float yRot) { + m_yHeadRot = yRot; +} + +void LivingEntity::setYBodyRot(float yRot) { + m_yBodyRot = yRot; +} + +void LivingEntity::stopCurrentLerp() { + Entity::stopCurrentLerp(); + m_yBodyRotO = m_yBodyRot; + m_animationSpeedOld = 0.0f; + m_animationSpeed = 0.0f; + m_yHeadRotO = m_yHeadRot; +} + void LivingEntity::setBoundingBox(AABB* box) { const int newMinX = Mth::floor(box->m_inX); const int newMaxX = Mth::floor(box->m_axX); @@ -68,7 +133,7 @@ void LivingEntity::dropDeathLoot(bool, int) {} void LivingEntity::hurtArmor(float) {} void LivingEntity::hurtCurrentlyUsedShield(float) {} -// NON_MATCHING: a lot of stuff +// NON_MATCHING | score: 17402 (lower is better) void LivingEntity::travel(float x, float y, float z) { Player* player = this->isType(ePlayer) ? (Player*)this : nullptr; if (this->PositionLocked()) { @@ -294,7 +359,7 @@ not_null_ptr LivingEntity::getUseItem() { return this->m_useItem; } -// NON_MATCHING: Various issues, https://decomp.me/scratch/bm1rV +// NON_MATCHING | score: 7043 (lower is better) void LivingEntity::CheckThermalAreas() { SetLiftForceModifier(1.0); diff --git a/src/Minecraft.World/net/minecraft/world/entity/LivingEntity.h b/src/Minecraft.World/net/minecraft/world/entity/LivingEntity.h index 8d0cc489..40919228 100644 --- a/src/Minecraft.World/net/minecraft/world/entity/LivingEntity.h +++ b/src/Minecraft.World/net/minecraft/world/entity/LivingEntity.h @@ -18,6 +18,7 @@ class CombatTracker; class ThermalAreaRuleDefinition; class HumanoidArm; +// NON_MATCHING | score: 4326 (lower is better) class LivingEntity : public Entity { public: LivingEntity(Level* level); @@ -93,7 +94,7 @@ class LivingEntity : public Entity { virtual void onEffectUpdated(MobEffectInstance*, bool); virtual void onEffectRemoved(MobEffectInstance*); virtual void heal(float); - virtual void getHealth(); + virtual float getHealth(); virtual void setHealth(float); virtual void getLastDamageSource(); virtual void blockUsingShield(const std::shared_ptr&); @@ -119,7 +120,7 @@ class LivingEntity : public Entity { virtual void actuallyHurt(DamageSource, float); virtual void getCombatTracker(); virtual void getKillCredit(); - virtual void getMaxHealth(); + virtual float getMaxHealth(); virtual void getArrowCount(); virtual void setArrowCount(int); virtual void swing(InteractionHand::EInteractionHand); diff --git a/src/Minecraft.World/net/minecraft/world/entity/SpawnEggInfo.cpp b/src/Minecraft.World/net/minecraft/world/entity/SpawnEggInfo.cpp new file mode 100644 index 00000000..57e33ea9 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/entity/SpawnEggInfo.cpp @@ -0,0 +1,22 @@ +#include "net/minecraft/world/entity/EntityIO.h" + +// name guessed +EntityIO::SpawnEggInfo::SpawnEggInfo(std::uint32_t value, const ResourceLocation& name, int primary, + int secondary) { + hash = value; + key = ResourceLocation(name); + primaryColor = primary; + secondaryColor = secondary; + unknown96 = 0; + unknown104 = 0; +} + +// name guessed +EntityIO::SpawnEggInfo::SpawnEggInfo(const SpawnEggInfo& other) : hash(other.hash), key(other.key) { + unknown104 = other.unknown104; + unknown96 = other.unknown96; + colors = other.colors; +} + +// name guessed +EntityIO::SpawnEggInfo::~SpawnEggInfo() {} diff --git a/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/Attribute.cpp b/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/Attribute.cpp new file mode 100644 index 00000000..dec4af62 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/Attribute.cpp @@ -0,0 +1,44 @@ +#include "net/minecraft/world/entity/ai/attributes/Attribute.h" + +#include "net/minecraft/util/Mth.h" + +// name guessed +Attribute::Attribute() = default; + +// name guessed +BaseAttribute::BaseAttribute(Attribute* parent, eATTRIBUTE_ID id, double defaultValue) + : m_parent(parent), m_id(id), m_defaultValue(defaultValue), m_syncable(false) {} + +// name guessed +int BaseAttribute::getId() { + return m_id; +} + +// name guessed +double BaseAttribute::getDefaultValue() { + return m_defaultValue; +} + +// name guessed +bool BaseAttribute::isClientSyncable() { + return m_syncable; +} + +// name guessed +Attribute* BaseAttribute::getParentAttribute() { + return m_parent; +} + +// name guessed +void BaseAttribute::setSyncable(bool syncable) { + m_syncable = syncable; +} + +RangedAttribute::RangedAttribute(Attribute* parent, eATTRIBUTE_ID id, double defaultValue, double minValue, + double maxValue) + : BaseAttribute(parent, id, defaultValue), m_minValue(minValue), m_maxValue(maxValue) {} + +// name guessed +double RangedAttribute::sanitizeValue(double value) { + return Mth::clamp(value, m_minValue, m_maxValue); +} diff --git a/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/Attribute.h b/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/Attribute.h index ce68a26e..ed38b1d2 100644 --- a/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/Attribute.h +++ b/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/Attribute.h @@ -4,8 +4,9 @@ class Attribute { public: + Attribute(); virtual ~Attribute(); - virtual int getId(); + virtual int getId() = 0; virtual double sanitizeValue(double) = 0; virtual double getDefaultValue() = 0; virtual bool isClientSyncable() = 0; @@ -15,10 +16,19 @@ class Attribute { class BaseAttribute : public Attribute { public: + BaseAttribute(Attribute*, eATTRIBUTE_ID, double); + ~BaseAttribute() override; + int getId() override; double getDefaultValue() override; bool isClientSyncable() override; Attribute* getParentAttribute() override; void setSyncable(bool) override; + +private: + Attribute* m_parent; + eATTRIBUTE_ID m_id; + double m_defaultValue; + bool m_syncable; }; class RangedAttribute : public BaseAttribute { @@ -27,6 +37,11 @@ class RangedAttribute : public BaseAttribute { static RangedAttribute* ATTACK_SPEED; RangedAttribute(Attribute*, eATTRIBUTE_ID, double, double, double); + ~RangedAttribute() override; double sanitizeValue(double) override; + +private: + double m_minValue; + double m_maxValue; }; diff --git a/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/AttributeInstance.h b/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/AttributeInstance.h new file mode 100644 index 00000000..15e89f54 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/AttributeInstance.h @@ -0,0 +1,29 @@ +#pragma once + +#include + +#include "net/minecraft/world/entity/ai/attributes/AttributeModifier.h" + +class Attribute; +enum class eMODIFIER_ID : unsigned int; + +/** Slot order follows the Switch AttributeInstance and ModifiableAttributeInstance tables. + */ +class AttributeInstance { +public: + AttributeInstance(); + virtual ~AttributeInstance(); + virtual Attribute* getAttribute() = 0; + virtual double getBaseValue() = 0; + virtual void setBaseValue(double) = 0; + virtual double getValue() = 0; + virtual std::unordered_set* getModifiers(int) = 0; + virtual void getModifiers(std::unordered_set&) = 0; + virtual bool hasModifier(AttributeModifier*) = 0; + virtual AttributeModifier* getModifier(eMODIFIER_ID) = 0; + virtual void addModifiers(std::unordered_set*) = 0; + virtual void addModifier(AttributeModifier*) = 0; + virtual void removeModifier(AttributeModifier*) = 0; + virtual void removeModifier(eMODIFIER_ID) = 0; + virtual void removeModifiers() = 0; +}; diff --git a/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/AttributeModifier.cpp b/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/AttributeModifier.cpp new file mode 100644 index 00000000..4377e446 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/AttributeModifier.cpp @@ -0,0 +1,59 @@ +#include "net/minecraft/world/entity/ai/attributes/AttributeModifier.h" + +// name guessed +void AttributeModifier::_init(int id, std::wstring name, double amount, int operation) { + m_amount = amount; + m_operation = operation; + m_name = name; + m_id = static_cast(id); + m_serialize = true; +} + +// name guessed +AttributeModifier::AttributeModifier(double amount, int operation) { + _init(0, m_name, amount, operation); +} + +AttributeModifier::AttributeModifier(eATTRIBUTE_ID id, double amount, int operation) { + _init(id, m_name, amount, operation); +} + +// name guessed +AttributeModifier::AttributeModifier(eATTRIBUTE_ID id, double amount, int operation, bool serialize) { + _init(id, m_name, amount, operation); + m_serialize = serialize; +} + +// name guessed +eATTRIBUTE_ID AttributeModifier::getId() { + return m_id; +} + +// name guessed +bool AttributeModifier::isSerializable() { + return m_serialize; +} + +// name guessed +void AttributeModifier::setSerialize(bool serialize) { + m_serialize = serialize; +} + +// name guessed +bool AttributeModifier::equals(AttributeModifier* other) { + if (this == other) + return true; + if (other != nullptr) + return m_id == other->m_id; + return false; +} + +// name guessed +double AttributeModifier::getAmount() { + return m_amount; +} + +// name guessed +int AttributeModifier::getOperation() { + return m_operation; +} diff --git a/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/AttributeModifier.h b/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/AttributeModifier.h index ce282531..d89dcb53 100644 --- a/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/AttributeModifier.h +++ b/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/AttributeModifier.h @@ -7,6 +7,15 @@ enum eATTRIBUTE_ID { BASE_ATTACK_DAMAGE = 1, BASE_ATTACK_SPEED = 16 }; class AttributeModifier { public: AttributeModifier(eATTRIBUTE_ID, double, int); + AttributeModifier(double, int); + AttributeModifier(eATTRIBUTE_ID, double, int, bool); + void _init(int, std::wstring, double, int); + eATTRIBUTE_ID getId(); + double getAmount(); + int getOperation(); + bool isSerializable(); + void setSerialize(bool); + bool equals(AttributeModifier*); double m_amount; int m_operation; diff --git a/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/BaseAttributeMap.h b/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/BaseAttributeMap.h new file mode 100644 index 00000000..4e2951dc --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/BaseAttributeMap.h @@ -0,0 +1,20 @@ +#pragma once + +#include "net/minecraft/world/entity/ai/attributes/AttributeModifier.h" +#include + +class Attribute; +class AttributeInstance; + +/** Recovered virtual prefix for pointer dispatch; the object's storage is still unreconstructed. + */ +class BaseAttributeMap { +public: + virtual ~BaseAttributeMap(); + virtual AttributeInstance* getInstance(Attribute*); + virtual AttributeInstance* getInstance(eATTRIBUTE_ID); + virtual AttributeInstance* registerAttribute(Attribute*); + virtual AttributeInstance* createAttributeInstance(Attribute*) = 0; + virtual void getAttributes(std::vector&); + virtual void onAttributeModified(AttributeInstance*); +}; diff --git a/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/ModifiableAttributeInstance.cpp b/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/ModifiableAttributeInstance.cpp new file mode 100644 index 00000000..61d64063 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/ModifiableAttributeInstance.cpp @@ -0,0 +1,111 @@ +#include "net/minecraft/world/entity/ai/attributes/ModifiableAttributeInstance.h" + +#include "net/minecraft/world/entity/ai/attributes/Attribute.h" +#include "net/minecraft/world/entity/ai/attributes/BaseAttributeMap.h" + +// name guessed +AttributeInstance::AttributeInstance() = default; + +// name guessed +// NON_MATCHING | score: 1540 (lower is better) +ModifiableAttributeInstance::ModifiableAttributeInstance(BaseAttributeMap* parent, Attribute* attribute) + : m_parent(parent), m_attribute(attribute), m_dirty(true), m_cachedValue(0) { + m_baseValue = attribute->getDefaultValue(); +} + +// name guessed +Attribute* ModifiableAttributeInstance::getAttribute() { + return m_attribute; +} + +// name guessed +double ModifiableAttributeInstance::getBaseValue() { + return m_baseValue; +} + +// name guessed +void ModifiableAttributeInstance::setDirty() { + m_dirty = true; + m_parent->onAttributeModified(this); +} + +// name guessed +void ModifiableAttributeInstance::setBaseValue(double value) { + if (getBaseValue() == value) + return; + m_baseValue = value; + setDirty(); +} + +// name guessed +std::unordered_set* ModifiableAttributeInstance::getModifiers(int operation) { + return &m_modifiers[operation]; +} + +// name guessed +void ModifiableAttributeInstance::getModifiers(std::unordered_set& result) { + for (int operation = 0; operation < 3; ++operation) { + for (const auto& modifier : m_modifiers[operation]) + result.insert(modifier); + } +} + +// name guessed +AttributeModifier* ModifiableAttributeInstance::getModifier(eMODIFIER_ID id) { + auto found = m_modifiersById.find(id); + return found == m_modifiersById.end() ? nullptr : found->second; +} + +// name guessed +bool ModifiableAttributeInstance::hasModifier(AttributeModifier* modifier) { + return m_modifiersById.find(static_cast(modifier->getId())) != m_modifiersById.end(); +} + +// name guessed +// NON_MATCHING | score: 90 (lower is better) +void ModifiableAttributeInstance::addModifiers(std::unordered_set* modifiers) { + for (AttributeModifier* modifier : *modifiers) + addModifier(modifier); +} + +// name guessed +double ModifiableAttributeInstance::getValue() { + if (m_dirty) { + m_cachedValue = calculateValue(); + m_dirty = false; + } + return m_cachedValue; +} + +// name guessed +void ModifiableAttributeInstance::getAppliedModifiers(int operation, + std::unordered_set& result) { + result.clear(); + for (const auto& modifier : *getModifiers(operation)) + result.insert(modifier); + for (Attribute* parent = m_attribute->getParentAttribute(); parent != nullptr; + parent = parent->getParentAttribute()) { + AttributeInstance* instance = m_parent->getInstance(parent); + if (instance != nullptr) { + for (const auto& modifier : *instance->getModifiers(operation)) + result.insert(modifier); + } + } +} + +// name guessed +double ModifiableAttributeInstance::calculateValue() { + double base = getBaseValue(); + std::unordered_set modifiers; + getAppliedModifiers(0, modifiers); + for (AttributeModifier* modifier : modifiers) + base += modifier->getAmount(); + getAppliedModifiers(1, modifiers); + double value = base; + for (AttributeModifier* modifier : modifiers) + value += base * modifier->getAmount(); + getAppliedModifiers(2, modifiers); + for (AttributeModifier* modifier : modifiers) + value *= modifier->getAmount() + 1.0; + return m_attribute->sanitizeValue(value); +} diff --git a/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/ModifiableAttributeInstance.h b/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/ModifiableAttributeInstance.h new file mode 100644 index 00000000..47b962fb --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/entity/ai/attributes/ModifiableAttributeInstance.h @@ -0,0 +1,37 @@ +#pragma once + +#include "net/minecraft/world/entity/ai/attributes/AttributeInstance.h" +#include + +class BaseAttributeMap; + +class ModifiableAttributeInstance : public AttributeInstance { +public: + ModifiableAttributeInstance(BaseAttributeMap*, Attribute*); + ~ModifiableAttributeInstance() override; + Attribute* getAttribute() override; + double getBaseValue() override; + void setBaseValue(double) override; + double getValue() override; + std::unordered_set* getModifiers(int) override; + void getModifiers(std::unordered_set&) override; + bool hasModifier(AttributeModifier*) override; + AttributeModifier* getModifier(eMODIFIER_ID) override; + void addModifiers(std::unordered_set*) override; + void addModifier(AttributeModifier*) override; + void removeModifier(AttributeModifier*) override; + void removeModifier(eMODIFIER_ID) override; + void removeModifiers() override; + void setDirty(); + +private: + double calculateValue(); + void getAppliedModifiers(int, std::unordered_set&); + BaseAttributeMap* m_parent; + Attribute* m_attribute; + std::unordered_set m_modifiers[3]; + std::unordered_map m_modifiersById; + double m_baseValue; + bool m_dirty; + double m_cachedValue; +}; diff --git a/src/Minecraft.World/net/minecraft/world/entity/item/EnderCrystal.h b/src/Minecraft.World/net/minecraft/world/entity/item/EnderCrystal.h index d9a8da0f..800b4d88 100644 --- a/src/Minecraft.World/net/minecraft/world/entity/item/EnderCrystal.h +++ b/src/Minecraft.World/net/minecraft/world/entity/item/EnderCrystal.h @@ -4,9 +4,11 @@ class EnderCrystal : public Entity { public: + EnderCrystal(Level* level); EnderCrystal(Level* level, double x, double y, double z); void setShowBottom(bool show); + void setBeamTarget(BlockPos*); eINSTANCEOF GetType() override; void defineSynchedData() override; diff --git a/src/Minecraft.World/net/minecraft/world/entity/mob/Minecart.cpp b/src/Minecraft.World/net/minecraft/world/entity/mob/Minecart.cpp new file mode 100644 index 00000000..bd7c0d87 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/entity/mob/Minecart.cpp @@ -0,0 +1,64 @@ +#include "net/minecraft/world/entity/mob/Minecart.h" + +#include "net/minecraft/util/Mth.h" +#include "net/minecraft/world/phys/AABB.h" + +#ifdef SAFETY_CHECKS +static_assert(offsetof(Minecart, m_flipped) == 0x2B4, "Minecart tail padding reuse"); +static_assert(offsetof(Minecart, m_lerpSteps) == 0x2C4, "Minecart interpolation layout"); +static_assert(offsetof(Minecart, m_lerpDeltaX) == 0x2F0, "Minecart velocity layout"); +#endif + +// name guessed +double Minecart::getMaxSpeed() { + return 0.4; +} + +// name guessed +void Minecart::activateMinecart(int, int, int, bool) {} + +// name guessed +void Minecart::moveOffTrack() { + double maxSpeed = getMaxSpeed(); + double movementX = Mth::clamp(m_deltaMovementX, -maxSpeed, maxSpeed); + m_deltaMovementX = movementX; + m_deltaMovementZ = Mth::clamp(m_deltaMovementZ, -maxSpeed, maxSpeed); + if (m_onGround) { + movementX *= 0.5; + m_deltaMovementX = movementX; + m_deltaMovementZ *= 0.5; + } + move(SELF, movementX, m_deltaMovementY, m_deltaMovementZ, false); + if (!m_onGround) { + m_deltaMovementX *= static_cast(0.95f); + m_deltaMovementZ *= static_cast(0.95f); + } +} + +// name guessed +void Minecart::applyNaturalSlowdown() { + double drag = isVehicle() ? static_cast(0.997f) : static_cast(0.96f); + m_deltaMovementX *= drag; + m_deltaMovementY *= 0.0; + m_deltaMovementZ *= drag; +} + +// name guessed +void Minecart::setPos(double x, double y, double z) { + m_x = x; + m_y = y; + m_z = z; + double halfWidth = m_width * 0.5f; + setBoundingBox( + AABB::newTemp(x - halfWidth, y, z - halfWidth, x + halfWidth, y + m_height, z + halfWidth)); +} + +// name guessed +void Minecart::lerpMotion(double x, double y, double z) { + m_deltaMovementX = x; + m_deltaMovementY = y; + m_deltaMovementZ = z; + m_lerpDeltaX = x; + m_lerpDeltaY = y; + m_lerpDeltaZ = z; +} diff --git a/src/Minecraft.World/net/minecraft/world/entity/mob/Minecart.h b/src/Minecraft.World/net/minecraft/world/entity/mob/Minecart.h index e9ca1281..2843e9bd 100644 --- a/src/Minecraft.World/net/minecraft/world/entity/mob/Minecart.h +++ b/src/Minecraft.World/net/minecraft/world/entity/mob/Minecart.h @@ -2,8 +2,36 @@ #include "net/minecraft/world/entity/Entity.h" -// ENTITY STUB +/** Partial reconstruction. New virtuals follow the original Switch vtable order. + */ class Minecart : public Entity { public: static void staticCtor(); + + void setPos(double, double, double) override; + void lerpMotion(double, double, double) override; + + virtual void destroy(DamageSource*); + virtual double getMaxSpeed(); + virtual void activateMinecart(int, int, int, bool); + virtual void moveOffTrack(); + virtual void moveAlongTrack(const BlockPos&, const BlockState*); + virtual void applyNaturalSlowdown(); + virtual Vec3* getPosOffs(double, double, double, double); + virtual Vec3* getPos(double, double, double); + + bool m_flipped; + std::uint64_t m_field2B8; + bool m_field2C0; + int m_lerpSteps; + double m_lerpX; + double m_lerpY; + double m_lerpZ; + double m_lerpYRot; + double m_lerpXRot; + double m_lerpDeltaX; + double m_lerpDeltaY; + double m_lerpDeltaZ; }; + +ASSERT_SIZEOF(Minecart, 0x308) diff --git a/src/Minecraft.World/net/minecraft/world/entity/mob/MinecartFurnace.cpp b/src/Minecraft.World/net/minecraft/world/entity/mob/MinecartFurnace.cpp new file mode 100644 index 00000000..6d1ea9b8 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/entity/mob/MinecartFurnace.cpp @@ -0,0 +1,53 @@ +#include "net/minecraft/world/entity/mob/MinecartFurnace.h" + +#include "net/minecraft/util/Mth.h" + +#ifdef SAFETY_CHECKS +static_assert(offsetof(MinecartFurnace, m_fuel) == 0x308, "Furnace fuel layout"); +static_assert(offsetof(MinecartFurnace, m_pushX) == 0x310, "Furnace propulsion layout"); +#endif + +// name guessed +double MinecartFurnace::getMaxSpeed() { + return 0.2; +} + +// name guessed +void MinecartFurnace::moveAlongTrack(const BlockPos& pos, const BlockState* state) { + Minecart::moveAlongTrack(pos, state); + double pushLengthSqr = m_pushX * m_pushX + m_pushZ * m_pushZ; + if (pushLengthSqr > 0.0001 + && m_deltaMovementX * m_deltaMovementX + m_deltaMovementZ * m_deltaMovementZ > 0.001) { + double pushLength = Mth::sqrt(pushLengthSqr); + m_pushX /= pushLength; + m_pushZ /= pushLength; + if (m_pushX * m_deltaMovementX + m_pushZ * m_deltaMovementZ < 0.0) { + m_pushX = 0.0; + m_pushZ = 0.0; + return; + } + double scale = pushLength / getMaxSpeed(); + m_pushX *= scale; + m_pushZ *= scale; + } +} + +// name guessed +void MinecartFurnace::applyNaturalSlowdown() { + double pushLengthSqr = m_pushX * m_pushX + m_pushZ * m_pushZ; + if (pushLengthSqr > 0.0001) { + double pushLength = Mth::sqrt(pushLengthSqr); + m_pushX /= pushLength; + m_pushZ /= pushLength; + m_deltaMovementX *= static_cast(0.8f); + m_deltaMovementY *= 0.0; + m_deltaMovementZ *= static_cast(0.8f); + m_deltaMovementX += m_pushX; + m_deltaMovementZ += m_pushZ; + } else { + m_deltaMovementX *= static_cast(0.98f); + m_deltaMovementY *= 0.0; + m_deltaMovementZ *= static_cast(0.98f); + } + Minecart::applyNaturalSlowdown(); +} diff --git a/src/Minecraft.World/net/minecraft/world/entity/mob/MinecartFurnace.h b/src/Minecraft.World/net/minecraft/world/entity/mob/MinecartFurnace.h index 1a3089e2..49cf5539 100644 --- a/src/Minecraft.World/net/minecraft/world/entity/mob/MinecartFurnace.h +++ b/src/Minecraft.World/net/minecraft/world/entity/mob/MinecartFurnace.h @@ -2,8 +2,17 @@ #include "net/minecraft/world/entity/mob/Minecart.h" -// ENTITY STUB class MinecartFurnace : public Minecart { public: static void staticCtor(); + + double getMaxSpeed() override; + void moveAlongTrack(const BlockPos&, const BlockState*) override; + void applyNaturalSlowdown() override; + + int m_fuel; + double m_pushX; + double m_pushZ; }; + +ASSERT_SIZEOF(MinecartFurnace, 0x320) diff --git a/src/Minecraft.World/net/minecraft/world/entity/mob/MinecartType.cpp b/src/Minecraft.World/net/minecraft/world/entity/mob/MinecartType.cpp new file mode 100644 index 00000000..b9965357 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/entity/mob/MinecartType.cpp @@ -0,0 +1,17 @@ +#include "net/minecraft/world/entity/mob/MinecartType.h" + +std::wstring MinecartType::NAMES[7] + = {L"MinecartRideable", L"MinecartChest", L"MinecartFurnace", L"MinecartTNT", + L"MinecartSpawner", L"MinecartHopper", L"MinecartCommandBlock"}; +MinecartType* MinecartType::RIDEABLE = new MinecartType{0}; // name guessed +MinecartType* MinecartType::CHEST = new MinecartType{1}; +MinecartType* MinecartType::FURNACE = new MinecartType{2}; +MinecartType* MinecartType::TNT = new MinecartType{3}; // name guessed +MinecartType* MinecartType::SPAWNER = new MinecartType{4}; +MinecartType* MinecartType::HOPPER = new MinecartType{5}; +MinecartType* MinecartType::COMMAND_BLOCK = new MinecartType{6}; // name guessed + +// name guessed +std::wstring MinecartType::getName() const { + return NAMES[id]; +} diff --git a/src/Minecraft.World/net/minecraft/world/entity/mob/MinecartType.h b/src/Minecraft.World/net/minecraft/world/entity/mob/MinecartType.h new file mode 100644 index 00000000..a64945aa --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/entity/mob/MinecartType.h @@ -0,0 +1,17 @@ +#pragma once + +#include + +class MinecartType { +public: + std::wstring getName() const; + static std::wstring NAMES[7]; + static MinecartType* RIDEABLE; + static MinecartType* CHEST; + static MinecartType* FURNACE; + static MinecartType* TNT; + static MinecartType* SPAWNER; + static MinecartType* HOPPER; + static MinecartType* COMMAND_BLOCK; + int id; +}; diff --git a/src/Minecraft.World/net/minecraft/world/entity/player/Player.cpp b/src/Minecraft.World/net/minecraft/world/entity/player/Player.cpp index 8fd38915..1f718fd3 100644 --- a/src/Minecraft.World/net/minecraft/world/entity/player/Player.cpp +++ b/src/Minecraft.World/net/minecraft/world/entity/player/Player.cpp @@ -100,6 +100,7 @@ bool Player::canHarmPlayer(std::wstring) { return this->isAllowedToAttackPlayers(); } +// NON_MATCHING | score: 3805 (lower is better) float Player::getArmorCoverPercentage() { return 0.0f; } @@ -117,7 +118,7 @@ void Player::setGameMode(const GameType*) {} void Player::onCrafted(not_null_ptr) {} void Player::handleCollectItem(not_null_ptr) {} -// NON_MATCHING +// NON_MATCHING | score: 5175 (lower is better) void Player::staticCtor() { // 4 counts of defineIdInternal // also SynchedEntityData :abyss: @@ -156,6 +157,7 @@ void Player::OnEquipArmor(not_null_ptr) {} void Player::OnTakeFromAnvil(not_null_ptr) {} // NON-MATCHING: some crap, logic should be the same though +// NON_MATCHING | score: 795 (lower is better) void Player::updatePlayerSize() { float newWidth, newHeight; @@ -201,3 +203,44 @@ bool Player::isAllowedToAttackPlayers() { return false; } + +// name guessed +bool Player::isAllowedToFly() { + return CConsoleMinecraftApp::sInstance.GetGameHostOption(static_cast(16)) + && getPlayerGamePrivilege(static_cast(5)); +} + +// name guessed +bool Player::hasInvulnerablePrivilege() { + return CConsoleMinecraftApp::sInstance.GetGameHostOption(static_cast(18)) + && getPlayerGamePrivilege(static_cast(8)); +} + +// name guessed +void Player::causeFoodExhaustion(float exhaustion) { + if (usesLegacyFoodHealing() || (isAllowedToFly() && m_abilities.m_isFlying) + || m_abilities.m_isInvulnerable || hasInvulnerablePrivilege()) { + return; + } + if ((CConsoleMinecraftApp::sInstance.GetGameHostOption(static_cast(12)) + || !getPlayerGamePrivilege(static_cast(1))) + && !m_level->m_isLocal) { + m_foodData.addExhaustion(exhaustion); + } +} + +// name guessed +FoodData* Player::getFoodData() { + return &m_foodData; +} + +// name guessed +bool Player::usesLegacyFoodHealing() { + return CConsoleMinecraftApp::sInstance.GetGameHostOption(static_cast(17)) + && getPlayerGamePrivilege(static_cast(6)); +} + +// name guessed +bool Player::isHurt() { + return getHealth() > 0.0f && getHealth() < getMaxHealth(); +} diff --git a/src/Minecraft.World/net/minecraft/world/entity/player/Player.h b/src/Minecraft.World/net/minecraft/world/entity/player/Player.h index 658b7322..de34e457 100644 --- a/src/Minecraft.World/net/minecraft/world/entity/player/Player.h +++ b/src/Minecraft.World/net/minecraft/world/entity/player/Player.h @@ -193,6 +193,13 @@ class Player : public LivingEntity { void setBool7FC(bool); bool isAllowedToAttackPlayers(); bool hasInvisiblePrivilege(); + bool isAllowedToFly(); + bool hasInvulnerablePrivilege(); + // name guessed: the unnamed entries at 0x71002d0d68 and 0x71002d0e10. + bool usesLegacyFoodHealing(); + bool isHurt(); + void causeFoodExhaustion(float); + FoodData* getFoodData(); int getPlayerGamePrivilege(EPlayerGamePrivileges); bool CheckPowerup(PowerupItems::eGlide_Timed_Powerup_ID); std::shared_ptr drop(not_null_ptr, bool); diff --git a/src/Minecraft.World/net/minecraft/world/food/FoodData.cpp b/src/Minecraft.World/net/minecraft/world/food/FoodData.cpp index 9c8ed909..343314db 100644 --- a/src/Minecraft.World/net/minecraft/world/food/FoodData.cpp +++ b/src/Minecraft.World/net/minecraft/world/food/FoodData.cpp @@ -2,10 +2,13 @@ #include "net/minecraft/client/Minecraft.h" #include "net/minecraft/world/Difficulty.h" +#include "net/minecraft/world/damagesource/DamageSource.h" #include "net/minecraft/world/entity/player/Player.h" #include "net/minecraft/world/food/FoodConstants.h" #include "net/minecraft/world/level/GameRules.h" #include "net/minecraft/world/level/Level.h" +#include "net/minecraft/world/level/gamemode/minigames/EMiniGameId.h" +#include FoodData::FoodData() { m_exhaustionLevel = 0; @@ -15,6 +18,83 @@ FoodData::FoodData() { m_saturationLevel = FoodConstants::StartSaturation(); } +void FoodData::eat(int nutrition, float saturationModifier) { + m_foodLevel = std::min(m_foodLevel + nutrition, FoodConstants::MaxFood()); + m_saturationLevel + = std::min(m_saturationLevel + static_cast(nutrition) * saturationModifier * 2.0f, + static_cast(m_foodLevel)); +} + +void FoodData::eat(FoodItem* food, const not_null_ptr& item) { + // Both temporary owners survive through eat; each virtual receives its own copy. + eat(food->getNutrition(not_null_ptr(item)), + food->getSaturationModifier(not_null_ptr(item))); +} + +// name guessed +void FoodData::addExhaustion(float exhaustion) { + m_exhaustionLevel = std::min(m_exhaustionLevel + exhaustion, FoodConstants::MaxSaturation() * 2.0f); +} + +// name guessed +void FoodData::tick(const std::shared_ptr& player) { + const Difficulty* difficulty = player->m_level->getDifficulty(); + m_lastFoodLevel = m_foodLevel; + + if (m_exhaustionLevel > FoodConstants::ExhaustionDrop()) { + m_exhaustionLevel -= FoodConstants::ExhaustionDrop(); + if (m_saturationLevel > 0.0f) { + m_saturationLevel = std::max(m_saturationLevel - 1.0f, 0.0f); + } else if (difficulty != Difficulty::PEACEFUL) { + m_foodLevel = std::max(m_foodLevel - 1, 0); + } + } + + bool naturalRegeneration = player->m_level->getGameRules()->getBoolean(7); + bool legacyFoodHealing = player->usesLegacyFoodHealing(); + if (naturalRegeneration && legacyFoodHealing) { + // This mode retains the timer when food is absent or health is already full. + if (m_foodLevel > 0 && player->isHurt()) { + ++m_tickTimer; + if (m_tickTimer >= FoodConstants::HealthTickCount()) { + player->heal(1.0f); + --m_foodLevel; + m_tickTimer = 0; + } + } + } else if (!Minecraft::InMiniGame(EMiniGameId::NORMAL_WORLD, true) && naturalRegeneration + && m_saturationLevel > 0.0f && player->isHurt() && m_foodLevel >= FoodConstants::MaxFood()) { + ++m_tickTimer; + if (m_tickTimer >= FoodConstants::HealthTickCountSaturated()) { + float saturation = std::min(m_saturationLevel, FoodConstants::SprintLevel()); + player->heal(saturation / FoodConstants::SprintLevel()); + addExhaustion(saturation); + m_tickTimer = 0; + } + } else if (player->m_level->getGameRules()->getBoolean(7) && m_foodLevel >= FoodConstants::HealLevel() + && player->isHurt()) { + ++m_tickTimer; + if (m_tickTimer >= FoodConstants::HealthTickCount()) { + player->heal(1.0f); + addExhaustion(FoodConstants::SprintLevel()); + m_tickTimer = 0; + } + } else if (m_foodLevel <= FoodConstants::StarveLevel()) { + ++m_tickTimer; + if (m_tickTimer >= FoodConstants::HealthTickCount()) { + if ((player->getHealth() > 10.0f || difficulty == Difficulty::HARD + || (player->getHealth() > 1.0f + && (difficulty == Difficulty::NORMAL || difficulty == Difficulty::HARD))) + && !Minecraft::InMiniGame(EMiniGameId::GLIDE, true)) { + player->hurt(DamageSource::STARVE, 1.0f); + } + m_tickTimer = 0; + } + } else { + m_tickTimer = 0; + } +} + void FoodData::readAdditionalSaveData(CompoundTag* tag) { if (tag->contains(L"foodLevel", 99)) { m_foodLevel = tag->getInt(L"foodLevel"); @@ -39,6 +119,7 @@ int FoodData::getLastFoodLevel() { return m_lastFoodLevel; } +// name guessed bool FoodData::needsFood() { return m_foodLevel < FoodConstants::MaxFood(); } @@ -47,6 +128,7 @@ bool FoodData::isStarving() { return m_foodLevel <= FoodConstants::StarveLevel(); } +// name guessed float FoodData::getSaturationLevel() { return m_saturationLevel; } diff --git a/src/Minecraft.World/net/minecraft/world/inventory/Inventory.cpp b/src/Minecraft.World/net/minecraft/world/inventory/Inventory.cpp new file mode 100644 index 00000000..bbf86d11 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/inventory/Inventory.cpp @@ -0,0 +1,417 @@ +#include "net/minecraft/world/inventory/Inventory.h" + +#include "com/mojang/nbt/CompoundTag.h" +#include "com/mojang/nbt/ListTag.h" +#include "net/minecraft/client/resources/L10N.h" +#include "net/minecraft/client/ui/StringIDs.h" +#include "net/minecraft/core/BlockPos.h" +#include "net/minecraft/world/item/Item.h" +#include "net/minecraft/world/level/gamemode/GameMode.h" +#include "net/minecraft/world/phys/AABB.h" + +#include + +Inventory::Inventory(Player* player) : m_lastSelected(ItemInstance::EMPTY), m_carried(ItemInstance::EMPTY) { + m_items = NonNullList>::withSize(36, ItemInstance::EMPTY); + m_armor = NonNullList>::withSize(4, ItemInstance::EMPTY); + m_offhand = NonNullList>::withSize(1, ItemInstance::EMPTY); + m_itemsView = m_items; + m_armorView = m_armor; + m_offhandView = m_offhand; + m_selected = 0; + m_selectionChanged = false; + m_carried = ItemInstance::EMPTY; + m_timesChanged = 0; + m_player = player; +} + +// NON_MATCHING | score: 4320 (lower is better) +Inventory::~Inventory() { + m_items.deleteData(); + m_armor.deleteData(); + m_offhand.deleteData(); +} + +// name guessed +const not_null_ptr& Inventory::getSelected() { + return isHotbarSlot(m_selected) ? m_items[m_selected] : ItemInstance::EMPTY; +} + +// name guessed +// NON_MATCHING | score: 315 (lower is better) +bool Inventory::isHotbarSlot(int slot) { + return slot >= 0 && slot < 9; +} + +// name guessed +int Inventory::getSelectionSize() { + return 9; +} + +void Inventory::swapPaint(int direction) { + if (direction > 0) + direction = 1; + if (direction < 0) + direction = -1; + m_selected -= direction; + while (m_selected < 0) + m_selected += 9; + while (m_selected >= 9) + m_selected -= 9; +} + +/** Nonmatching: minigame-specific slot restrictions remain to be reconstructed. + */ +// name guessed +// NON_MATCHING | score: 1995 (lower is better) +int Inventory::getFreeSlot() { + for (unsigned int i = 0; i < m_items.size(); ++i) { + if (m_items[i]->isEmpty()) + return i; + } + return -1; +} + +// name guessed +bool Inventory::isSameItem(not_null_ptr first, not_null_ptr second, + bool ignoreTags) { + return first->getItem() == second->getItem() + && (!first->isStackedByData() || first->getAuxValue() == second->getAuxValue()) + && (ignoreTags || ItemInstance::tagMatches(first, second)); +} + +// name guessed +// NON_MATCHING | score: 315 (lower is better) +bool Inventory::hasRemainingSpaceForItem(not_null_ptr slot, not_null_ptr item, + bool ignoreTags) { + return !slot->isEmpty() && isSameItem(slot, item, ignoreTags) && slot->isStackable() + && slot->getCount() < slot->getMaxStackSize() && slot->getCount() < getMaxStackSize(); +} + +// name guessed +int Inventory::getSlotWithRemainingSpace(not_null_ptr item) { + if (hasRemainingSpaceForItem(getItem(m_selected), item, false)) + return m_selected; + if (hasRemainingSpaceForItem(getItem(40), item, false)) + return 40; + for (int i = 0; i < static_cast(m_items.size()); ++i) { + if (hasRemainingSpaceForItem(m_items[i], item, false)) + return i; + } + return -1; +} + +// name guessed +int Inventory::addResource(not_null_ptr item) { + if (GameMode* mode = m_player->GetGameMode()) + mode->RecordItem(item); + int slot = getSlotWithRemainingSpace(item); + if (slot == -1) + slot = getFreeSlot(); + if (slot == -1) + return item->getCount(); + return addResource(slot, item); +} + +// name guessed +// NON_MATCHING | score: 7969 (lower is better) +int Inventory::addResource(int slot, not_null_ptr item) { + if (slot < 0 || slot >= getContainerSize()) + return item->getCount(); + Item* type = item->getItem(); + int remaining = item->getCount(); + auto stack = getItem(slot); + if (!stack->isEmpty() && !isSameItem(stack, item, false)) + return remaining; + if (stack->isEmpty()) { + stack = not_null_ptr(new ItemInstance(type, 0, item->getAuxValue())); + if (item->hasTag()) { + stack->setTag(item->getTag()->copy()); + m_player->handleCollectItem(item); + } + setItem(slot, stack); + } + // A newly created zero-count stack reports AIR through getItem(). Use the + // incoming item's limit until the destination becomes nonempty. + int amount = std::min(remaining, item->getMaxStackSize() - stack->getCount()); + amount = std::min(amount, getMaxStackSize() - stack->getCount()); + if (amount > 0) { + remaining -= amount; + stack->grow(amount); + stack->setPopTime(5); + } + return remaining; +} + +bool Inventory::add(not_null_ptr item) { + return add(-1, item); +} + +/** Nonmatching: item-collection statistics and achievements remain to be reconstructed. + */ +// name guessed +// NON_MATCHING | score: 15193 (lower is better) +bool Inventory::add(int slot, not_null_ptr item) { + if (item->isEmpty() || slot < -1 || slot >= getContainerSize()) + return false; + if (item->isDamaged()) { + if (slot >= static_cast(m_items.size())) + return false; + if (slot == -1) + slot = getFreeSlot(); + if (slot >= 0) { + m_player->handleCollectItem(item); + m_items.set(slot, item->copy()); + m_items[slot]->setPopTime(5); + item->setCount(0); + return true; + } + if (m_player->m_abilities.m_isInstabuild) { + item->setCount(0); + return true; + } + return false; + } + int previous; + do { + previous = item->getCount(); + item->setCount(slot == -1 ? addResource(item) : addResource(slot, item)); + } while (!item->isEmpty() && item->getCount() < previous); + if (item->getCount() == previous && m_player->m_abilities.m_isInstabuild) { + item->setCount(0); + return true; + } + return item->getCount() < previous; +} + +bool Inventory::hasResource(Item* item) { + for (unsigned int i = 0; i < m_items.size(); ++i) { + if (!m_items[i]->isEmpty() && m_items[i]->getItem() == item) + return true; + } + return false; +} + +NonNullList> Inventory::getSlotList(unsigned int& index) { + if (index < m_itemsView.size()) + return m_itemsView; + index -= m_itemsView.size(); + if (index < m_armorView.size()) + return m_armorView; + index -= m_armorView.size(); + if (index < m_offhandView.size()) + return m_offhandView; + return {}; +} + +// name guessed +int Inventory::getContainerSize() { + return m_items.size() + m_armor.size() + m_offhand.size(); +} + +// name guessed +// NON_MATCHING | score: 7826 (lower is better) +bool Inventory::isEmpty() { + for (auto list : {m_items, m_armor, m_offhand}) { + for (unsigned int i = 0; i < list.size(); ++i) { + auto item = list[i]; + if (!item->isEmpty()) + return false; + } + } + return true; +} + +// name guessed +// NON_MATCHING | score: 3924 (lower is better) +not_null_ptr Inventory::getItem(unsigned int index) { + auto list = getSlotList(index); + return list.size() == 0 ? ItemInstance::EMPTY : list[index]; +} + +// name guessed +// NON_MATCHING | score: 4222 (lower is better) +not_null_ptr Inventory::removeItem(unsigned int index, int count) { + auto list = getSlotList(index); + if (list.size() == 0 || count <= 0 || list[index]->isEmpty()) + return ItemInstance::EMPTY; + auto result = list[index]->split(count); + if (list[index]->isEmpty()) + list.set(index, ItemInstance::EMPTY); + return result; +} + +// name guessed +// NON_MATCHING | score: 4526 (lower is better) +not_null_ptr Inventory::removeItemNoUpdate(int slot) { + unsigned int index = slot; + auto list = getSlotList(index); + if (list.size() == 0 || list[index]->isEmpty()) + return ItemInstance::EMPTY; + auto item = list[index]; + list.set(index, ItemInstance::EMPTY); + return item; +} + +// NON_MATCHING | score: 5905 (lower is better) +void Inventory::removeItem(not_null_ptr item) { + for (auto list : {m_itemsView, m_armorView, m_offhandView}) { + for (unsigned int i = 0; i < list.size(); ++i) { + if (list[i] == item) { + list.set(i, ItemInstance::EMPTY); + break; + } + } + } +} + +// name guessed +// NON_MATCHING | score: 6252 (lower is better) +void Inventory::setItem(unsigned int index, not_null_ptr item) { + bool empty = item->isEmpty(); + unsigned int slot = index; + auto list = getSlotList(slot); + if (list.size() == 0) + return; + if (index >= m_itemsView.size() && index < m_itemsView.size() + m_armorView.size() && !empty + && m_player->isType(eLocalPlayer)) + m_player->OnEquipArmor(item); + list.set(slot, item); + m_player->handleCollectItem(item); +} + +// name guessed +int Inventory::getMaxStackSize() { + return 64; +} + +// name guessed +void Inventory::setChanged() { + ++m_timesChanged; +} + +// name guessed +not_null_ptr Inventory::getArmor(int index) { + return m_armor[index]; +} + +// name guessed +void Inventory::setCarried(not_null_ptr item) { + m_carried = item; + m_player->handleCollectItem(item); +} + +not_null_ptr Inventory::getCarried() { + return m_carried; +} + +// name guessed +ListTag* Inventory::save(ListTag* tags) { + for (unsigned int i = 0; i < m_items.size(); ++i) { + if (!m_items[i]->isEmpty()) { + auto tag = new CompoundTag(); + tag->putByte(L"Slot", i); + m_items[i]->save(tag); + tags->add(tag); + } + } + for (unsigned int i = 0; i < m_armor.size(); ++i) { + if (!m_armor[i]->isEmpty()) { + auto tag = new CompoundTag(); + tag->putByte(L"Slot", i + 100); + m_armor[i]->save(tag); + tags->add(tag); + } + } + for (unsigned int i = 0; i < m_offhand.size(); ++i) { + if (!m_offhand[i]->isEmpty()) { + auto tag = new CompoundTag(); + tag->putByte(L"Slot", i + 150); + m_offhand[i]->save(tag); + tags->add(tag); + } + } + return tags; +} + +void Inventory::load(ListTag* tags) { + m_items.clear(); + m_armor.clear(); + m_offhand.clear(); + for (int i = 0; i < static_cast(tags->size()); ++i) { + CompoundTag* tag = tags->getCompound(i); + unsigned int slot = tag->getByte(L"Slot") & 0xff; + not_null_ptr item(new ItemInstance(tag)); + if (item->isEmpty()) + continue; + if (slot < m_items.size()) + m_items.set(slot, item); + else if (slot >= 100 && slot < m_armor.size() + 100) + m_armor.set(slot - 100, item); + else if (slot >= 150 && slot < m_offhand.size() + 150) + m_offhand.set(slot - 150, item); + } +} + +// name guessed +std::wstring Inventory::getName() { + return L10N::GetString(StringIDs::Inventory_2); +} + +// name guessed +std::wstring Inventory::getCustomName() { + return L""; +} + +// name guessed +bool Inventory::hasCustomName() { + return false; +} + +// name guessed +std::wstring Inventory::getDisplayName() { + return hasCustomName() ? getCustomName() : getName(); +} + +// name guessed +// NON_MATCHING | score: 3771 (lower is better) +bool Inventory::stillValid(std::shared_ptr player) { + if (m_player->m_isRemoved) + return false; + BlockPos pos(m_player->getPos(1.0f)); + const AABB* box = player->getBoundingBox(); + Vec3* center = Vec3::newTemp(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5); + double radius = (box->m_axX - box->m_inX) * 0.5 + 1.8 + (box->m_axY - box->m_inY) * 0.5; + return center->distanceToSqr(box->getCenter()) - radius * radius <= 30.25; +} + +// name guessed +void Inventory::startOpen(std::shared_ptr) {} + +// name guessed +void Inventory::stopOpen(std::shared_ptr) {} + +// name guessed +bool Inventory::canPlaceItem(int, not_null_ptr) { + return true; +} + +// name guessed +int Inventory::getContainerData(int) { + return 0; +} + +// name guessed +void Inventory::setContainerData(int, int) {} + +// name guessed +int Inventory::getContainerDataCount() { + return 0; +} + +// name guessed +void Inventory::clearContent() { + m_itemsView.clear(); + m_armorView.clear(); + m_offhandView.clear(); +} diff --git a/src/Minecraft.World/net/minecraft/world/inventory/Inventory.h b/src/Minecraft.World/net/minecraft/world/inventory/Inventory.h index 24c08695..b26a6e5a 100644 --- a/src/Minecraft.World/net/minecraft/world/inventory/Inventory.h +++ b/src/Minecraft.World/net/minecraft/world/inventory/Inventory.h @@ -1,34 +1,75 @@ #pragma once +#include "net/minecraft/core/NonNullList.h" #include "net/minecraft/world/Container.h" #include "net/minecraft/world/item/ItemInstance.h" #include "types.h" +class ListTag; + class Inventory : public Container { public: + explicit Inventory(Player*); + Inventory(const Inventory&) = delete; + Inventory& operator=(const Inventory&) = delete; + + const not_null_ptr& getSelected(); + static bool isHotbarSlot(int); + static int getSelectionSize(); + void swapPaint(int); bool add(not_null_ptr); + bool add(int, not_null_ptr); bool hasResource(Item*); + int getFreeSlot(); + int getSlotWithRemainingSpace(not_null_ptr); + bool hasRemainingSpaceForItem(not_null_ptr, not_null_ptr, bool); + bool isSameItem(not_null_ptr, not_null_ptr, bool); + int addResource(not_null_ptr); + int addResource(int, not_null_ptr); + void removeItem(not_null_ptr); + not_null_ptr getArmor(int); + void setCarried(not_null_ptr); not_null_ptr getCarried(); + ListTag* save(ListTag*); + void load(ListTag*); - void getName() override; - void getCustomName() override; - void hasCustomName() override; - void getDisplayName() override; - ~Inventory(); - void getContainerSize() override; - void isEmpty() override; + std::wstring getName() override; + std::wstring getCustomName() override; + bool hasCustomName() override; + std::wstring getDisplayName() override; + ~Inventory() override; + int getContainerSize() override; + bool isEmpty() override; not_null_ptr getItem(unsigned int) override; not_null_ptr removeItem(unsigned int, int) override; - void removeItemNoUpdate(int) override; + not_null_ptr removeItemNoUpdate(int) override; void setItem(unsigned int, not_null_ptr) override; int getMaxStackSize() override; void setChanged() override; - void stillValid(std::shared_ptr) override; + bool stillValid(std::shared_ptr) override; void startOpen(std::shared_ptr) override; void stopOpen(std::shared_ptr) override; - void canPlaceItem(int, not_null_ptr) override; - void getContainerData(int) override; + bool canPlaceItem(int, not_null_ptr) override; + int getContainerData(int) override; void setContainerData(int, int) override; - void getContainerDataCount() override; + int getContainerDataCount() override; void clearContent() override; + + NonNullList> m_items; + NonNullList> m_armor; + NonNullList> m_offhand; + NonNullList> m_itemsView; + NonNullList> m_armorView; + NonNullList> m_offhandView; + bool m_selectionChanged; + int m_selected; + Player* m_player; + not_null_ptr m_lastSelected; + not_null_ptr m_carried; + int m_timesChanged; + +private: + NonNullList> getSlotList(unsigned int&); }; + +ASSERT_SIZEOF(Inventory, 0x100) diff --git a/src/Minecraft.World/net/minecraft/world/item/ArmorItem.h b/src/Minecraft.World/net/minecraft/world/item/ArmorItem.h index b2a02080..630a4829 100644 --- a/src/Minecraft.World/net/minecraft/world/item/ArmorItem.h +++ b/src/Minecraft.World/net/minecraft/world/item/ArmorItem.h @@ -4,7 +4,14 @@ class ArmorItem : public Item { public: - class ArmorMaterial; + class ArmorMaterial { + public: + static const ArmorMaterial* LEATHER; + static const ArmorMaterial* CHAIN; + static const ArmorMaterial* IRON; + static const ArmorMaterial* GOLD; + static const ArmorMaterial* DIAMOND; + }; ArmorItem(const ArmorMaterial*, int, const EquipmentSlot*); static void staticCtor(); @@ -14,4 +21,5 @@ class ArmorItem : public Item { float m_toughness; int m_dword90; const ArmorMaterial* m_armorMaterial; + void* m_unknownA0[2]; }; diff --git a/src/Minecraft.World/net/minecraft/world/item/BlockItem.cpp b/src/Minecraft.World/net/minecraft/world/item/BlockItem.cpp new file mode 100644 index 00000000..d433b7e5 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/BlockItem.cpp @@ -0,0 +1,29 @@ +#include "net/minecraft/world/item/BlockItem.h" +#include "net/minecraft/world/level/block/Block.h" + +BlockItem::BlockItem(Block* block) : m_block(block), m_unknown88(nullptr) {} + +Block* BlockItem::getBlock() { + return m_block; +} + +unsigned int BlockItem::getDescriptionId(int data) { + return m_block->getDescriptionId(data); +} + +unsigned int BlockItem::getDescriptionId(not_null_ptr) { + return m_block->getDescriptionId(-1); +} + +unsigned int BlockItem::getUseDescriptionId() { + return m_block->getUseDescriptionId(); +} + +unsigned int BlockItem::getUseDescriptionId(not_null_ptr) { + return m_block->getUseDescriptionId(); +} + +BlockItem* BlockItem::setDescriptionId(unsigned int name) { + Item::setDescriptionId(name); + return this; +} diff --git a/src/Minecraft.World/net/minecraft/world/item/BlockItem.h b/src/Minecraft.World/net/minecraft/world/item/BlockItem.h index 4421e48b..71339cfa 100644 --- a/src/Minecraft.World/net/minecraft/world/item/BlockItem.h +++ b/src/Minecraft.World/net/minecraft/world/item/BlockItem.h @@ -5,8 +5,15 @@ class BlockItem : public Item { public: BlockItem(Block* block); + ~BlockItem() override; Block* getBlock(); + BlockItem* setDescriptionId(unsigned int); + unsigned int getDescriptionId(int) override; + unsigned int getDescriptionId(not_null_ptr) override; + unsigned int getUseDescriptionId() override; + unsigned int getUseDescriptionId(not_null_ptr) override; - void* m_filler[2]; + Block* m_block; + void* m_unknown88; }; diff --git a/src/Minecraft.World/net/minecraft/world/item/BlockPlanterItem.cpp b/src/Minecraft.World/net/minecraft/world/item/BlockPlanterItem.cpp new file mode 100644 index 00000000..908f244f --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/BlockPlanterItem.cpp @@ -0,0 +1,4 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" + +// name guessed +BlockPlanterItem::BlockPlanterItem(Block* block) : m_block(block) {} diff --git a/src/Minecraft.World/net/minecraft/world/item/BoatItem.cpp b/src/Minecraft.World/net/minecraft/world/item/BoatItem.cpp new file mode 100644 index 00000000..2ce75df1 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/BoatItem.cpp @@ -0,0 +1,7 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" +#include "net/minecraft/world/item/LeadItem.h" + +// name guessed +BoatItem::BoatItem(int type) : m_type(type) { + m_maxStackSize = 1; +} diff --git a/src/Minecraft.World/net/minecraft/world/item/BookItem.cpp b/src/Minecraft.World/net/minecraft/world/item/BookItem.cpp new file mode 100644 index 00000000..7b086299 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/BookItem.cpp @@ -0,0 +1,5 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" +#include "net/minecraft/world/item/LeadItem.h" + +// name guessed +BookItem::BookItem() {} diff --git a/src/Minecraft.World/net/minecraft/world/item/BottleItem.cpp b/src/Minecraft.World/net/minecraft/world/item/BottleItem.cpp new file mode 100644 index 00000000..5074189c --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/BottleItem.cpp @@ -0,0 +1,4 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" + +// name guessed +BottleItem::BottleItem() {} diff --git a/src/Minecraft.World/net/minecraft/world/item/BowlFoodItem.cpp b/src/Minecraft.World/net/minecraft/world/item/BowlFoodItem.cpp new file mode 100644 index 00000000..8d9082c7 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/BowlFoodItem.cpp @@ -0,0 +1,7 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" +#include "net/minecraft/world/item/LeadItem.h" + +// name guessed +BowlFoodItem::BowlFoodItem(int nutrition) : FoodItem(nutrition, false) { + setMaxStackSize(1); +} diff --git a/src/Minecraft.World/net/minecraft/world/item/BucketItem.cpp b/src/Minecraft.World/net/minecraft/world/item/BucketItem.cpp new file mode 100644 index 00000000..06b9201d --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/BucketItem.cpp @@ -0,0 +1,7 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" +#include "net/minecraft/world/item/LeadItem.h" + +// name guessed +BucketItem::BucketItem(Block* block) : m_block(block) { + m_maxStackSize = 1; +} diff --git a/src/Minecraft.World/net/minecraft/world/item/CarrotOnAStickItem.cpp b/src/Minecraft.World/net/minecraft/world/item/CarrotOnAStickItem.cpp new file mode 100644 index 00000000..8bc19765 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/CarrotOnAStickItem.cpp @@ -0,0 +1,7 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" + +// name guessed +CarrotOnAStickItem::CarrotOnAStickItem() { + setMaxStackSize(1); + setMaxDamage(25); +} diff --git a/src/Minecraft.World/net/minecraft/world/item/CoalItem.h b/src/Minecraft.World/net/minecraft/world/item/CoalItem.h index 7f61a727..2ac35a99 100644 --- a/src/Minecraft.World/net/minecraft/world/item/CoalItem.h +++ b/src/Minecraft.World/net/minecraft/world/item/CoalItem.h @@ -6,6 +6,7 @@ #include "types.h" class CoalItem : public Item { +public: CoalItem(); unsigned int getDescriptionId(not_null_ptr itemInstance) override; diff --git a/src/Minecraft.World/net/minecraft/world/item/DebugFourjItem.h b/src/Minecraft.World/net/minecraft/world/item/DebugFourjItem.h index c4b59634..2654697c 100644 --- a/src/Minecraft.World/net/minecraft/world/item/DebugFourjItem.h +++ b/src/Minecraft.World/net/minecraft/world/item/DebugFourjItem.h @@ -4,6 +4,7 @@ #include "types.h" class DebugFourjItem : public Item { +public: DebugFourjItem(); ~DebugFourjItem() override {} diff --git a/src/Minecraft.World/net/minecraft/world/item/DoorItem.cpp b/src/Minecraft.World/net/minecraft/world/item/DoorItem.cpp new file mode 100644 index 00000000..61ca8f95 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/DoorItem.cpp @@ -0,0 +1,5 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" +#include "net/minecraft/world/item/LeadItem.h" + +// name guessed +DoorItem::DoorItem(Block* block) : m_block(block) {} diff --git a/src/Minecraft.World/net/minecraft/world/item/EggItem.cpp b/src/Minecraft.World/net/minecraft/world/item/EggItem.cpp new file mode 100644 index 00000000..c26b4c65 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/EggItem.cpp @@ -0,0 +1,7 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" +#include "net/minecraft/world/item/LeadItem.h" + +// name guessed +EggItem::EggItem() { + m_maxStackSize = 16; +} diff --git a/src/Minecraft.World/net/minecraft/world/item/EnchantedBookItem.cpp b/src/Minecraft.World/net/minecraft/world/item/EnchantedBookItem.cpp new file mode 100644 index 00000000..b33a97f6 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/EnchantedBookItem.cpp @@ -0,0 +1,4 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" + +// name guessed +EnchantedBookItem::EnchantedBookItem() {} diff --git a/src/Minecraft.World/net/minecraft/world/item/EnderEyeItem.cpp b/src/Minecraft.World/net/minecraft/world/item/EnderEyeItem.cpp new file mode 100644 index 00000000..c8b26921 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/EnderEyeItem.cpp @@ -0,0 +1,4 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" + +// name guessed +EnderEyeItem::EnderEyeItem() {} diff --git a/src/Minecraft.World/net/minecraft/world/item/EnderpearlItem.cpp b/src/Minecraft.World/net/minecraft/world/item/EnderpearlItem.cpp new file mode 100644 index 00000000..cf0c61ed --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/EnderpearlItem.cpp @@ -0,0 +1,6 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" + +// name guessed +EnderpearlItem::EnderpearlItem() { + m_maxStackSize = 16; +} diff --git a/src/Minecraft.World/net/minecraft/world/item/ExperienceBottleItem.cpp b/src/Minecraft.World/net/minecraft/world/item/ExperienceBottleItem.cpp new file mode 100644 index 00000000..1e16328e --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/ExperienceBottleItem.cpp @@ -0,0 +1,4 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" + +// name guessed +ExperienceBottleItem::ExperienceBottleItem() {} diff --git a/src/Minecraft.World/net/minecraft/world/item/FireworksItem.cpp b/src/Minecraft.World/net/minecraft/world/item/FireworksItem.cpp new file mode 100644 index 00000000..69c53082 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/FireworksItem.cpp @@ -0,0 +1,4 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" + +// name guessed +FireworksItem::FireworksItem() {} diff --git a/src/Minecraft.World/net/minecraft/world/item/FishingRodItem.h b/src/Minecraft.World/net/minecraft/world/item/FishingRodItem.h index c31e326f..0eb4bf45 100644 --- a/src/Minecraft.World/net/minecraft/world/item/FishingRodItem.h +++ b/src/Minecraft.World/net/minecraft/world/item/FishingRodItem.h @@ -2,4 +2,8 @@ #include "net/minecraft/world/item/Item.h" -class FishingRodItem : public Item {}; +class FishingRodItem : public Item { +public: + FishingRodItem(); + void* m_unknown[1]; +}; diff --git a/src/Minecraft.World/net/minecraft/world/item/FlintAndSteelItem.cpp b/src/Minecraft.World/net/minecraft/world/item/FlintAndSteelItem.cpp new file mode 100644 index 00000000..19d51d58 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/FlintAndSteelItem.cpp @@ -0,0 +1,8 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" +#include "net/minecraft/world/item/LeadItem.h" + +// name guessed +FlintAndSteelItem::FlintAndSteelItem() { + m_maxStackSize = 1; + setMaxDamage(64); +} diff --git a/src/Minecraft.World/net/minecraft/world/item/FoodItem.cpp b/src/Minecraft.World/net/minecraft/world/item/FoodItem.cpp new file mode 100644 index 00000000..cce54382 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/FoodItem.cpp @@ -0,0 +1,34 @@ +#include "net/minecraft/world/item/FoodItem.h" + +#include "net/minecraft/world/effect/MobEffectInstance.h" +#include "net/minecraft/world/item/ItemBootstrapTypes.h" + +FoodItem::FoodItem(int nutrition, float saturation, bool meat) + : m_nutrition(nutrition), m_saturation(saturation), m_meat(meat) { + initEffects(); +} + +FoodItem::FoodItem(int nutrition, bool meat) : m_nutrition(nutrition), m_saturation(0.6f), m_meat(meat) { + initEffects(); +} + +// name guessed +void FoodItem::initEffects() { + m_alwaysEat = false; + m_effect = nullptr; + m_effectProbability = 0.0f; +} + +// name guessed +FoodItem* FoodItem::setEffect(MobEffectInstance* effect, float probability) { + delete m_effect; + m_effect = effect; + m_effectProbability = probability; + return this; +} + +// name guessed +FoodItem* FoodItem::setAlwaysEat() { + m_alwaysEat = true; + return this; +} diff --git a/src/Minecraft.World/net/minecraft/world/item/FoodItem.h b/src/Minecraft.World/net/minecraft/world/item/FoodItem.h index be914177..7c631aee 100644 --- a/src/Minecraft.World/net/minecraft/world/item/FoodItem.h +++ b/src/Minecraft.World/net/minecraft/world/item/FoodItem.h @@ -2,4 +2,35 @@ #include "net/minecraft/world/item/Item.h" -class FoodItem : public Item {}; +class MobEffectInstance; + +class FoodItem : public Item { +public: + FoodItem(int nutrition, float saturation, bool meat); + FoodItem(int nutrition, bool meat); + + unsigned int GetUseTooltip(const ItemToolTipDataHolder&) override; + InteractionResultHolder use(Level*, std::shared_ptr, InteractionHand::EInteractionHand) override; + not_null_ptr finishUsingItem(not_null_ptr, Level*, + std::shared_ptr) override; + int getUseAnimation(not_null_ptr) override; + int getUseDuration(not_null_ptr) override; + + virtual void applyFoodEffect(not_null_ptr, Level*, std::shared_ptr); + virtual int getNutrition(const not_null_ptr&); + virtual float getSaturationModifier(const not_null_ptr&); + virtual bool isMeat(); + virtual FoodItem* setEffect(MobEffectInstance*, float probability); + virtual FoodItem* setAlwaysEat(); + + void initEffects(); + + int m_nutrition; + float m_saturation; + bool m_meat; + bool m_alwaysEat; + MobEffectInstance* m_effect; + float m_effectProbability; +}; + +ASSERT_SIZEOF(FoodItem, 0x98) diff --git a/src/Minecraft.World/net/minecraft/world/item/HangingEntityItem.cpp b/src/Minecraft.World/net/minecraft/world/item/HangingEntityItem.cpp new file mode 100644 index 00000000..27e45f8a --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/HangingEntityItem.cpp @@ -0,0 +1,4 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" + +// name guessed +HangingEntityItem::HangingEntityItem(eINSTANCEOF type) : m_type(type) {} diff --git a/src/Minecraft.World/net/minecraft/world/item/Item.cpp b/src/Minecraft.World/net/minecraft/world/item/Item.cpp index a95d6aa6..158bab2c 100644 --- a/src/Minecraft.World/net/minecraft/world/item/Item.cpp +++ b/src/Minecraft.World/net/minecraft/world/item/Item.cpp @@ -1,5 +1,35 @@ #include "net/minecraft/world/item/Item.h" +#include "net/minecraft/client/ui/StringIDs.h" +#include "net/minecraft/sounds/SoundEvents.h" +#include "net/minecraft/world/effect/MobEffectInstance.h" +#include "net/minecraft/world/effect/MobEffects.h" +#include "net/minecraft/world/item/AirItem.h" +#include "net/minecraft/world/item/ArmorItem.h" +#include "net/minecraft/world/item/ArmorStandItem.h" +#include "net/minecraft/world/item/ArrowItem.h" +#include "net/minecraft/world/item/AxeItem.h" +#include "net/minecraft/world/item/BowItem.h" +#include "net/minecraft/world/item/CoalItem.h" +#include "net/minecraft/world/item/DebugFourjItem.h" +#include "net/minecraft/world/item/ElytraItem.h" +#include "net/minecraft/world/item/EmptyMapItem.h" +#include "net/minecraft/world/item/FishingRodItem.h" +#include "net/minecraft/world/item/FoodItem.h" +#include "net/minecraft/world/item/HorseArmorItem.h" +#include "net/minecraft/world/item/ItemBootstrapTypes.h" +#include "net/minecraft/world/item/ItemResolvers.h" +#include "net/minecraft/world/item/Items.h" +#include "net/minecraft/world/item/LeadItem.h" +#include "net/minecraft/world/item/MapItem.h" +#include "net/minecraft/world/item/PickaxeItem.h" +#include "net/minecraft/world/item/ShovelItem.h" +#include "net/minecraft/world/item/SkullItem.h" +#include "net/minecraft/world/item/SwordItem.h" +#include "net/minecraft/world/level/block/LeafBlock.h" +#include +#include + #include "net/minecraft/client/renderer/texture/IconRegister.h" #include "net/minecraft/resources/ResourceLocation.h" #include "net/minecraft/world/entity/player/Player.h" @@ -20,10 +50,10 @@ const ItemPropertyFunction* cooldownFunction = nullptr; extern std::unordered_map blocksMap; -const Item::Tier* Item::Tier::WOOD = new Item::Tier(0, 59, 2.0, 0.0, 15, 0); +const Item::Tier* Item::Tier::WOOD = new Item::Tier(0, 59, 2.0, 0.0, 15, 0); // name guessed const Item::Tier* Item::Tier::STONE = new Item::Tier(1, 131, 4.0, 1.0, 5, 1); const Item::Tier* Item::Tier::IRON = new Item::Tier(2, 250, 6.0, 2.0, 14, 2); -const Item::Tier* Item::Tier::DIAMOND = new Item::Tier(3, 1561, 8.0, 3.0, 10, 3); +const Item::Tier* Item::Tier::DIAMOND = new Item::Tier(3, 1561, 8.0, 3.0, 10, 3); // name guessed const Item::Tier* Item::Tier::GOLD = new Item::Tier(0, 32, 12.0, 0.0, 22, 4); Item::Item() { @@ -59,8 +89,9 @@ bool Item::canBeDepleted() { return this->m_maxDamage > 0 && (!this->m_stackedByData || this->m_maxStackSize == 1); } -void Item::setIconName(const std::wstring& iconName) { +Item* Item::setIconName(const std::wstring& iconName) { this->m_iconName = iconName; + return this; } not_null_ptr Item::getDefaultInstance() { @@ -102,6 +133,14 @@ int Item::getMaxStackSize() { return this->m_maxStackSize; } +int Item::getMaxDamage() { + return m_maxDamage; +} + +bool Item::isStackedByData() { + return m_stackedByData; +} + int Item::getLevelDataForAuxValue(int) { return 0; } @@ -245,3 +284,2469 @@ int Item::GetOverrideCountColour() { TextureAtlasSprite* Item::GetOverrideCountIcon(not_null_ptr) { return nullptr; } + +extern std::wstring sBaseTierName; + +namespace ItemBootstrap { +extern const int LEATHER_ARMOR_TEXTURES[2] = {209, 210}; +} + +static_assert(sizeof(SlabBlockItem) == 0xa0, "SlabBlockItem allocation ABI"); +static_assert(sizeof(AirItem) == 0x88, "AirItem allocation ABI"); +static_assert(sizeof(MultiBlockItem) == 0xa8, "MultiBlockItem allocation ABI"); +static_assert(sizeof(TintedBlockItem) == 0xa0, "TintedBlockItem allocation ABI"); +static_assert(sizeof(LeafBlockItem) == 0x98, "LeafBlockItem allocation ABI"); +static_assert(sizeof(PistonBlockItem) == 0x90, "PistonBlockItem allocation ABI"); +static_assert(sizeof(SnowItem) == 0x90, "SnowItem allocation ABI"); +static_assert(sizeof(WaterLilyBlockItem) == 0xa0, "WaterLilyBlockItem allocation ABI"); +static_assert(sizeof(AnvilBlockItem) == 0xa8, "AnvilBlockItem allocation ABI"); +static_assert(sizeof(ShulkerBoxBlockItem) == 0x90, "ShulkerBoxBlockItem allocation ABI"); +static_assert(sizeof(ShovelItem) == 0xa8, "ShovelItem allocation ABI"); +static_assert(sizeof(PickaxeItem) == 0xa8, "PickaxeItem allocation ABI"); +static_assert(sizeof(AxeItem) == 0xa8, "AxeItem allocation ABI"); +static_assert(sizeof(FlintAndSteelItem) == 0x80, "FlintAndSteelItem allocation ABI"); +static_assert(sizeof(FoodItem) == 0x98, "FoodItem allocation ABI"); +static_assert(sizeof(BowItem) == 0x98, "BowItem allocation ABI"); +static_assert(sizeof(ArrowItem) == 0x80, "ArrowItem allocation ABI"); +static_assert(sizeof(CoalItem) == 0x88, "CoalItem allocation ABI"); +static_assert(sizeof(Item) == 0x80, "Item allocation ABI"); +static_assert(sizeof(SwordItem) == 0x88, "SwordItem allocation ABI"); +static_assert(sizeof(BowlFoodItem) == 0x98, "BowlFoodItem allocation ABI"); +static_assert(sizeof(BlockPlanterItem) == 0x88, "BlockPlanterItem allocation ABI"); +static_assert(sizeof(HoeItem) == 0x88, "HoeItem allocation ABI"); +static_assert(sizeof(SeedItem) == 0x90, "SeedItem allocation ABI"); +static_assert(sizeof(ArmorItem) == 0xb0, "ArmorItem allocation ABI"); +static_assert(sizeof(HangingEntityItem) == 0x80, "HangingEntityItem allocation ABI"); +static_assert(sizeof(GoldenAppleItem) == 0x98, "GoldenAppleItem allocation ABI"); +static_assert(sizeof(SignItem) == 0x80, "SignItem allocation ABI"); +static_assert(sizeof(DoorItem) == 0x88, "DoorItem allocation ABI"); +static_assert(sizeof(BucketItem) == 0x88, "BucketItem allocation ABI"); +static_assert(sizeof(MinecartItem) == 0x88, "MinecartItem allocation ABI"); +static_assert(sizeof(SaddleItem) == 0x80, "SaddleItem allocation ABI"); +static_assert(sizeof(RedStoneDustItem) == 0x80, "RedStoneDustItem allocation ABI"); +static_assert(sizeof(SnowballItem) == 0x80, "SnowballItem allocation ABI"); +static_assert(sizeof(BoatItem) == 0x80, "BoatItem allocation ABI"); +static_assert(sizeof(MilkBucketItem) == 0x80, "MilkBucketItem allocation ABI"); +static_assert(sizeof(BookItem) == 0x80, "BookItem allocation ABI"); +static_assert(sizeof(EggItem) == 0x80, "EggItem allocation ABI"); +static_assert(sizeof(CompassItem) == 0xa0, "CompassItem allocation ABI"); +static_assert(sizeof(FishingRodItem) == 0x88, "FishingRodItem allocation ABI"); +static_assert(sizeof(ClockItem) == 0xa0, "ClockItem allocation ABI"); +static_assert(sizeof(FishFoodItem) == 0x98, "FishFoodItem allocation ABI"); +static_assert(sizeof(DyeItem) == 0x100, "DyeItem allocation ABI"); +static_assert(sizeof(BedItem) == 0x88, "BedItem allocation ABI"); +static_assert(sizeof(MapItem) == 0x88, "MapItem allocation ABI"); +static_assert(sizeof(ShearsItem) == 0x80, "ShearsItem allocation ABI"); +static_assert(sizeof(MobEffectInstance) == 0x18, "MobEffectInstance allocation ABI"); +static_assert(sizeof(EnderpearlItem) == 0x80, "EnderpearlItem allocation ABI"); +static_assert(sizeof(PotionItem) == 0x90, "PotionItem allocation ABI"); +static_assert(sizeof(BottleItem) == 0x80, "BottleItem allocation ABI"); +static_assert(sizeof(EnderEyeItem) == 0x80, "EnderEyeItem allocation ABI"); +static_assert(sizeof(SpawnEggItem) == 0x88, "SpawnEggItem allocation ABI"); +static_assert(sizeof(ExperienceBottleItem) == 0x80, "ExperienceBottleItem allocation ABI"); +static_assert(sizeof(FireChargeItem) == 0x88, "FireChargeItem allocation ABI"); +static_assert(sizeof(WritableBookItem) == 0x80, "WritableBookItem allocation ABI"); +static_assert(sizeof(WrittenBookItem) == 0x80, "WrittenBookItem allocation ABI"); +static_assert(sizeof(SeedFoodItem) == 0xa8, "SeedFoodItem allocation ABI"); +static_assert(sizeof(EmptyMapItem) == 0x80, "EmptyMapItem allocation ABI"); +static_assert(sizeof(SkullItem) == 0x80, "SkullItem allocation ABI"); +static_assert(sizeof(CarrotOnAStickItem) == 0x80, "CarrotOnAStickItem allocation ABI"); +static_assert(sizeof(SimpleFoiledItem) == 0x80, "SimpleFoiledItem allocation ABI"); +static_assert(sizeof(FireworksItem) == 0x80, "FireworksItem allocation ABI"); +static_assert(sizeof(FireworkChargeItem) == 0x88, "FireworkChargeItem allocation ABI"); +static_assert(sizeof(EnchantedBookItem) == 0x80, "EnchantedBookItem allocation ABI"); +static_assert(sizeof(ArmorStandItem) == 0x80, "ArmorStandItem allocation ABI"); +static_assert(sizeof(HorseArmorItem) == 0xc8, "HorseArmorItem allocation ABI"); +static_assert(sizeof(LeadItem) == 0x80, "LeadItem allocation ABI"); +static_assert(sizeof(NameTagItem) == 0x80, "NameTagItem allocation ABI"); +static_assert(sizeof(BannerItem) == 0x90, "BannerItem allocation ABI"); +static_assert(sizeof(EndCrystalItem) == 0x80, "EndCrystalItem allocation ABI"); +static_assert(sizeof(ChorusFruitItem) == 0x98, "ChorusFruitItem allocation ABI"); +static_assert(sizeof(SplashPotionItem) == 0x90, "SplashPotionItem allocation ABI"); +static_assert(sizeof(SpectralArrowItem) == 0x80, "SpectralArrowItem allocation ABI"); +static_assert(sizeof(TippedArrowItem) == 0x88, "TippedArrowItem allocation ABI"); +static_assert(sizeof(LingeringPotionItem) == 0x90, "LingeringPotionItem allocation ABI"); +static_assert(sizeof(ElytraItem) == 0x88, "ElytraItem allocation ABI"); +static_assert(sizeof(DebugFourjItem) == 0x80, "DebugFourjItem allocation ABI"); +static_assert(sizeof(RecordItem) == 0xa8, "RecordItem allocation ABI"); + +// NON_MATCHING | score: 6165 (lower is better) +void Item::staticCtor() { + registerBlock(Blocks::WATER); + registerBlock(Blocks::LAVA); + registerBlock(Blocks::COCOA); + registerBlock(Blocks::REEDS); + registerBlock(Blocks::LIT_REDSTONE_LAMP); + registerBlock(Blocks::NETHER_WART); + registerBlock(Blocks::POTATOES); + registerBlock(Blocks::CARROTS); + registerBlock(Blocks::CAKE); + registerBlock(Blocks::WHEAT); + auto* block1 = Blocks::DOUBLE_WOODEN_SLAB; + auto* item2 + = new SlabBlockItem(Blocks::DOUBLE_WOODEN_SLAB, static_cast(Blocks::WOODEN_SLAB), + static_cast(Blocks::DOUBLE_WOODEN_SLAB)); + auto* configured3 = item2->BlockItem::setDescriptionId(Blocks::DOUBLE_WOODEN_SLAB->getDescriptionId(-1)); + registerBlock(block1, configured3); + auto* block4 = Blocks::DOUBLE_STONE_SLAB; + auto* item5 + = new SlabBlockItem(Blocks::DOUBLE_STONE_SLAB, static_cast(Blocks::STONE_SLAB), + static_cast(Blocks::DOUBLE_STONE_SLAB)); + auto* configured6 = item5->BlockItem::setDescriptionId(Blocks::DOUBLE_STONE_SLAB->getDescriptionId(-1)); + registerBlock(block4, configured6); + auto* block7 = Blocks::DOUBLE_STONE_SLAB2; + auto* item8 + = new SlabBlockItem(Blocks::DOUBLE_STONE_SLAB2, static_cast(Blocks::STONE_SLAB2), + static_cast(Blocks::DOUBLE_STONE_SLAB2)); + auto* configured9 = item8->BlockItem::setDescriptionId(Blocks::DOUBLE_STONE_SLAB2->getDescriptionId(-1)); + registerBlock(block7, configured9); + registerBlock(Blocks::BED); + registerBlock(Blocks::PISTON_HEAD); + registerBlock(Blocks::REDSTONE_WIRE); + registerBlock(Blocks::STANDING_SIGN); + registerBlock(Blocks::WALL_SIGN); + registerBlock(Blocks::LIT_REDSTONE_ORE); + registerBlock(Blocks::UNLIT_REDSTONE_TORCH); + registerBlock(Blocks::UNPOWERED_REPEATER); + registerBlock(Blocks::POWERED_REPEATER); + registerBlock(Blocks::PUMPKIN_STEM); + registerBlock(Blocks::MELON_STEM); + registerBlock(Blocks::BREWING_STAND); + registerBlock(Blocks::CAULDRON); + registerBlock(Blocks::TRIPWIRE); + registerBlock(Blocks::FLOWER_POT); + registerBlock(Blocks::SKULL); + registerBlock(Blocks::UNPOWERED_COMPARATOR); + registerBlock(Blocks::POWERED_COMPARATOR); + auto* block10 = Blocks::AIR; + auto* item11 = new AirItem(Blocks::AIR); + registerBlock(block10, item11); + auto* block12 = Blocks::STONE; + auto* item13 + = new MultiBlockItem(Blocks::STONE, Blocks::STONE, StoneBlockNameResolver, StoneBlockDescResolver); + auto* configured14 = item13->BlockItem::setDescriptionId(Blocks::STONE->getDescriptionId(-1)); + registerBlock(block12, configured14); + auto* block15 = Blocks::GRASS; + auto* item16 = new TintedBlockItem(Blocks::GRASS, 0); + registerBlock(block15, item16); + auto* block17 = Blocks::DIRT; + auto* item18 = new MultiBlockItem(Blocks::DIRT, Blocks::DIRT, ItemResolvers::DirtBlockName, + ItemResolvers::DirtBlockDesc); + registerBlock(block17, item18); + registerBlock(Blocks::COBBLESTONE); + auto* block19 = Blocks::PLANKS; + auto* item20 = new MultiBlockItem(Blocks::PLANKS, Blocks::PLANKS, ItemResolvers::PlanksBlockName, 0); + auto* configured21 = item20->BlockItem::setDescriptionId(Blocks::PLANKS->getDescriptionId(-1)); + registerBlock(block19, configured21); + auto* block22 = Blocks::SAPLING; + auto* item23 = new MultiBlockItem(Blocks::SAPLING, Blocks::SAPLING, ItemResolvers::SaplingName, 0); + auto* configured24 = item23->BlockItem::setDescriptionId(Blocks::SAPLING->getDescriptionId(-1)); + registerBlock(block22, configured24); + registerBlock(Blocks::BEDROCK); + auto* block25 = Blocks::SAND; + auto* item26 = new MultiBlockItem(Blocks::SAND, Blocks::SAND, ItemResolvers::SandBlockName, + ItemResolvers::SandBlockDesc); + registerBlock(block25, item26); + registerBlock(Blocks::GRAVEL); + registerBlock(Blocks::GOLD_ORE); + registerBlock(Blocks::IRON_ORE); + registerBlock(Blocks::COAL_ORE); + auto* block27 = Blocks::LOG; + auto* item28 = new MultiBlockItem(Blocks::LOG, Blocks::LOG, ItemResolvers::LogName, 0); + auto* configured29 = item28->BlockItem::setDescriptionId(Blocks::LOG->getDescriptionId(-1)); + registerBlock(block27, configured29); + auto* block30 = Blocks::LOG2; + auto* item31 = new MultiBlockItem(Blocks::LOG2, Blocks::LOG2, ItemResolvers::Log2Name, 0); + auto* configured32 = item31->BlockItem::setDescriptionId(Blocks::LOG2->getDescriptionId(-1)); + registerBlock(block30, configured32); + auto* block33 = Blocks::LEAVES; + auto* item34 = new LeafBlockItem(Blocks::LEAVES); + auto* configured35 = item34->BlockItem::setDescriptionId(Blocks::LEAVES->getDescriptionId(-1)); + registerBlock(block33, configured35); + auto* block36 = Blocks::LEAVES2; + auto* item37 = new LeafBlockItem(Blocks::LEAVES2); + auto* configured38 = item37->BlockItem::setDescriptionId(Blocks::LEAVES2->getDescriptionId(-1)); + registerBlock(block36, configured38); + auto* block39 = Blocks::SPONGE; + auto* item40 = new MultiBlockItem(Blocks::SPONGE, Blocks::SPONGE, ItemResolvers::SpongeName, + ItemResolvers::SpongeDesc); + auto* configured41 = item40->BlockItem::setDescriptionId(Blocks::SPONGE->getDescriptionId(-1)); + registerBlock(block39, configured41); + registerBlock(Blocks::GLASS); + registerBlock(Blocks::LAPIS_ORE); + registerBlock(Blocks::LAPIS_BLOCK); + registerBlock(Blocks::DISPENSER); + auto* block42 = Blocks::SANDSTONE; + auto* item43 + = new MultiBlockItem(Blocks::SANDSTONE, Blocks::SANDSTONE, ItemResolvers::SandStoneBlockName, 0); + auto* configured44 = item43->BlockItem::setDescriptionId(Blocks::SANDSTONE->getDescriptionId(-1)); + registerBlock(block42, configured44); + registerBlock(Blocks::NOTEBLOCK); + registerBlock(Blocks::GOLDEN_RAIL); + registerBlock(Blocks::DETECTOR_RAIL); + auto* block45 = Blocks::STICKY_PISTON; + auto* item46 = new PistonBlockItem(Blocks::STICKY_PISTON); + registerBlock(block45, item46); + registerBlock(Blocks::WEB); + int tallGrassNames[] = {static_cast(StringIDs::Shrub), StringIDs::TallGrass, StringIDs::Fern}; + arrayWithLength tallGrassIds(tallGrassNames); + auto* block47 = Blocks::TALLGRASS; + auto* item48 = new TintedBlockItem(Blocks::TALLGRASS, 1); + auto* configured49 = item48->setDescriptionIds(tallGrassIds); + registerBlock(block47, configured49); + registerBlock(Blocks::DEADBUSH); + auto* block50 = Blocks::PISTON; + auto* item51 = new PistonBlockItem(Blocks::PISTON); + registerBlock(block50, item51); + auto* block52 = Blocks::WOOL; + auto* item53 = new MultiBlockItem(Blocks::WOOL, Blocks::WOOL, ItemResolvers::WoolName, 0); + auto* configured54 = item53->BlockItem::setDescriptionId(Blocks::WOOL->getDescriptionId(-1)); + registerBlock(block52, configured54); + auto* block55 = Blocks::YELLOW_FLOWER; + auto* item56 = new MultiBlockItem(Blocks::YELLOW_FLOWER, Blocks::YELLOW_FLOWER, ItemResolvers::FlowerName, + ItemResolvers::FlowerDesc); + auto* configured57 = item56->BlockItem::setDescriptionId(Blocks::YELLOW_FLOWER->getDescriptionId(-1)); + registerBlock(block55, configured57); + auto* block58 = Blocks::RED_FLOWER; + auto* item59 = new MultiBlockItem(Blocks::RED_FLOWER, Blocks::RED_FLOWER, ItemResolvers::FlowerName, + ItemResolvers::FlowerDesc); + auto* configured60 = item59->BlockItem::setDescriptionId(Blocks::RED_FLOWER->getDescriptionId(-1)); + registerBlock(block58, configured60); + registerBlock(Blocks::BROWN_MUSHROOM); + registerBlock(Blocks::RED_MUSHROOM); + registerBlock(Blocks::GOLD_BLOCK); + registerBlock(Blocks::IRON_BLOCK); + auto* block61 = Blocks::STONE_SLAB; + auto* item62 = new SlabBlockItem(Blocks::STONE_SLAB, static_cast(Blocks::STONE_SLAB), + static_cast(Blocks::DOUBLE_STONE_SLAB)); + auto* configured63 = item62->BlockItem::setDescriptionId(Blocks::STONE_SLAB->getDescriptionId(-1)); + registerBlock(block61, configured63); + registerBlock(Blocks::BRICK_BLOCK); + registerBlock(Blocks::TNT); + registerBlock(Blocks::BOOKSHELF); + registerBlock(Blocks::MOSSY_COBBLESTONE); + registerBlock(Blocks::OBSIDIAN); + registerBlock(Blocks::TORCH); + registerBlock(Blocks::MOB_SPAWNER); + registerBlock(Blocks::OAK_STAIRS); + registerBlock(Blocks::CHEST); + registerBlock(Blocks::DIAMOND_ORE); + registerBlock(Blocks::DIAMOND_BLOCK); + registerBlock(Blocks::CRAFTING_TABLE); + registerBlock(Blocks::FARMLAND); + registerBlock(Blocks::FURNACE); + registerBlock(Blocks::LIT_FURNACE); + registerBlock(Blocks::LADDER); + registerBlock(Blocks::RAIL); + registerBlock(Blocks::STONE_STAIRS); + registerBlock(Blocks::LEVER); + registerBlock(Blocks::STONE_PRESSURE_PLATE); + registerBlock(Blocks::WOODEN_PRESSURE_PLATE); + registerBlock(Blocks::REDSTONE_ORE); + registerBlock(Blocks::REDSTONE_TORCH); + registerBlock(Blocks::STONE_BUTTON); + auto* block64 = Blocks::SNOW_LAYER; + auto* item65 = new SnowItem(Blocks::SNOW_LAYER); + registerBlock(block64, item65); + registerBlock(Blocks::ICE); + registerBlock(Blocks::SNOW); + registerBlock(Blocks::CACTUS); + registerBlock(Blocks::CLAY); + registerBlock(Blocks::JUKEBOX); + registerBlock(Blocks::FENCE); + registerBlock(Blocks::SPRUCE_FENCE); + registerBlock(Blocks::BIRCH_FENCE); + registerBlock(Blocks::JUNGLE_FENCE); + registerBlock(Blocks::DARK_OAK_FENCE); + registerBlock(Blocks::ACACIA_FENCE); + registerBlock(Blocks::PUMPKIN); + registerBlock(Blocks::NETHERRACK); + registerBlock(Blocks::SOUL_SAND); + registerBlock(Blocks::GLOWSTONE); + registerBlock(Blocks::LIT_PUMPKIN); + registerBlock(Blocks::TRAPDOOR); + auto* block66 = Blocks::MONSTER_EGG; + auto* item67 + = new MultiBlockItem(Blocks::MONSTER_EGG, Blocks::MONSTER_EGG, ItemResolvers::MonsterEggBlockName, 0); + auto* configured68 = item67->BlockItem::setDescriptionId(Blocks::MONSTER_EGG->getDescriptionId(-1)); + registerBlock(block66, configured68); + auto* block69 = Blocks::STONEBRICK; + auto* item70 + = new MultiBlockItem(Blocks::STONEBRICK, Blocks::STONEBRICK, ItemResolvers::StoneBrickBlockName, 0); + auto* configured71 = item70->BlockItem::setDescriptionId(Blocks::STONEBRICK->getDescriptionId(-1)); + registerBlock(block69, configured71); + auto* block72 = Blocks::BROWN_MUSHROOM_BLOCK; + auto* item73 = new MultiBlockItem(Blocks::BROWN_MUSHROOM_BLOCK, Blocks::BROWN_MUSHROOM_BLOCK, 0, 0); + auto* configured74 + = item73->BlockItem::setDescriptionId(Blocks::BROWN_MUSHROOM_BLOCK->getDescriptionId(-1)); + registerBlock(block72, configured74); + auto* block75 = Blocks::RED_MUSHROOM_BLOCK; + auto* item76 = new MultiBlockItem(Blocks::RED_MUSHROOM_BLOCK, Blocks::RED_MUSHROOM_BLOCK, 0, 0); + auto* configured77 + = item76->BlockItem::setDescriptionId(Blocks::RED_MUSHROOM_BLOCK->getDescriptionId(-1)); + registerBlock(block75, configured77); + registerBlock(Blocks::IRON_BARS); + registerBlock(Blocks::GLASS_PANE); + registerBlock(Blocks::MELON_BLOCK); + auto* block78 = Blocks::VINE; + auto* item79 = new TintedBlockItem(Blocks::VINE, 0); + registerBlock(block78, item79); + registerBlock(Blocks::FENCE_GATE); + registerBlock(Blocks::SPRUCE_FENCE_GATE); + registerBlock(Blocks::BIRCH_FENCE_GATE); + registerBlock(Blocks::JUNGLE_FENCE_GATE); + registerBlock(Blocks::DARK_OAK_FENCE_GATE); + registerBlock(Blocks::ACACIA_FENCE_GATE); + registerBlock(Blocks::BRICK_STAIRS); + registerBlock(Blocks::STONE_BRICK_STAIRS); + registerBlock(Blocks::MYCELIUM); + auto* block80 = Blocks::WATERLILY; + auto* item81 = new WaterLilyBlockItem(Blocks::WATERLILY); + registerBlock(block80, item81); + registerBlock(Blocks::NETHER_BRICK); + registerBlock(Blocks::NETHER_BRICK_FENCE); + registerBlock(Blocks::NETHER_BRICK_STAIRS); + registerBlock(Blocks::ENCHANTING_TABLE); + registerBlock(Blocks::END_PORTAL_FRAME); + registerBlock(Blocks::END_STONE); + registerBlock(Blocks::DRAGON_EGG); + registerBlock(Blocks::REDSTONE_LAMP); + auto* block82 = Blocks::WOODEN_SLAB; + auto* item83 = new SlabBlockItem(Blocks::WOODEN_SLAB, static_cast(Blocks::WOODEN_SLAB), + static_cast(Blocks::DOUBLE_WOODEN_SLAB)); + auto* configured84 = item83->BlockItem::setDescriptionId(Blocks::WOODEN_SLAB->getDescriptionId(-1)); + registerBlock(block82, configured84); + registerBlock(Blocks::SANDSTONE_STAIRS); + registerBlock(Blocks::EMERALD_ORE); + registerBlock(Blocks::ENDER_CHEST); + registerBlock(Blocks::TRIPWIRE_HOOK); + registerBlock(Blocks::EMERALD_BLOCK); + registerBlock(Blocks::SPRUCE_STAIRS); + registerBlock(Blocks::BIRCH_STAIRS); + registerBlock(Blocks::JUNGLE_STAIRS); + registerBlock(Blocks::BEACON); + auto* block85 = Blocks::COBBLESTONE_WALL; + auto* item86 = new MultiBlockItem(Blocks::COBBLESTONE_WALL, Blocks::COBBLESTONE_WALL, + ItemResolvers::WallBlockName, 0); + auto* configured87 = item86->BlockItem::setDescriptionId(Blocks::COBBLESTONE_WALL->getDescriptionId(-1)); + registerBlock(block85, configured87); + registerBlock(Blocks::WOODEN_BUTTON); + auto* block88 = Blocks::ANVIL; + auto* item89 = new AnvilBlockItem(Blocks::ANVIL); + auto* configured90 = item89->BlockItem::setDescriptionId(Blocks::ANVIL->getDescriptionId(-1)); + registerBlock(block88, configured90); + registerBlock(Blocks::TRAPPED_CHEST); + registerBlock(Blocks::LIGHT_WEIGHTED_PRESSURE_PLATE); + registerBlock(Blocks::HEAVY_WEIGHTED_PRESSURE_PLATE); + registerBlock(Blocks::DAYLIGHT_DETECTOR); + registerBlock(Blocks::REDSTONE_BLOCK); + registerBlock(Blocks::QUARTZ_ORE); + registerBlock(Blocks::HOPPER); + auto* block91 = Blocks::QUARTZ_BLOCK; + auto* item92 + = new MultiBlockItem(Blocks::QUARTZ_BLOCK, Blocks::QUARTZ_BLOCK, ItemResolvers::AnvilName, 0); + auto* configured93 = item92->BlockItem::setDescriptionId(Blocks::QUARTZ_BLOCK->getDescriptionId(-1)); + registerBlock(block91, configured93); + registerBlock(Blocks::QUARTZ_STAIRS); + registerBlock(Blocks::ACTIVATOR_RAIL); + registerBlock(Blocks::DROPPER); + auto* block94 = Blocks::STAINED_HARDENED_CLAY; + auto* item95 = new MultiBlockItem(Blocks::STAINED_HARDENED_CLAY, Blocks::STAINED_HARDENED_CLAY, + ItemResolvers::StainedClayName, 0); + auto* configured96 + = item95->BlockItem::setDescriptionId(Blocks::STAINED_HARDENED_CLAY->getDescriptionId(-1)); + registerBlock(block94, configured96); + registerBlock(Blocks::BARRIER); + registerBlock(Blocks::IRON_TRAPDOOR); + registerBlock(Blocks::HAY_BLOCK); + auto* block97 = Blocks::CARPET; + auto* item98 = new MultiBlockItem(Blocks::CARPET, Blocks::CARPET, ItemResolvers::StainedGlassPaneName, 0); + auto* configured99 = item98->BlockItem::setDescriptionId(Blocks::CARPET->getDescriptionId(-1)); + registerBlock(block97, configured99); + registerBlock(Blocks::HARDENED_CLAY); + registerBlock(Blocks::COAL_BLOCK); + registerBlock(Blocks::PACKED_ICE); + registerBlock(Blocks::ACACIA_STAIRS); + registerBlock(Blocks::DARK_OAK_STAIRS); + registerBlock(Blocks::SLIME); + auto* block100 = Blocks::DOUBLE_PLANT; + auto* item101 + = new MultiBlockItem(Blocks::DOUBLE_PLANT, Blocks::DOUBLE_PLANT, ItemResolvers::DoublePlantBlockName, + ItemResolvers::DoublePlantBlockDesc); + auto* configured102 = item101->BlockItem::setDescriptionId(Blocks::DOUBLE_PLANT->getDescriptionId(-1)); + registerBlock(block100, configured102); + auto* block103 = Blocks::STAINED_GLASS; + auto* item104 + = new MultiBlockItem(Blocks::STAINED_GLASS, Blocks::STAINED_GLASS, ItemResolvers::CarpetName, 0); + auto* configured105 = item104->BlockItem::setDescriptionId(Blocks::STAINED_GLASS->getDescriptionId(-1)); + registerBlock(block103, configured105); + auto* block106 = Blocks::STAINED_GLASS_PANE; + auto* item107 = new MultiBlockItem(Blocks::STAINED_GLASS_PANE, Blocks::STAINED_GLASS_PANE, + ItemResolvers::StainedGlassName, 0); + auto* configured108 + = item107->BlockItem::setDescriptionId(Blocks::STAINED_GLASS_PANE->getDescriptionId(-1)); + registerBlock(block106, configured108); + auto* block109 = Blocks::PRISMARINE; + auto* item110 + = new MultiBlockItem(Blocks::PRISMARINE, Blocks::PRISMARINE, ItemResolvers::PrismarineBlockName, + ItemResolvers::PrismarineBlockDesc); + auto* configured111 = item110->BlockItem::setDescriptionId(Blocks::PRISMARINE->getDescriptionId(-1)); + configured111->setBaseItemTypeAndMaterial(0x14, 0x36); + registerBlock(block109, configured111); + registerBlock(Blocks::SEA_LANTERN); + auto* block112 = Blocks::RED_SANDSTONE; + auto* item113 = new MultiBlockItem(Blocks::RED_SANDSTONE, Blocks::RED_SANDSTONE, + ItemResolvers::RedSandStoneBlockName, 0); + auto* configured114 = item113->BlockItem::setDescriptionId(Blocks::RED_SANDSTONE->getDescriptionId(-1)); + registerBlock(block112, configured114); + registerBlock(Blocks::RED_SANDSTONE_STAIRS); + auto* block115 = Blocks::STONE_SLAB2; + auto* item116 = new SlabBlockItem(Blocks::STONE_SLAB2, static_cast(Blocks::STONE_SLAB2), + static_cast(Blocks::DOUBLE_STONE_SLAB2)); + auto* configured117 = item116->BlockItem::setDescriptionId(Blocks::STONE_SLAB2->getDescriptionId(-1)); + registerBlock(block115, configured117); + registerBlock(Blocks::END_BRICKS); + registerBlock(Blocks::BEETROOTS); + registerBlock(Blocks::GRASS_PATH); + registerBlock(Blocks::FROSTED_ICE); + registerBlock(Blocks::MAGMA); + registerBlock(Blocks::NETHER_WART_BLOCK); + registerBlock(Blocks::RED_NETHER_BRICK); + registerBlock(Blocks::BONE_BLOCK); + registerBlock(Blocks::END_ROD); + registerBlock(Blocks::CHORUS_PLANT); + registerBlock(Blocks::CHORUS_FLOWER); + registerBlock(Blocks::PURPUR_BLOCK); + registerBlock(Blocks::PURPUR_PILLAR); + registerBlock(Blocks::PURPUR_STAIRS); + auto* block118 = Blocks::PURPUR_SLAB; + auto* item119 = new SlabBlockItem(Blocks::PURPUR_SLAB, static_cast(Blocks::PURPUR_SLAB), + static_cast(Blocks::PURPUR_DOUBLE_SLAB)); + auto* configured120 = item119->BlockItem::setDescriptionId(Blocks::PURPUR_SLAB->getDescriptionId(-1)); + registerBlock(block118, configured120); + registerBlock(Blocks::OBSERVER); + auto* block121 = Blocks::WHITE_SHULKER_BOX; + auto* item122 = new ShulkerBoxBlockItem(Blocks::WHITE_SHULKER_BOX); + registerBlock(block121, item122); + auto* block123 = Blocks::ORANGE_SHULKER_BOX; + auto* item124 = new ShulkerBoxBlockItem(Blocks::ORANGE_SHULKER_BOX); + registerBlock(block123, item124); + auto* block125 = Blocks::MAGENTA_SHULKER_BOX; + auto* item126 = new ShulkerBoxBlockItem(Blocks::MAGENTA_SHULKER_BOX); + registerBlock(block125, item126); + auto* block127 = Blocks::LIGHT_BLUE_SHULKER_BOX; + auto* item128 = new ShulkerBoxBlockItem(Blocks::LIGHT_BLUE_SHULKER_BOX); + registerBlock(block127, item128); + auto* block129 = Blocks::YELLOW_SHULKER_BOX; + auto* item130 = new ShulkerBoxBlockItem(Blocks::YELLOW_SHULKER_BOX); + registerBlock(block129, item130); + auto* block131 = Blocks::LIME_SHULKER_BOX; + auto* item132 = new ShulkerBoxBlockItem(Blocks::LIME_SHULKER_BOX); + registerBlock(block131, item132); + auto* block133 = Blocks::PINK_SHULKER_BOX; + auto* item134 = new ShulkerBoxBlockItem(Blocks::PINK_SHULKER_BOX); + registerBlock(block133, item134); + auto* block135 = Blocks::GRAY_SHULKER_BOX; + auto* item136 = new ShulkerBoxBlockItem(Blocks::GRAY_SHULKER_BOX); + registerBlock(block135, item136); + auto* block137 = Blocks::SILVER_SHULKER_BOX; + auto* item138 = new ShulkerBoxBlockItem(Blocks::SILVER_SHULKER_BOX); + registerBlock(block137, item138); + auto* block139 = Blocks::CYAN_SHULKER_BOX; + auto* item140 = new ShulkerBoxBlockItem(Blocks::CYAN_SHULKER_BOX); + registerBlock(block139, item140); + auto* block141 = Blocks::PURPLE_SHULKER_BOX; + auto* item142 = new ShulkerBoxBlockItem(Blocks::PURPLE_SHULKER_BOX); + registerBlock(block141, item142); + auto* block143 = Blocks::BLUE_SHULKER_BOX; + auto* item144 = new ShulkerBoxBlockItem(Blocks::BLUE_SHULKER_BOX); + registerBlock(block143, item144); + auto* block145 = Blocks::BROWN_SHULKER_BOX; + auto* item146 = new ShulkerBoxBlockItem(Blocks::BROWN_SHULKER_BOX); + registerBlock(block145, item146); + auto* block147 = Blocks::GREEN_SHULKER_BOX; + auto* item148 = new ShulkerBoxBlockItem(Blocks::GREEN_SHULKER_BOX); + registerBlock(block147, item148); + auto* block149 = Blocks::RED_SHULKER_BOX; + auto* item150 = new ShulkerBoxBlockItem(Blocks::RED_SHULKER_BOX); + registerBlock(block149, item150); + auto* block151 = Blocks::BLACK_SHULKER_BOX; + auto* item152 = new ShulkerBoxBlockItem(Blocks::BLACK_SHULKER_BOX); + registerBlock(block151, item152); + registerBlock(Blocks::WHITE_GLAZED_TERRACOTTA); + registerBlock(Blocks::ORANGE_GLAZED_TERRACOTTA); + registerBlock(Blocks::MAGENTA_GLAZED_TERRACOTTA); + registerBlock(Blocks::LIGHT_BLUE_GLAZED_TERRACOTTA); + registerBlock(Blocks::YELLOW_GLAZED_TERRACOTTA); + registerBlock(Blocks::LIME_GLAZED_TERRACOTTA); + registerBlock(Blocks::PINK_GLAZED_TERRACOTTA); + registerBlock(Blocks::GRAY_GLAZED_TERRACOTTA); + registerBlock(Blocks::SILVER_GLAZED_TERRACOTTA); + registerBlock(Blocks::CYAN_GLAZED_TERRACOTTA); + registerBlock(Blocks::PURPLE_GLAZED_TERRACOTTA); + registerBlock(Blocks::BLUE_GLAZED_TERRACOTTA); + registerBlock(Blocks::BROWN_GLAZED_TERRACOTTA); + registerBlock(Blocks::GREEN_GLAZED_TERRACOTTA); + registerBlock(Blocks::RED_GLAZED_TERRACOTTA); + registerBlock(Blocks::BLACK_GLAZED_TERRACOTTA); + auto* block153 = Blocks::CONCRETE; + auto* item154 = new MultiBlockItem(Blocks::CONCRETE, Blocks::CONCRETE, ItemResolvers::ConcreteName, 0); + auto* configured155 = item154->BlockItem::setDescriptionId(Blocks::CONCRETE->getDescriptionId(-1)); + registerBlock(block153, configured155); + auto* block156 = Blocks::CONCRETE_POWDER; + auto* item157 = new MultiBlockItem(Blocks::CONCRETE_POWDER, Blocks::CONCRETE_POWDER, + ItemResolvers::ConcretePowderName, 0); + auto* configured158 = item157->BlockItem::setDescriptionId(Blocks::CONCRETE_POWDER->getDescriptionId(-1)); + registerBlock(block156, configured158); + { + std::wstring name(L"iron_shovel"); + auto* item159 = new ShovelItem(Item::Tier::IRON); + std::wstring icon(L"shovelIron"); + auto* configured160 = item159->setIconName(icon); + configured160->setBaseItemTypeAndMaterial(2, 3); + item159->setDescriptionId(StringIDs::IronShovel, StringIDs::UsedToDigDirtGrassSandGravelAnd); + registerItem(0x100, name, item159); + } + { + std::wstring name(L"iron_pickaxe"); + auto* item161 = new PickaxeItem(Item::Tier::IRON); + std::wstring icon(L"pickaxeIron"); + auto* configured162 = item161->setIconName(icon); + auto* configured163 = configured162->setBaseItemTypeAndMaterial(3, 3); + configured163->setDescriptionId(StringIDs::IronPickaxe, + StringIDs::RequiredToMineStoneRelatedBlocksAndOre); + registerItem(0x101, name, item161); + } + { + std::wstring name(L"iron_axe"); + auto* item164 = new AxeItem(Item::Tier::IRON); + std::wstring icon(L"hatchetIron"); + auto* configured165 = item164->setIconName(icon); + configured165->setBaseItemTypeAndMaterial(4, 3); + item164->setDescriptionId(StringIDs::IronAxe, StringIDs::UsedToChopWoodRelatedBlocksFasterThan); + registerItem(0x102, name, item164); + } + { + std::wstring name(L"flint_and_steel"); + auto* item166 = new FlintAndSteelItem(); + std::wstring icon(L"flintAndSteel"); + auto* configured167 = item166->setIconName(icon); + auto* configured168 = configured167->setBaseItemTypeAndMaterial(0x1c, 0x1a); + configured168->setDescriptionId(StringIDs::FlintAndSteel, + StringIDs::UsedToCreateFireIgniteTntAndCreepers); + registerItem(0x103, name, item166); + } + { + std::wstring name(L"apple"); + auto* item169 = new FoodItem(4, 0.3f, 0); + std::wstring icon(L"apple"); + auto* configured170 = item169->setIconName(icon); + configured170->setDescriptionId(StringIDs::Apple, StringIDs::Restores2IconShank01AndCanBe); + registerItem(0x104, name, item169); + } + { + std::wstring name(L"bow"); + auto* item171 = new BowItem(); + std::wstring icon(L"bow"); + auto* configured172 = item171->setIconName(icon); + auto* configured173 = configured172->setBaseItemTypeAndMaterial(0x18, 0x11); + configured173->setDescriptionId(StringIDs::Bow, 0x7341480); + registerItem(0x105, name, item171); + } + { + std::wstring name(L"arrow"); + auto* item174 = new ArrowItem(); + std::wstring icon(L"arrow"); + auto* configured175 = item174->setIconName(icon); + auto* configured176 = configured175->setBaseItemTypeAndMaterial(0x18, 0x12); + auto* configured177 + = configured176->setDescriptionId(StringIDs::Arrow, StringIDs::UsedAsAmmunitionForBows); + configured177->setFlag78(1); + registerItem(0x106, name, item174); + } + { + std::wstring name(L"coal"); + auto* item178 = new CoalItem(); + std::wstring icon(L"coal"); + auto* configured179 = item178->setIconName(icon); + auto* configured180 = configured179->setBaseItemTypeAndMaterial(0x1f, 0x31); + configured180->setDescriptionId(StringIDs::Coal, StringIDs::UsedAsAFuelInAFurnaceOr); + registerItem(0x107, name, item178); + } + { + std::wstring name(L"diamond"); + auto* item181 = new Item(); + std::wstring icon(L"diamond"); + item181->setIconName(icon); + auto* configured182 = item181->setBaseItemTypeAndMaterial(0x1f, 5); + configured182->setDescriptionId(StringIDs::Diamond, StringIDs::UseseToCreateVeryStrongToolsWeaponsOr); + registerItem(0x108, name, item181); + } + { + std::wstring name(L"iron_ingot"); + auto* item183 = new Item(); + std::wstring icon(L"ingotIron"); + auto* configured184 = item183->setIconName(icon); + configured184->setBaseItemTypeAndMaterial(0x1f, 3); + item183->setDescriptionId(StringIDs::IronIngot, StringIDs::AShinyIngotWhichCanBeUsedTo); + registerItem(0x109, name, item183); + } + { + std::wstring name(L"gold_ingot"); + auto* item185 = new Item(); + std::wstring icon(L"ingotGold"); + auto* configured186 = item185->setIconName(icon); + auto* configured187 = configured186->setBaseItemTypeAndMaterial(0x1f, 4); + configured187->setDescriptionId(StringIDs::GoldIngot, StringIDs::AShinyIngotWhichCanBeUsedTo); + registerItem(0x10a, name, item185); + } + { + std::wstring name(L"iron_sword"); + auto* item188 = new SwordItem(Item::Tier::IRON); + std::wstring icon(L"swordIron"); + auto* configured189 = item188->setIconName(icon); + auto* configured190 = configured189->setBaseItemTypeAndMaterial(1, 3); + configured190->setDescriptionId(StringIDs::IronSword, StringIDs::DealsMoreDamageThanByHand); + registerItem(0x10b, name, item188); + } + { + std::wstring name(L"wooden_sword"); + auto* item191 = new SwordItem(Item::Tier::WOOD); + std::wstring icon(L"swordWood"); + auto* configured192 = item191->setIconName(icon); + auto* configured193 = configured192->setBaseItemTypeAndMaterial(1, 1); + configured193->setDescriptionId(StringIDs::WoodenSword, StringIDs::DealsMoreDamageThanByHand); + registerItem(0x10c, name, item191); + } + { + std::wstring name(L"wooden_shovel"); + auto* item194 = new ShovelItem(Item::Tier::WOOD); + std::wstring icon(L"shovelWood"); + auto* configured195 = item194->setIconName(icon); + auto* configured196 = configured195->setBaseItemTypeAndMaterial(2, 1); + configured196->setDescriptionId(0xc9b0da1, StringIDs::UsedToDigDirtGrassSandGravelAnd); + registerItem(0x10d, name, item194); + } + { + std::wstring name(L"wooden_pickaxe"); + auto* item197 = new PickaxeItem(Item::Tier::WOOD); + std::wstring icon(L"pickaxeWood"); + auto* configured198 = item197->setIconName(icon); + auto* configured199 = configured198->setBaseItemTypeAndMaterial(3, 1); + configured199->setDescriptionId(StringIDs::WoodenPickaxe, + StringIDs::RequiredToMineStoneRelatedBlocksAndOre); + registerItem(0x10e, name, item197); + } + { + std::wstring name(L"wooden_axe"); + auto* item200 = new AxeItem(Item::Tier::WOOD); + std::wstring icon(L"hatchetWood"); + auto* configured201 = item200->setIconName(icon); + auto* configured202 = configured201->setBaseItemTypeAndMaterial(4, 1); + configured202->setDescriptionId(StringIDs::WoodenAxe, + StringIDs::UsedToChopWoodRelatedBlocksFasterThan); + registerItem(0x10f, name, item200); + } + { + std::wstring name(L"stone_sword"); + auto* item203 = new SwordItem(Item::Tier::STONE); + std::wstring icon(L"swordStone"); + auto* configured204 = item203->setIconName(icon); + auto* configured205 = configured204->setBaseItemTypeAndMaterial(1, 2); + configured205->setDescriptionId(StringIDs::StoneSword, StringIDs::DealsMoreDamageThanByHand); + registerItem(0x110, name, item203); + } + { + std::wstring name(L"stone_shovel"); + auto* item206 = new ShovelItem(Item::Tier::STONE); + std::wstring icon(L"shovelStone"); + auto* configured207 = item206->setIconName(icon); + auto* configured208 = configured207->setBaseItemTypeAndMaterial(2, 2); + configured208->setDescriptionId(StringIDs::StoneShovel, StringIDs::UsedToDigDirtGrassSandGravelAnd); + registerItem(0x111, name, item206); + } + { + std::wstring name(L"stone_pickaxe"); + auto* item209 = new PickaxeItem(Item::Tier::STONE); + std::wstring icon(L"pickaxeStone"); + auto* configured210 = item209->setIconName(icon); + auto* configured211 = configured210->setBaseItemTypeAndMaterial(3, 2); + configured211->setDescriptionId(StringIDs::StonePickaxe, + StringIDs::RequiredToMineStoneRelatedBlocksAndOre); + registerItem(0x112, name, item209); + } + { + std::wstring name(L"stone_axe"); + auto* item212 = new AxeItem(Item::Tier::STONE); + std::wstring icon(L"hatchetStone"); + auto* configured213 = item212->setIconName(icon); + auto* configured214 = configured213->setBaseItemTypeAndMaterial(4, 2); + configured214->setDescriptionId(StringIDs::StoneAxe, + StringIDs::UsedToChopWoodRelatedBlocksFasterThan); + registerItem(0x113, name, item212); + } + { + std::wstring name(L"diamond_sword"); + auto* item215 = new SwordItem(Item::Tier::DIAMOND); + std::wstring icon(L"swordDiamond"); + auto* configured216 = item215->setIconName(icon); + auto* configured217 = configured216->setBaseItemTypeAndMaterial(1, 5); + configured217->setDescriptionId(StringIDs::DiamondSword, StringIDs::DealsMoreDamageThanByHand); + registerItem(0x114, name, item215); + } + { + std::wstring name(L"diamond_shovel"); + auto* item218 = new ShovelItem(Item::Tier::DIAMOND); + std::wstring icon(L"shovelDiamond"); + auto* configured219 = item218->setIconName(icon); + auto* configured220 = configured219->setBaseItemTypeAndMaterial(2, 5); + configured220->setDescriptionId(StringIDs::DiamondShovel, StringIDs::UsedToDigDirtGrassSandGravelAnd); + registerItem(0x115, name, item218); + } + { + std::wstring name(L"diamond_pickaxe"); + auto* item221 = new PickaxeItem(Item::Tier::DIAMOND); + std::wstring icon(L"pickaxeDiamond"); + auto* configured222 = item221->setIconName(icon); + auto* configured223 = configured222->setBaseItemTypeAndMaterial(3, 5); + configured223->setDescriptionId(StringIDs::DiamondPickaxe, + StringIDs::RequiredToMineStoneRelatedBlocksAndOre); + registerItem(0x116, name, item221); + } + { + std::wstring name(L"diamond_axe"); + auto* item224 = new AxeItem(Item::Tier::DIAMOND); + std::wstring icon(L"hatchetDiamond"); + auto* configured225 = item224->setIconName(icon); + auto* configured226 = configured225->setBaseItemTypeAndMaterial(4, 5); + configured226->setDescriptionId(StringIDs::DiamondAxe, + StringIDs::UsedToChopWoodRelatedBlocksFasterThan); + registerItem(0x117, name, item224); + } + { + std::wstring name(L"stick"); + auto* item227 = new Item(); + std::wstring icon(L"stick"); + auto* configured228 = item227->setIconName(icon); + auto* configured229 = configured228->setHandEquipped(); + auto* configured230 = configured229->setDescriptionId( + StringIDs::Stick, StringIDs::UsedToCraftTorchesArrowsSignsLaddersFences); + configured230->setBaseItemTypeAndMaterial(0x30, 1); + registerItem(0x118, name, item227); + } + { + std::wstring name(L"bowl"); + auto* item231 = new Item(); + std::wstring icon(L"bowl"); + auto* configured232 = item231->setIconName(icon); + auto* configured233 = configured232->setBaseItemTypeAndMaterial(0x1a, 1); + auto* configured234 = configured233->setDescriptionId( + StringIDs::Bowl, StringIDs::UsedToHoldMushroomStewAndBeetrootSoup); + configured234->setMaxStackSize(0x40); + registerItem(0x119, name, item231); + } + { + std::wstring name(L"mushroom_stew"); + auto* item235 = new BowlFoodItem(6); + std::wstring icon(L"mushroomStew"); + auto* configured236 = item235->setIconName(icon); + auto* configured237 = configured236->setBaseItemTypeAndMaterial(0x27, 0); + configured237->setDescriptionId(StringIDs::MushroomStew, StringIDs::Restores3IconShank01); + registerItem(0x11a, name, item235); + } + { + std::wstring name(L"golden_sword"); + auto* item238 = new SwordItem(Item::Tier::GOLD); + std::wstring icon(L"swordGold"); + auto* configured239 = item238->setIconName(icon); + auto* configured240 = configured239->setBaseItemTypeAndMaterial(1, 4); + configured240->setDescriptionId(StringIDs::GoldenSword, StringIDs::DealsMoreDamageThanByHand); + registerItem(0x11b, name, item238); + } + { + std::wstring name(L"golden_shovel"); + auto* item241 = new ShovelItem(Item::Tier::GOLD); + std::wstring icon(L"shovelGold"); + auto* configured242 = item241->setIconName(icon); + auto* configured243 = configured242->setBaseItemTypeAndMaterial(2, 4); + configured243->setDescriptionId(StringIDs::GoldenShovel, StringIDs::UsedToDigDirtGrassSandGravelAnd); + registerItem(0x11c, name, item241); + } + { + std::wstring name(L"golden_pickaxe"); + auto* item244 = new PickaxeItem(Item::Tier::GOLD); + std::wstring icon(L"pickaxeGold"); + auto* configured245 = item244->setIconName(icon); + auto* configured246 = configured245->setBaseItemTypeAndMaterial(3, 4); + configured246->setDescriptionId(StringIDs::GoldenPickaxe, + StringIDs::RequiredToMineStoneRelatedBlocksAndOre); + registerItem(0x11d, name, item244); + } + { + std::wstring name(L"golden_axe"); + auto* item247 = new AxeItem(Item::Tier::GOLD); + std::wstring icon(L"hatchetGold"); + auto* configured248 = item247->setIconName(icon); + auto* configured249 = configured248->setBaseItemTypeAndMaterial(4, 4); + configured249->setDescriptionId(StringIDs::GoldenAxe, + StringIDs::UsedToChopWoodRelatedBlocksFasterThan); + registerItem(0x11e, name, item247); + } + { + std::wstring name(L"string"); + auto* item250 = new BlockPlanterItem(Blocks::TRIPWIRE); + std::wstring icon(L"string"); + auto* configured251 = item250->setIconName(icon); + configured251->setDescriptionId(StringIDs::String, StringIDs::CollectedByKillingASpiderCanBeCrafted); + registerItem(0x11f, name, item250); + } + { + std::wstring name(L"feather"); + auto* item252 = new Item(); + std::wstring icon(L"feather"); + auto* configured253 = item252->setIconName(icon); + configured253->setDescriptionId(StringIDs::Feather, + StringIDs::CollectedByKillingAChickenCanBeCrafted); + registerItem(0x120, name, item252); + } + { + std::wstring name(L"gunpowder"); + auto* item254 = new Item(); + std::wstring icon(L"sulphur"); + auto* configured255 = item254->setIconName(icon); + configured255->setDescriptionId(StringIDs::Gunpowder, + StringIDs::CollectedByKillingACreeperCanBeCrafted); + registerItem(0x121, name, item254); + } + { + std::wstring name(L"wooden_hoe"); + auto* item256 = new HoeItem(Item::Tier::WOOD); + std::wstring icon(L"hoeWood"); + auto* configured257 = item256->setIconName(icon); + configured257->setBaseItemTypeAndMaterial(5, 1); + item256->setDescriptionId(StringIDs::WoodenHoe, StringIDs::UsedToTillDirtAndGrassBlocksTo); + registerItem(0x122, name, item256); + } + { + std::wstring name(L"stone_hoe"); + auto* item258 = new HoeItem(Item::Tier::STONE); + std::wstring icon(L"hoeStone"); + auto* configured259 = item258->setIconName(icon); + auto* configured260 = configured259->setBaseItemTypeAndMaterial(5, 2); + configured260->setDescriptionId(StringIDs::StoneHoe, StringIDs::UsedToTillDirtAndGrassBlocksTo); + registerItem(0x123, name, item258); + } + { + std::wstring name(L"iron_hoe"); + auto* item261 = new HoeItem(Item::Tier::IRON); + std::wstring icon(L"hoeIron"); + auto* configured262 = item261->setIconName(icon); + auto* configured263 = configured262->setBaseItemTypeAndMaterial(5, 3); + configured263->setDescriptionId(StringIDs::IronHoe, StringIDs::UsedToTillDirtAndGrassBlocksTo); + registerItem(0x124, name, item261); + } + { + std::wstring name(L"diamond_hoe"); + auto* item264 = new HoeItem(Item::Tier::DIAMOND); + std::wstring icon(L"hoeDiamond"); + auto* configured265 = item264->setIconName(icon); + auto* configured266 = configured265->setBaseItemTypeAndMaterial(5, 5); + configured266->setDescriptionId(StringIDs::DiamondHoe, StringIDs::UsedToTillDirtAndGrassBlocksTo); + registerItem(0x125, name, item264); + } + { + std::wstring name(L"golden_hoe"); + auto* item267 = new HoeItem(Item::Tier::GOLD); + std::wstring icon(L"hoeGold"); + auto* configured268 = item267->setIconName(icon); + auto* configured269 = configured268->setBaseItemTypeAndMaterial(5, 4); + configured269->setDescriptionId(0xf2c415b, StringIDs::UsedToTillDirtAndGrassBlocksTo); + registerItem(0x126, name, item267); + } + { + std::wstring name(L"wheat_seeds"); + auto* item270 = new SeedItem(Blocks::WHEAT, Blocks::FARMLAND); + std::wstring icon(L"seeds"); + auto* configured271 = item270->setIconName(icon); + configured271->setDescriptionId(StringIDs::Seeds, StringIDs::CanBePlantedInFarmlandToGrowCrops); + registerItem(0x127, name, item270); + } + { + std::wstring name(L"wheat"); + auto* item272 = new Item(); + std::wstring icon(L"wheat"); + auto* configured273 = item272->setIconName(icon); + auto* configured274 = configured273->setBaseItemTypeAndMaterial(0x1f, 0x35); + configured274->setDescriptionId(StringIDs::Wheat, StringIDs::HarvestedFromCropsCanBeUsedToCraft); + registerItem(0x128, name, item272); + } + { + std::wstring name(L"bread"); + auto* item275 = new FoodItem(5, 0.6f, 0); + std::wstring icon(L"bread"); + auto* configured276 = item275->setIconName(icon); + configured276->setDescriptionId(StringIDs::Bread, StringIDs::Restores25IconShank01); + registerItem(0x129, name, item275); + } + { + std::wstring name(L"leather_helmet"); + auto* item277 = new ArmorItem(ArmorItem::ArmorMaterial::LEATHER, 0, EquipmentSlot::HEAD); + std::wstring icon(L"helmetCloth"); + auto* configured278 = item277->setIconName(icon); + auto* configured279 = configured278->setBaseItemTypeAndMaterial(7, 6); + configured279->setDescriptionId(StringIDs::LeatherCap, StringIDs::GivesUser05IconArmor01WhenWorn_3); + registerItem(0x12a, name, item277); + } + { + std::wstring name(L"leather_chestplate"); + auto* item280 = new ArmorItem(ArmorItem::ArmorMaterial::LEATHER, 0, EquipmentSlot::CHEST); + std::wstring icon(L"chestplateCloth"); + auto* configured281 = item280->setIconName(icon); + auto* configured282 = configured281->setBaseItemTypeAndMaterial(8, 6); + configured282->setDescriptionId(StringIDs::LeatherTunic, 0x5e7b53b); + registerItem(299, name, item280); + } + { + std::wstring name(L"leather_leggings"); + auto* item283 = new ArmorItem(ArmorItem::ArmorMaterial::LEATHER, 0, EquipmentSlot::LEGS); + std::wstring icon(L"leggingsCloth"); + auto* configured284 = item283->setIconName(icon); + auto* configured285 = configured284->setBaseItemTypeAndMaterial(9, 6); + configured285->setDescriptionId(StringIDs::LeatherPants, 0xf1b63f4); + registerItem(300, name, item283); + } + { + std::wstring name(L"leather_boots"); + auto* item286 = new ArmorItem(ArmorItem::ArmorMaterial::LEATHER, 0, EquipmentSlot::FEET); + std::wstring icon(L"bootsCloth"); + item286->setIconName(icon); + auto* configured287 = item286->setBaseItemTypeAndMaterial(10, 6); + configured287->setDescriptionId(StringIDs::LeatherBoots, StringIDs::GivesUser05IconArmor01WhenWorn_2); + registerItem(0x12d, name, item286); + } + { + std::wstring name(L"chainmail_helmet"); + auto* item288 = new ArmorItem(ArmorItem::ArmorMaterial::CHAIN, 1, EquipmentSlot::HEAD); + std::wstring icon(L"helmetChain"); + auto* configured289 = item288->setIconName(icon); + auto* configured290 = configured289->setBaseItemTypeAndMaterial(7, 7); + configured290->setDescriptionId(0x7003b21, StringIDs::GivesUser1IconArmor01WhenWorn_1); + registerItem(0x12e, name, item288); + } + { + std::wstring name(L"chainmail_chestplate"); + auto* item291 = new ArmorItem(ArmorItem::ArmorMaterial::CHAIN, 1, EquipmentSlot::CHEST); + std::wstring icon(L"chestplateChain"); + auto* configured292 = item291->setIconName(icon); + auto* configured293 = configured292->setBaseItemTypeAndMaterial(8, 7); + configured293->setDescriptionId(0x128eb51, StringIDs::GivesUser25IconArmor01WhenWorn); + registerItem(0x12f, name, item291); + } + { + std::wstring name(L"chainmail_leggings"); + auto* item294 = new ArmorItem(ArmorItem::ArmorMaterial::CHAIN, 1, EquipmentSlot::LEGS); + std::wstring icon(L"leggingsChain"); + auto* configured295 = item294->setIconName(icon); + auto* configured296 = configured295->setBaseItemTypeAndMaterial(9, 7); + configured296->setDescriptionId(StringIDs::ChainLeggings, StringIDs::GivesUser2IconArmor01WhenWorn); + registerItem(0x130, name, item294); + } + { + std::wstring name(L"chainmail_boots"); + auto* item297 = new ArmorItem(ArmorItem::ArmorMaterial::CHAIN, 1, EquipmentSlot::FEET); + std::wstring icon(L"bootsChain"); + auto* configured298 = item297->setIconName(icon); + auto* configured299 = configured298->setBaseItemTypeAndMaterial(10, 7); + configured299->setDescriptionId(StringIDs::ChainBoots, StringIDs::GivesUser05IconArmor01WhenWorn); + registerItem(0x131, name, item297); + } + { + std::wstring name(L"iron_helmet"); + auto* item300 = new ArmorItem(ArmorItem::ArmorMaterial::IRON, 2, EquipmentSlot::HEAD); + std::wstring icon(L"helmetIron"); + auto* configured301 = item300->setIconName(icon); + auto* configured302 = configured301->setBaseItemTypeAndMaterial(7, 3); + configured302->setDescriptionId(0xd8ed8c6, StringIDs::GivesUser1IconArmor01WhenWorn_3); + registerItem(0x132, name, item300); + } + { + std::wstring name(L"iron_chestplate"); + auto* item303 = new ArmorItem(ArmorItem::ArmorMaterial::IRON, 2, EquipmentSlot::CHEST); + std::wstring icon(L"chestplateIron"); + auto* configured304 = item303->setIconName(icon); + auto* configured305 = configured304->setBaseItemTypeAndMaterial(8, 3); + configured305->setDescriptionId(StringIDs::IronChestplate, 0x9958b2a); + registerItem(0x133, name, item303); + } + { + std::wstring name(L"iron_leggings"); + auto* item306 = new ArmorItem(ArmorItem::ArmorMaterial::IRON, 2, EquipmentSlot::LEGS); + std::wstring icon(L"leggingsIron"); + auto* configured307 = item306->setIconName(icon); + auto* configured308 = configured307->setBaseItemTypeAndMaterial(9, 3); + configured308->setDescriptionId(StringIDs::IronLeggings, 0xfa8857d); + registerItem(0x134, name, item306); + } + { + std::wstring name(L"iron_boots"); + auto* item309 = new ArmorItem(ArmorItem::ArmorMaterial::IRON, 2, EquipmentSlot::FEET); + std::wstring icon(L"bootsIron"); + auto* configured310 = item309->setIconName(icon); + auto* configured311 = configured310->setBaseItemTypeAndMaterial(10, 3); + configured311->setDescriptionId(StringIDs::IronBoots, StringIDs::GivesUser1IconArmor01WhenWorn); + registerItem(0x135, name, item309); + } + { + std::wstring name(L"diamond_helmet"); + auto* item312 = new ArmorItem(ArmorItem::ArmorMaterial::DIAMOND, 3, EquipmentSlot::HEAD); + std::wstring icon(L"helmetDiamond"); + auto* configured313 = item312->setIconName(icon); + auto* configured314 = configured313->setBaseItemTypeAndMaterial(7, 5); + configured314->setDescriptionId(0x1a29bf8, StringIDs::GivesUser15IconArmor01WhenWorn_2); + registerItem(0x136, name, item312); + } + { + std::wstring name(L"diamond_chestplate"); + auto* item315 = new ArmorItem(ArmorItem::ArmorMaterial::DIAMOND, 3, EquipmentSlot::CHEST); + std::wstring icon(L"chestplateDiamond"); + auto* configured316 = item315->setIconName(icon); + auto* configured317 = configured316->setBaseItemTypeAndMaterial(8, 5); + configured317->setDescriptionId(StringIDs::DiamondChestplate, + StringIDs::GivesUser4IconArmor01WhenWorn); + registerItem(0x137, name, item315); + } + { + std::wstring name(L"diamond_leggings"); + auto* item318 = new ArmorItem(ArmorItem::ArmorMaterial::DIAMOND, 3, EquipmentSlot::LEGS); + std::wstring icon(L"leggingsDiamond"); + auto* configured319 = item318->setIconName(icon); + auto* configured320 = configured319->setBaseItemTypeAndMaterial(9, 5); + configured320->setDescriptionId(StringIDs::DiamondLeggings, + StringIDs::GivesUser3IconArmor01WhenWorn_1); + registerItem(0x138, name, item318); + } + { + std::wstring name(L"diamond_boots"); + auto* item321 = new ArmorItem(ArmorItem::ArmorMaterial::DIAMOND, 3, EquipmentSlot::FEET); + std::wstring icon(L"bootsDiamond"); + auto* configured322 = item321->setIconName(icon); + auto* configured323 = configured322->setBaseItemTypeAndMaterial(10, 5); + configured323->setDescriptionId(StringIDs::DiamondBoots, StringIDs::GivesUser15IconArmor01WhenWorn); + registerItem(0x139, name, item321); + } + { + std::wstring name(L"golden_helmet"); + auto* item324 = new ArmorItem(ArmorItem::ArmorMaterial::GOLD, 4, EquipmentSlot::HEAD); + std::wstring icon(L"helmetGold"); + auto* configured325 = item324->setIconName(icon); + auto* configured326 = configured325->setBaseItemTypeAndMaterial(7, 4); + configured326->setDescriptionId(StringIDs::GoldenHelmet, StringIDs::GivesUser1IconArmor01WhenWorn_2); + registerItem(0x13a, name, item324); + } + { + std::wstring name(L"golden_chestplate"); + auto* item327 = new ArmorItem(ArmorItem::ArmorMaterial::GOLD, 4, EquipmentSlot::CHEST); + std::wstring icon(L"chestplateGold"); + auto* configured328 = item327->setIconName(icon); + auto* configured329 = configured328->setBaseItemTypeAndMaterial(8, 4); + configured329->setDescriptionId(StringIDs::GoldenChestplate, + StringIDs::GivesUser25IconArmor01WhenWorn_1); + registerItem(0x13b, name, item327); + } + { + std::wstring name(L"golden_leggings"); + auto* item330 = new ArmorItem(ArmorItem::ArmorMaterial::GOLD, 4, EquipmentSlot::LEGS); + std::wstring icon(L"leggingsGold"); + auto* configured331 = item330->setIconName(icon); + auto* configured332 = configured331->setBaseItemTypeAndMaterial(9, 4); + configured332->setDescriptionId(StringIDs::GoldenLeggings, 0x9c244bf); + registerItem(0x13c, name, item330); + } + { + std::wstring name(L"golden_boots"); + auto* item333 = new ArmorItem(ArmorItem::ArmorMaterial::GOLD, 4, EquipmentSlot::FEET); + std::wstring icon(L"bootsGold"); + auto* configured334 = item333->setIconName(icon); + auto* configured335 = configured334->setBaseItemTypeAndMaterial(10, 4); + configured335->setDescriptionId(StringIDs::GoldenBoots, StringIDs::GivesUser05IconArmor01WhenWorn_1); + registerItem(0x13d, name, item333); + } + { + std::wstring name(L"flint"); + auto* item336 = new Item(); + std::wstring icon(L"flint"); + auto* configured337 = item336->setIconName(icon); + configured337->setDescriptionId(StringIDs::Flint, StringIDs::CollectedByDiggingGravelCanBeUsedTo); + registerItem(0x13e, name, item336); + } + { + std::wstring name(L"porkchop"); + auto* item338 = new FoodItem(3, 0.3f, 1); + std::wstring icon(L"porkchopRaw"); + auto* configured339 = item338->setIconName(icon); + configured339->setDescriptionId(StringIDs::RawPorkchop, StringIDs::Restores15IconShank01OrCan_1); + registerItem(0x13f, name, item338); + } + { + std::wstring name(L"cooked_porkchop"); + auto* item340 = new FoodItem(8, 0.8f, 1); + std::wstring icon(L"porkchopCooked"); + auto* configured341 = item340->setIconName(icon); + configured341->setDescriptionId(StringIDs::CookedPorkchop, + StringIDs::Restores4IconShank01CreatedByCookingPorkchop); + registerItem(0x140, name, item340); + } + { + std::wstring name(L"painting"); + auto* item342 = new HangingEntityItem(static_cast(0xa080001)); + std::wstring icon(L"painting"); + auto* configured343 = item342->setIconName(icon); + auto* configured344 = configured343->setBaseItemTypeAndMaterial(0x22, 6); + configured344->setDescriptionId(StringIDs::Painting, StringIDs::CanBeUsedAsDecoration_2); + registerItem(0x141, name, item342); + } + { + std::wstring name(L"golden_apple"); + auto* item345 = new GoldenAppleItem(4, 1.2f, 0); + auto* food346 = item345->setAlwaysEat(); + std::wstring icon(L"appleGold"); + auto* configured347 = food346->setIconName(icon); + auto* configured348 = configured347->setBaseItemTypeAndMaterial(0x26, 0x2e); + configured348->setDescriptionId(StringIDs::GoldenApple); + registerItem(0x142, name, food346); + } + { + std::wstring name(L"sign"); + auto* item349 = new SignItem(); + std::wstring icon(L"sign"); + auto* configured350 = item349->setIconName(icon); + auto* configured351 = configured350->setBaseItemTypeAndMaterial(0x22, 1); + configured351->setDescriptionId(StringIDs::Sign, StringIDs::ShowsTextEnteredByYouOrOtherPlayers); + registerItem(0x143, name, item349); + } + { + std::wstring name(L"wooden_door"); + auto* item352 = new DoorItem(Blocks::WOODEN_DOOR); + std::wstring icon(L"doorWood"); + auto* configured353 = item352->setIconName(icon); + auto* configured354 = configured353->setBaseItemTypeAndMaterial(6, 1); + configured354->setDescriptionId(StringIDs::OakDoor, + StringIDs::WoodenDoorsAreActivatedByUsingHittingmOr); + registerItem(0x144, name, item352); + } + auto* item355 = new BucketItem(Blocks::AIR); + item355->setMaxStackSize(0x10); + { + std::wstring name(L"bucket"); + auto* configured356 = item355->setIconName(name); + auto* configured357 = configured356->setBaseItemTypeAndMaterial(0x1a, 0x18); + configured357->setDescriptionId(StringIDs::Bucket, StringIDs::UsedToHoldAndTransportWaterLavaAndMilk); + } + { + std::wstring name(L"bucket"); + registerItem(0x145, name, item355); + } + { + std::wstring name(L"water_bucket"); + auto* item358 = new BucketItem(Blocks::FLOWING_WATER); + std::wstring icon(L"bucketWater"); + auto* configured359 = item358->setIconName(icon); + auto* configured360 + = configured359->setDescriptionId(StringIDs::WaterBucket, StringIDs::UsedToHoldAndTransportWater); + configured360->setCraftingRemainingItem(item355); + registerItem(0x146, name, item358); + } + { + std::wstring name(L"lava_bucket"); + auto* item361 = new BucketItem(Blocks::FLOWING_LAVA); + std::wstring icon(L"bucketLava"); + auto* configured362 = item361->setIconName(icon); + auto* configured363 + = configured362->setDescriptionId(StringIDs::LavaBucket, StringIDs::UsedToHoldAndTransportLava); + configured363->setCraftingRemainingItem(item355); + registerItem(0x147, name, item361); + } + { + std::wstring name(L"minecart"); + auto* item364 = new MinecartItem(MinecartType::RIDEABLE); + std::wstring icon(L"minecart"); + auto* configured365 = item364->setIconName(icon); + configured365->setDescriptionId(StringIDs::Minecart_1, StringIDs::UsedToTransportYouAnAnimalOrA); + registerItem(0x148, name, item364); + } + { + std::wstring name(L"saddle"); + auto* item366 = new SaddleItem(); + std::wstring icon(L"saddle"); + auto* configured367 = item366->setIconName(icon); + configured367->setDescriptionId(StringIDs::Saddle, StringIDs::WhenUsedOnAPigItAllowsYou); + registerItem(0x149, name, item366); + } + { + std::wstring name(L"iron_door"); + auto* item368 = new DoorItem(Blocks::IRON_DOOR); + std::wstring icon(L"doorIron"); + auto* configured369 = item368->setIconName(icon); + auto* configured370 = configured369->setBaseItemTypeAndMaterial(6, 3); + configured370->setDescriptionId(StringIDs::IronDoor, StringIDs::IronDoorsCanOnlyBeOpenedByRedstone); + registerItem(0x14a, name, item368); + } + { + std::wstring name(L"redstone"); + auto* item371 = new RedStoneDustItem(); + std::wstring icon(L"redstone"); + auto* configured372 = item371->setIconName(icon); + auto* configured373 = configured372->setBaseItemTypeAndMaterial(0x1f, 0x30); + configured373->setDescriptionId(StringIDs::Redstone, StringIDs::CanBePlacedOnGroundToCarryAn); + registerItem(0x14b, name, item371); + } + { + std::wstring name(L"snowball"); + auto* item374 = new SnowballItem(); + std::wstring icon(L"snowball"); + auto* configured375 = item374->setIconName(icon); + configured375->setDescriptionId(StringIDs::Snowball, StringIDs::CollectedByDiggingSnowCanBeThrown); + registerItem(0x14c, name, item374); + } + { + std::wstring name(L"boat"); + auto* item376 = new BoatItem(0); + std::wstring icon(L"boat"); + auto* configured377 = item376->setIconName(icon); + auto* configured378 = configured377->setDescriptionId(StringIDs::OakBoat, + StringIDs::UsedToTravelInWaterMoreQuicklyThan); + configured378->setBaseItemTypeAndMaterial(0x37, 0x3f); + registerItem(0x14d, name, item376); + } + { + std::wstring name(L"leather"); + auto* item379 = new Item(); + std::wstring icon(L"leather"); + auto* configured380 = item379->setIconName(icon); + auto* configured381 = configured380->setDescriptionId(StringIDs::Leather, + StringIDs::CollectedByKillingACowCanBeCrafted); + configured381->setBaseItemTypeAndMaterial(0x35, 0); + registerItem(0x14e, name, item379); + } + { + std::wstring name(L"milk_bucket"); + auto* item382 = new MilkBucketItem(); + std::wstring icon(L"milk"); + auto* configured383 = item382->setIconName(icon); + auto* configured384 + = configured383->setDescriptionId(StringIDs::MilkBucket, StringIDs::UsedToHoldAndTransportMilk); + configured384->setCraftingRemainingItem(item355); + registerItem(0x14f, name, item382); + } + { + std::wstring name(L"brick"); + auto* item385 = new Item(); + std::wstring icon(L"brick"); + auto* configured386 = item385->setIconName(icon); + configured386->setDescriptionId(StringIDs::Brick, 0x43fc433); + registerItem(0x150, name, item385); + } + { + std::wstring name(L"clay_ball"); + auto* item387 = new Item(); + std::wstring icon(L"clay"); + auto* configured388 = item387->setIconName(icon); + configured388->setDescriptionId(StringIDs::Clay, StringIDs::CanBeBakedIntoBricksInAFurnace); + registerItem(0x151, name, item387); + } + { + std::wstring name(L"reeds"); + auto* item389 = new BlockPlanterItem(Blocks::REEDS); + std::wstring icon(L"reeds"); + auto* configured390 = item389->setIconName(icon); + configured390->setDescriptionId(StringIDs::SugarCanes, StringIDs::CanBeCraftedToCreateSugar); + registerItem(0x152, name, item389); + } + { + std::wstring name(L"paper"); + auto* item391 = new Item(); + std::wstring icon(L"paper"); + auto* configured392 = item391->setIconName(icon); + auto* configured393 = configured392->setBaseItemTypeAndMaterial(0x2e, 0x32); + configured393->setDescriptionId(StringIDs::Paper, StringIDs::UsedToCreateBooksMapsAndFireworks); + registerItem(0x153, name, item391); + } + { + std::wstring name(L"book"); + auto* item394 = new BookItem(); + std::wstring icon(L"book"); + auto* configured395 = item394->setIconName(icon); + auto* configured396 = configured395->setBaseItemTypeAndMaterial(0x2e, 0x33); + configured396->setDescriptionId(StringIDs::Book, StringIDs::CanBeUsedToCreateBookshelvesOrEnchanted); + registerItem(0x154, name, item394); + } + { + std::wstring name(L"slime_ball"); + auto* item397 = new Item(); + item397->setBaseItemTypeAndMaterial(0x1f, 0x39); + std::wstring icon(L"slimeball"); + auto* configured398 = item397->setIconName(icon); + configured398->setDescriptionId(StringIDs::Slimeball, 0x5db70ff); + registerItem(0x155, name, item397); + } + { + std::wstring name(L"chest_minecart"); + auto* item399 = new MinecartItem(MinecartType::CHEST); + std::wstring icon(L"minecart_chest"); + auto* configured400 = item399->setIconName(icon); + configured400->setDescriptionId(StringIDs::MinecartWithChest, + StringIDs::UsedToTransportGoodsAlongRails); + registerItem(0x156, name, item399); + } + { + std::wstring name(L"furnace_minecart"); + auto* item401 = new MinecartItem(MinecartType::FURNACE); + std::wstring icon(L"minecart_furnace"); + auto* configured402 = item401->setIconName(icon); + configured402->setDescriptionId(StringIDs::MinecartWithFurnace, + StringIDs::WillMoveAlongRailsAndCanPushOther); + registerItem(0x157, name, item401); + } + { + std::wstring name(L"egg"); + auto* item403 = new EggItem(); + std::wstring icon(L"egg"); + auto* configured404 = item403->setIconName(icon); + configured404->setDescriptionId(StringIDs::Egg, StringIDs::DroppedRandomlyByChickensCanBeCraftedInto); + registerItem(0x158, name, item403); + } + { + std::wstring name(L"compass"); + auto* item405 = new CompassItem(); + std::wstring icon(L"compass"); + auto* configured406 = item405->setIconName(icon); + auto* configured407 = configured406->setBaseItemTypeAndMaterial(0x19, 0x13); + configured407->setDescriptionId(StringIDs::Compass, StringIDs::PointsToYourStartPoint); + registerItem(0x159, name, item405); + } + { + std::wstring name(L"fishing_rod"); + auto* item408 = new FishingRodItem(); + std::wstring icon(L"fishingRod"); + item408->setIconName(icon); + auto* configured409 = item408->setBaseItemTypeAndMaterial(0x25, 1); + configured409->setDescriptionId(StringIDs::FishingRod, StringIDs::UsedToCatchFish); + registerItem(0x15a, name, item408); + } + { + std::wstring name(L"clock"); + auto* item410 = new ClockItem(); + std::wstring icon(L"clock"); + auto* configured411 = item410->setIconName(icon); + configured411->setBaseItemTypeAndMaterial(0x19, 0x14); + item410->setDescriptionId(StringIDs::Clock, StringIDs::DisplaysPositionsOfSunAndMoon); + registerItem(0x15b, name, item410); + } + { + std::wstring name(L"glowstone_dust"); + auto* item412 = new Item(); + std::wstring icon(L"yellowDust"); + auto* configured413 = item412->setIconName(icon); + configured413->setDescriptionId(StringIDs::GlowstoneDust, + StringIDs::CollectedByMiningGlowstoneCanBeCraftedTo); + registerItem(0x15c, name, item412); + } + { + std::wstring name(L"fish"); + auto* item414 = new FishFoodItem(0); + std::wstring icon(L"fishRaw"); + auto* configured415 = item414->setIconName(icon); + auto* configured416 = configured415->setDescriptionId( + 0xb7484b1, StringIDs::Restores1IconShank01OrCanBeCanFedAnOcelotTame); + configured416->setStackedByData(1); + registerItem(0x15d, name, item414); + } + { + std::wstring name(L"cooked_fish"); + auto* item417 = new FishFoodItem(1); + std::wstring icon(L"fishCooked"); + auto* configured418 = item417->setIconName(icon); + auto* configured419 = configured418->setDescriptionId(StringIDs::CookedFish, + StringIDs::Restores25IconShank01CreatedBy); + configured419->setStackedByData(1); + registerItem(0x15e, name, item417); + } + { + std::wstring name(L"dye"); + auto* item420 = new DyeItem(); + std::wstring icon(L"dyePowder"); + auto* configured421 = item420->setIconName(icon); + auto* configured422 = configured421->setBaseItemTypeAndMaterial(0x12, 0xc); + configured422->setDescriptionId(StringIDs::DyePowder, 0xffffffff); + registerItem(0x15f, name, item420); + } + { + std::wstring name(L"bone"); + auto* item423 = new Item(); + std::wstring icon(L"bone"); + auto* configured424 = item423->setIconName(icon); + auto* configured425 = configured424->setDescriptionId( + StringIDs::Bone, StringIDs::CollectedByKillingASkeletonCanBeCrafted); + configured425->setHandEquipped(); + registerItem(0x160, name, item423); + } + { + std::wstring name(L"sugar"); + auto* item426 = new Item(); + std::wstring icon(L"sugar"); + auto* configured427 = item426->setIconName(icon); + configured427->setDescriptionId(StringIDs::Sugar, StringIDs::UsedInCakeRecipeAndAsAnIngredient); + registerItem(0x161, name, item426); + } + { + std::wstring name(L"cake"); + auto* item428 = new BlockPlanterItem(Blocks::CAKE); + std::wstring icon(L"cake"); + auto* configured429 = item428->setIconName(icon); + configured429->setDescriptionId(StringIDs::Cake, StringIDs::Restores1IconShank01CanBeUsed7Times); + registerItem(0x162, name, item428); + } + { + std::wstring name(L"bed"); + auto* item430 = new BedItem(); + item430->setMaxStackSize(1); + std::wstring icon(L"bed"); + auto* configured431 = item430->setIconName(icon); + auto* configured432 = configured431->setBaseItemTypeAndMaterial(0x3a, 0x47); + configured432->setDescriptionId(StringIDs::Bed, StringIDs::UsedToForwardTimeFromAnyTimeAt); + registerItem(0x163, name, item430); + } + { + std::wstring name(L"repeater"); + auto* item433 = new BlockPlanterItem(Blocks::UNPOWERED_REPEATER); + std::wstring icon(L"diode"); + auto* configured434 = item433->setIconName(icon); + auto* configured435 = configured434->setDescriptionId(StringIDs::RedstoneRepeater, + StringIDs::UsedInRedstoneCircuitsAsARepeaterA); + configured435->setBaseItemTypeAndMaterial(0x3b, 0); + registerItem(0x164, name, item433); + } + { + std::wstring name(L"cookie"); + auto* item436 = new FoodItem(2, 0.1f, 0); + std::wstring icon(L"cookie"); + auto* configured437 = item436->setIconName(icon); + configured437->setDescriptionId(StringIDs::Cookie, StringIDs::Restores1IconShank01); + registerItem(0x165, name, item436); + } + { + std::wstring name(L"filled_map"); + auto* item438 = new MapItem(); + std::wstring icon(L"map"); + auto* configured439 = item438->setIconName(icon); + auto* configured440 = configured439->setBaseItemTypeAndMaterial(0x19, 0x15); + configured440->setDescriptionId(StringIDs::Map, StringIDs::WillCreateAnImageOfAnAreaExplored); + registerItem(0x166, name, item438); + } + { + std::wstring name(L"shears"); + auto* item441 = new ShearsItem(); + std::wstring icon(L"shears"); + auto* configured442 = item441->setIconName(icon); + auto* configured443 = configured442->setBaseItemTypeAndMaterial(0x1c, 0x1b); + configured443->setDescriptionId(0xa1c6b20, StringIDs::UsedToObtainWoolFromSheepAndHarvest); + registerItem(0x167, name, item441); + } + { + std::wstring name(L"melon"); + auto* item444 = new FoodItem(2, 0.3f, 0); + std::wstring icon(L"melon"); + auto* configured445 = item444->setIconName(icon); + configured445->setDescriptionId(StringIDs::MelonSlice, StringIDs::Restores1IconShank01_1); + registerItem(0x168, name, item444); + } + { + std::wstring name(L"pumpkin_seeds"); + auto* item446 = new SeedItem(Blocks::PUMPKIN_STEM, Blocks::FARMLAND); + std::wstring icon(L"seeds_pumpkin"); + auto* configured447 = item446->setIconName(icon); + auto* configured448 = configured447->setBaseItemTypeAndMaterial(0x21, 0x16); + configured448->setDescriptionId(StringIDs::PumpkinSeeds, StringIDs::CanBePlantedToGrowPumpkins); + registerItem(0x169, name, item446); + } + { + std::wstring name(L"melon_seeds"); + auto* item449 = new SeedItem(Blocks::MELON_STEM, Blocks::FARMLAND); + std::wstring icon(L"seeds_melon"); + auto* configured450 = item449->setIconName(icon); + auto* configured451 = configured450->setBaseItemTypeAndMaterial(0x21, 0x25); + configured451->setDescriptionId(StringIDs::MelonSeeds, StringIDs::CanBePlantedToGrowMelons); + registerItem(0x16a, name, item449); + } + { + std::wstring name(L"beef"); + auto* item452 = new FoodItem(3, 0.3f, 1); + std::wstring icon(L"beefRaw"); + auto* configured453 = item452->setIconName(icon); + configured453->setDescriptionId(StringIDs::RawBeef, StringIDs::Restores15IconShank01OrCan); + registerItem(0x16b, name, item452); + } + { + std::wstring name(L"cooked_beef"); + auto* item454 = new FoodItem(8, 0.8f, 1); + std::wstring icon(L"beefCooked"); + auto* configured455 = item454->setIconName(icon); + configured455->setDescriptionId(StringIDs::Steak, StringIDs::Restores4IconShank01CreatedByCooking); + registerItem(0x16c, name, item454); + } + { + std::wstring name(L"chicken"); + auto* item456 = new FoodItem(2, 0.3f, 1); + auto* item457 = new MobEffectInstance(MobEffects::HUNGER, 600, 0); + auto* food458 = item456->setEffect(item457, 0.3f); + std::wstring icon(L"chickenRaw"); + auto* configured459 = food458->setIconName(icon); + configured459->setDescriptionId(StringIDs::RawChicken, StringIDs::Restores1IconShank01OrCanBe); + registerItem(0x16d, name, food458); + } + { + std::wstring name(L"cooked_chicken"); + auto* item460 = new FoodItem(6, 0.6f, 1); + std::wstring icon(L"chickenCooked"); + auto* configured461 = item460->setIconName(icon); + configured461->setDescriptionId(StringIDs::CookedChicken, + StringIDs::Restores3IconShank01CreatedByCooking); + registerItem(0x16e, name, item460); + } + { + std::wstring name(L"rotten_flesh"); + auto* item462 = new FoodItem(4, 0.1f, 1); + auto* item463 = new MobEffectInstance(MobEffects::HUNGER, 600, 0); + auto* food464 = item462->setEffect(item463, 0.8f); + std::wstring icon(L"rottenFlesh"); + auto* configured465 = food464->setIconName(icon); + configured465->setDescriptionId(StringIDs::RottenFlesh, StringIDs::Restores2IconShank01EatingThisCan); + registerItem(0x16f, name, food464); + } + { + std::wstring name(L"ender_pearl"); + auto* item466 = new EnderpearlItem(); + std::wstring icon(L"enderPearl"); + auto* configured467 = item466->setIconName(icon); + configured467->setDescriptionId(StringIDs::EnderPearl, + StringIDs::DroppedByEndermenWhenyDieThrowingAnEnder); + registerItem(0x170, name, item466); + } + { + std::wstring name(L"blaze_rod"); + auto* item468 = new Item(); + std::wstring icon(L"blazeRod"); + auto* configured469 = item468->setIconName(icon); + auto* configured470 = configured469->setDescriptionId( + StringIDs::BlazeRod, StringIDs::UsedInPotionBrewingAndForLocatingStrongholds); + configured470->setHandEquipped(); + registerItem(0x171, name, item468); + } + { + std::wstring name(L"ghast_tear"); + auto* item471 = new Item(); + std::wstring icon(L"ghastTear"); + auto* configured472 = item471->setIconName(icon); + configured472->setDescriptionId(StringIDs::GhastTear, + StringIDs::UsedInPotionBrewingDroppedByGhastsWheny); + registerItem(0x172, name, item471); + } + { + std::wstring name(L"gold_nugget"); + auto* item473 = new Item(); + std::wstring icon(L"goldNugget"); + auto* configured474 = item473->setIconName(icon); + auto* configured475 = configured474->setBaseItemTypeAndMaterial(0x1f, 4); + configured475->setDescriptionId(StringIDs::GoldNugget, + StringIDs::DroppedByZombiePigmenWhenyDieZombiePigmen); + registerItem(0x173, name, item473); + } + { + std::wstring name(L"nether_wart"); + auto* item476 = new SeedItem(Blocks::NETHER_WART, Blocks::SOUL_SAND); + std::wstring icon(L"netherStalkSeeds"); + auto* configured477 = item476->setIconName(icon); + configured477->setDescriptionId(StringIDs::NetherWart, StringIDs::UsedInPotionBrewingThisCanBeFound); + registerItem(0x174, name, item476); + } + { + std::wstring name(L"potion"); + auto* item478 = new PotionItem(); + std::wstring icon(L"potion"); + auto* configured479 = item478->setIconName(icon); + configured479->setDescriptionId(0xae6088d, StringIDs::WhenUsedCanHaveVariousEffectsDependingOn); + registerItem(0x175, name, item478); + } + auto* item480 = new BottleItem(); + { + std::wstring name(L"glassBottle"); + auto* configured481 = item480->setIconName(name); + configured481->setBaseItemTypeAndMaterial(0x1a, 0x22); + item480->setDescriptionId(StringIDs::GlassBottle, StringIDs::CanBeFilledWithWaterAndUsedAs); + } + { + std::wstring name(L"glass_bottle"); + registerItem(0x176, name, item480); + } + { + std::wstring name(L"spider_eye"); + auto* item482 = new FoodItem(2, 0.8f, 0); + auto* item483 = new MobEffectInstance(MobEffects::POISON, 100, 0); + auto* food484 = item482->setEffect(item483, 1.0f); + std::wstring icon(L"spiderEye"); + auto* configured485 = food484->setIconName(icon); + configured485->setDescriptionId(StringIDs::SpiderEye, StringIDs::ThisIsAPoisonousFoodAndBrewingItem); + registerItem(0x177, name, food484); + } + { + std::wstring name(L"fermented_spider_eye"); + auto* item486 = new Item(); + std::wstring icon(L"fermentedSpiderEye"); + auto* configured487 = item486->setIconName(icon); + configured487->setDescriptionId(StringIDs::FermentedSpiderEye, + StringIDs::UsedInPotionBrewingMainlyToCreatePotions); + registerItem(0x178, name, item486); + } + { + std::wstring name(L"blaze_powder"); + auto* item488 = new Item(); + std::wstring icon(L"blazePowder"); + auto* configured489 = item488->setIconName(icon); + configured489->setDescriptionId(StringIDs::BlazePowder, + StringIDs::UsedInPotionBrewingOrCraftedWithOther); + registerItem(0x179, name, item488); + } + { + std::wstring name(L"magma_cream"); + auto* item490 = new Item(); + std::wstring icon(L"magmaCream"); + auto* configured491 = item490->setIconName(icon); + configured491->setDescriptionId(StringIDs::MagmaCream, StringIDs::UsedInPotionBrewing); + registerItem(0x17a, name, item490); + } + { + std::wstring name(L"brewing_stand"); + auto* item492 = new BlockPlanterItem(Blocks::BREWING_STAND); + std::wstring icon(L"brewingStand"); + auto* configured493 = item492->setIconName(icon); + auto* configured494 = configured493->setBaseItemTypeAndMaterial(0x1e, 0x23); + configured494->setDescriptionId(StringIDs::BrewingStand_1, + StringIDs::UsedForMakingPotionsAndSplashPotions); + registerItem(0x17b, name, item492); + } + { + std::wstring name(L"cauldron"); + auto* item495 = new BlockPlanterItem(Blocks::CAULDRON); + std::wstring icon(L"cauldron"); + auto* configured496 = item495->setIconName(icon); + auto* configured497 = configured496->setBaseItemTypeAndMaterial(0x1a, 3); + configured497->setDescriptionId(0x5a1ba3a, StringIDs::UsedToMixDyesAndDyeArmorOr); + registerItem(0x17c, name, item495); + } + { + std::wstring name(L"ender_eye"); + auto* item498 = new EnderEyeItem(); + std::wstring icon(L"eyeOfEnder"); + auto* configured499 = item498->setIconName(icon); + auto* configured500 = configured499->setBaseItemTypeAndMaterial(0x19, 0x21); + configured500->setDescriptionId(StringIDs::EyeOfEnder, StringIDs::WhenThrownWillShowDirectionToAnEnd); + registerItem(0x17d, name, item498); + } + { + std::wstring name(L"speckled_melon"); + auto* item501 = new Item(); + std::wstring icon(L"speckledMelon"); + auto* configured502 = item501->setIconName(icon); + auto* configured503 = configured502->setBaseItemTypeAndMaterial(0x26, 0x25); + configured503->setDescriptionId(StringIDs::GlisteringMelon, StringIDs::UsedInPotionBrewing_1); + registerItem(0x17e, name, item501); + } + { + std::wstring name(L"spawn_egg"); + auto* item504 = new SpawnEggItem(); + std::wstring icon(L"monsterPlacer"); + auto* configured505 = item504->setIconName(icon); + configured505->setDescriptionId(StringIDs::SpawnCreature, + StringIDs::WhenThrownCanSpawnACreatureOfType); + registerItem(0x17f, name, item504); + } + { + std::wstring name(L"experience_bottle"); + auto* item506 = new ExperienceBottleItem(); + std::wstring icon(L"expBottle"); + auto* configured507 = item506->setIconName(icon); + configured507->setDescriptionId(StringIDs::BottleOEnchanting, + StringIDs::WhenThrownItDropsExperienceOrbsWhichIncrease); + registerItem(0x180, name, item506); + } + { + std::wstring name(L"fire_charge"); + auto* item508 = new FireChargeItem(); + std::wstring icon(L"fireball"); + auto* configured509 = item508->setIconName(icon); + auto* configured510 = configured509->setBaseItemTypeAndMaterial(0x17, 0x26); + configured510->setDescriptionId(StringIDs::FireCharge, StringIDs::UsefulForSettingThingsOnFireOrFor); + registerItem(0x181, name, item508); + } + { + std::wstring name(L"writable_book"); + auto* item511 = new WritableBookItem(); + std::wstring icon(L"writingBook"); + auto* configured512 = item511->setIconName(icon); + auto* configured513 = configured512->setBaseItemTypeAndMaterial(0x2e, 0x33); + configured513->setDescriptionId(StringIDs::BookAndQuill, StringIDs::ABookThatCanBeWrittenIn); + registerItem(0x182, name, item511); + } + { + std::wstring name(L"written_book"); + auto* item514 = new WrittenBookItem(); + std::wstring icon(L"writtenBook"); + auto* configured515 = item514->setIconName(icon); + auto* configured516 = configured515->setDescriptionId( + StringIDs::WrittenBook, StringIDs::ABookSignedByAuthorCannotBeWrittenIn); + configured516->setMaxStackSize(0x10); + registerItem(0x183, name, item514); + } + { + std::wstring name(L"emerald"); + auto* item517 = new Item(); + std::wstring icon(L"emerald"); + item517->setIconName(icon); + auto* configured518 = item517->setBaseItemTypeAndMaterial(0x1f, 0x2c); + configured518->setDescriptionId(StringIDs::Emerald, StringIDs::CanBeTradedWithVillagers); + registerItem(0x184, name, item517); + } + { + std::wstring name(L"item_frame"); + auto* item519 = new HangingEntityItem(static_cast(0xa080002)); + std::wstring icon(L"frame"); + auto* configured520 = item519->setIconName(icon); + auto* configured521 = configured520->setBaseItemTypeAndMaterial(0x22, 0x22); + configured521->setDescriptionId(StringIDs::ItemFrame, + StringIDs::SimilarToADisplayCaseThisWillDisplay); + registerItem(0x185, name, item519); + } + { + std::wstring name(L"flower_pot"); + auto* item522 = new BlockPlanterItem(Blocks::FLOWER_POT); + std::wstring icon(L"flowerPot"); + auto* configured523 = item522->setIconName(icon); + auto* configured524 = configured523->setDescriptionId( + StringIDs::FlowerPot, StringIDs::UsedAsADecorationFlowersSaplingsCactiAnd); + configured524->setBaseItemTypeAndMaterial(0x35, 0); + registerItem(0x186, name, item522); + } + { + std::wstring name(L"carrot"); + auto* item525 = new SeedFoodItem(3, 0.6f, Blocks::CARROTS, Blocks::FARMLAND); + std::wstring icon(L"carrots"); + auto* configured526 = item525->setIconName(icon); + configured526->setDescriptionId(StringIDs::Carrot, StringIDs::Restores15IconShank01AndCan); + registerItem(0x187, name, item525); + } + { + std::wstring name(L"potato"); + auto* item527 = new SeedFoodItem(1, 0.3f, Blocks::POTATOES, Blocks::FARMLAND); + std::wstring icon(L"potato"); + auto* configured528 = item527->setIconName(icon); + configured528->setDescriptionId(StringIDs::Potato, StringIDs::Restores05IconShank01OrCan); + registerItem(0x188, name, item527); + } + { + std::wstring name(L"baked_potato"); + auto* item529 = new FoodItem(5, 0.6f, 0); + std::wstring icon(L"potatoBaked"); + auto* configured530 = item529->setIconName(icon); + configured530->setDescriptionId(0x9bbf079, StringIDs::Restores25IconShank01CreatedByPotato); + registerItem(0x189, name, item529); + } + { + std::wstring name(L"poisonous_potato"); + auto* item531 = new FoodItem(2, 0.3f, 0); + auto* item532 = new MobEffectInstance(MobEffects::POISON, 100, 0); + auto* food533 = item531->setEffect(item532, 0.6f); + std::wstring icon(L"potatoPoisonous"); + auto* configured534 = food533->setIconName(icon); + configured534->setDescriptionId(StringIDs::PoisonousPotato, + StringIDs::Restores1IconShank01EatingThisCan); + registerItem(0x18a, name, food533); + } + { + std::wstring name(L"map"); + auto* item535 = new EmptyMapItem(); + std::wstring icon(L"map_empty"); + auto* configured536 = item535->setIconName(icon); + configured536->setBaseItemTypeAndMaterial(0x19, 0x15); + item535->setDescriptionId(StringIDs::EmptyMap, StringIDs::WhenUsedBecomesAMapOfPartOf); + registerItem(0x18b, name, item535); + } + { + std::wstring name(L"golden_carrot"); + auto* item537 = new FoodItem(6, 1.2f, 0); + std::wstring icon(L"carrotGolden"); + auto* configured538 = item537->setIconName(icon); + auto* configured539 = configured538->setBaseItemTypeAndMaterial(0x26, 0x2f); + configured539->setDescriptionId(StringIDs::GoldenCarrot, StringIDs::Restores3IconShank01CraftedFromA); + registerItem(0x18c, name, item537); + } + { + std::wstring name(L"skull"); + auto* item540 = new SkullItem(); + std::wstring icon(L""); + auto* configured541 = item540->setIconName(icon); + configured541->setDescriptionId(StringIDs::Skull, StringIDs::MobHeadsCanBePlacedAsADecoration); + registerItem(0x18d, name, item540); + } + { + std::wstring name(L"carrot_on_a_stick"); + auto* item542 = new CarrotOnAStickItem(); + std::wstring icon(L"carrotOnAStick"); + auto* configured543 = item542->setIconName(icon); + auto* configured544 = configured543->setBaseItemTypeAndMaterial(0x25, 0x2f); + configured544->setDescriptionId(StringIDs::CarrotOnAStick, + StringIDs::UsedToControlASaddledPigWhenRidingOnIt); + registerItem(0x18e, name, item542); + } + { + std::wstring name(L"nether_star"); + auto* item545 = new SimpleFoiledItem(); + std::wstring icon(L"nether_star"); + auto* configured546 = item545->setIconName(icon); + configured546->setDescriptionId(StringIDs::NetherStar, + StringIDs::DroppedByWitherUsedInCraftingBeacons); + registerItem(399, name, item545); + } + { + std::wstring name(L"pumpkin_pie"); + auto* item547 = new FoodItem(8, 0.3f, 0); + std::wstring icon(L"pumpkinPie"); + auto* configured548 = item547->setIconName(icon); + configured548->setDescriptionId(StringIDs::PumpkinPie, StringIDs::Restores4IconShank01); + registerItem(400, name, item547); + } + { + std::wstring name(L"fireworks"); + auto* item549 = new FireworksItem(); + std::wstring icon(L"fireworks"); + auto* configured550 = item549->setIconName(icon); + auto* configured551 = configured550->setBaseItemTypeAndMaterial(0x2c, 0); + configured551->setDescriptionId(StringIDs::FireworkRocket, 0xa644378); + registerItem(0x191, name, item549); + } + { + std::wstring name(L"firework_charge"); + auto* item552 = new FireworkChargeItem(); + std::wstring icon(L"fireworks_charge"); + auto* configured553 = item552->setIconName(icon); + auto* configured554 = configured553->setBaseItemTypeAndMaterial(0x2c, 0); + configured554->setDescriptionId(StringIDs::FireworkStar, + StringIDs::UsedToDetermineColorEffectAndShapeOf); + registerItem(0x192, name, item552); + } + { + std::wstring name(L"enchanted_book"); + auto* item555 = new EnchantedBookItem(); + std::wstring icon(L"enchantedBook"); + auto* configured556 = item555->setIconName(icon); + auto* configured557 = configured556->setMaxStackSize(1); + configured557->setDescriptionId(StringIDs::EnchantedBook, + StringIDs::UsedWithAnAnvilToEnchantWeaponsTools); + registerItem(0x193, name, item555); + } + { + std::wstring name(L"comparator"); + auto* item558 = new BlockPlanterItem(Blocks::UNPOWERED_COMPARATOR); + std::wstring icon(L"comparator"); + auto* configured559 = item558->setIconName(icon); + auto* configured560 = configured559->setDescriptionId( + StringIDs::RedstoneComparator, StringIDs::UsedInRedstoneCircuitsToMaintainCompareOr); + configured560->setBaseItemTypeAndMaterial(0x3b, 0); + registerItem(0x194, name, item558); + } + { + std::wstring name(L"netherbrick"); + auto* item561 = new Item(); + std::wstring icon(L"netherbrick"); + auto* configured562 = item561->setIconName(icon); + configured562->setDescriptionId(StringIDs::NetherBrick, + StringIDs::CreatedBySmeltingNetherrackInAFurnaceCan); + registerItem(0x195, name, item561); + } + { + std::wstring name(L"quartz"); + auto* item563 = new Item(); + std::wstring icon(L"netherquartz"); + auto* configured564 = item563->setIconName(icon); + configured564->setDescriptionId(StringIDs::NetherQuartz, + StringIDs::CreatedByMiningNetherQuartzOreCanBe); + registerItem(0x196, name, item563); + } + { + std::wstring name(L"tnt_minecart"); + auto* item565 = new MinecartItem(MinecartType::TNT); + std::wstring icon(L"minecart_tnt"); + auto* configured566 = item565->setIconName(icon); + configured566->setDescriptionId(StringIDs::MinecartWithTnt, StringIDs::ATypeOfMinecartThatActsAsA); + registerItem(0x197, name, item565); + } + { + std::wstring name(L"hopper_minecart"); + auto* item567 = new MinecartItem(MinecartType::HOPPER); + std::wstring icon(L"minecart_hopper"); + auto* configured568 = item567->setIconName(icon); + auto* configured569 = configured568->setDescriptionId( + StringIDs::MinecartWithHopper, StringIDs::ASpecialTypeOfMinecartThatFunctionsSimilarly); + configured569->setBaseItemTypeAndMaterial(0x33, 2); + registerItem(0x198, name, item567); + } + { + std::wstring name(L"prismarine_shard"); + auto* item570 = new Item(); + std::wstring icon(L"prismarine_shard"); + auto* configured571 = item570->setIconName(icon); + auto* configured572 = configured571->setDescriptionId( + StringIDs::PrismarineShard, StringIDs::DroppedByGuardiansAndElderGuardiansCanBe); + configured572->setBaseItemTypeAndMaterial(0xd, 0); + registerItem(0x199, name, item570); + } + { + std::wstring name(L"prismarine_crystals"); + auto* item573 = new Item(); + std::wstring icon(L"prismarine_crystals"); + auto* configured574 = item573->setIconName(icon); + auto* configured575 = configured574->setDescriptionId( + StringIDs::PrismarineCrystals, StringIDs::ObtainedFromSeaLanternsOrByDefeatingGuardians); + configured575->setBaseItemTypeAndMaterial(0xd, 0); + registerItem(0x19a, name, item573); + } + { + std::wstring name(L"rabbit"); + auto* item576 = new FoodItem(3, 0.3f, 1); + std::wstring icon(L"rabbit_raw"); + auto* configured577 = item576->setIconName(icon); + auto* configured578 + = configured577->setDescriptionId(StringIDs::RawRabbit, StringIDs::Restores15IconShank01OrCan_2); + configured578->setBaseItemTypeAndMaterial(0x35, 0); + registerItem(0x19b, name, item576); + } + { + std::wstring name(L"cooked_rabbit"); + auto* item579 = new FoodItem(5, 0.6f, 1); + std::wstring icon(L"rabbit_cooked"); + auto* configured580 = item579->setIconName(icon); + configured580->setDescriptionId(StringIDs::CookedRabbit, StringIDs::Restores25IconShank01UsedTo); + registerItem(0x19c, name, item579); + } + { + std::wstring name(L"rabbit_stew"); + auto* item581 = new BowlFoodItem(10); + item581->setBaseItemTypeAndMaterial(0x27, 0); + std::wstring icon(L"rabbit_stew"); + auto* configured582 = item581->setIconName(icon); + configured582->setDescriptionId(StringIDs::RabbitStew, StringIDs::Restores5IconShank01CookedUpWith); + registerItem(0x19d, name, item581); + } + { + std::wstring name(L"rabbit_foot"); + auto* item583 = new Item(); + std::wstring icon(L"rabbit_foot"); + auto* configured584 = item583->setIconName(icon); + configured584->setDescriptionId(StringIDs::RabbitSFoot, 0x9ea74d9); + registerItem(0x19e, name, item583); + } + { + std::wstring name(L"rabbit_hide"); + auto* item585 = new Item(); + std::wstring icon(L"rabbit_hide"); + auto* configured586 = item585->setIconName(icon); + configured586->setDescriptionId(StringIDs::RabbitHide, StringIDs::UsedInCraftingLeather); + registerItem(0x19f, name, item585); + } + { + std::wstring name(L"armor_stand"); + auto* item587 = new ArmorStandItem(); + auto* configured588 = item587->setBaseItemTypeAndMaterial(0x22, 1); + configured588->setDescriptionId(StringIDs::ArmorStand_1, + StringIDs::CanBeEquippedToDisplayArmorAndOther); + std::wstring icon(L"wooden_armorstand"); + auto* configured589 = item587->setIconName(icon); + configured589->setMaxStackSize(0x10); + registerItem(0x1a0, name, item587); + } + { + std::wstring name(L"iron_horse_armor"); + auto* item590 = new HorseArmorItem(2, 5, 0x69, L"meo"); + std::wstring icon(L"iron_horse_armor"); + auto* configured591 = item590->setIconName(icon); + auto* configured592 = configured591->setMaxStackSize(1); + configured592->setDescriptionId(StringIDs::IronHorseArmor, StringIDs::ASpecialTypeOfArmorThatCanBe2); + registerItem(0x1a1, name, item590); + } + { + std::wstring name(L"golden_horse_armor"); + auto* item593 = new HorseArmorItem(3, 7, 0x68, L"goo"); + std::wstring icon(L"gold_horse_armor"); + auto* configured594 = item593->setIconName(icon); + auto* configured595 = configured594->setMaxStackSize(1); + configured595->setDescriptionId(StringIDs::GoldHorseArmor, StringIDs::ASpecialTypeOfArmorThatCanBe3); + registerItem(0x1a2, name, item593); + } + { + std::wstring name(L"diamond_horse_armor"); + auto* item596 = new HorseArmorItem(4, 0xb, 0x67, L"dio"); + std::wstring icon(L"diamond_horse_armor"); + auto* configured597 = item596->setIconName(icon); + auto* configured598 = configured597->setMaxStackSize(1); + configured598->setDescriptionId(StringIDs::DiamondHorseArmor, + StringIDs::ASpecialTypeOfArmorThatCanBe); + registerItem(0x1a3, name, item596); + } + { + std::wstring name(L"lead"); + auto* item599 = new LeadItem(); + std::wstring icon(L"lead"); + auto* configured600 = item599->setIconName(icon); + auto* configured601 = configured600->setBaseItemTypeAndMaterial(0x19, 0); + configured601->setDescriptionId(0x4f7491a, StringIDs::UsedToLeashMobsToPlayerOrFencePosts); + registerItem(0x1a4, name, item599); + } + { + std::wstring name(L"name_tag"); + auto* item602 = new NameTagItem(); + std::wstring icon(L"name_tag"); + auto* configured603 = item602->setIconName(icon); + configured603->setDescriptionId(StringIDs::NameTag, StringIDs::UsedToNameMobsInWorld); + registerItem(0x1a5, name, item602); + } + { + std::wstring name(L"command_block_minecart"); + auto* item604 = new MinecartItem(MinecartType::COMMAND_BLOCK); + std::wstring icon(L"minecart_command_block"); + auto* configured605 = item604->setIconName(icon); + configured605->setDescriptionId(StringIDs::MinecartWithCommandBlock); + registerItem(0x1a6, name, item604); + } + { + std::wstring name(L"mutton"); + auto* item606 = new FoodItem(2, 0.3f, 1); + std::wstring icon(L"mutton_raw"); + auto* configured607 = item606->setIconName(icon); + configured607->setDescriptionId(StringIDs::RawMutton, StringIDs::Restores1IconShank01OrCanBe_3); + registerItem(0x1a7, name, item606); + } + { + std::wstring name(L"cooked_mutton"); + auto* item608 = new FoodItem(6, 0.8f, 1); + std::wstring icon(L"mutton_cooked"); + auto* configured609 = item608->setIconName(icon); + configured609->setDescriptionId(StringIDs::CookedMutton, + StringIDs::Restores3IconShank01CreatedByCookingMutton); + registerItem(0x1a8, name, item608); + } + { + std::wstring name(L"banner"); + auto* item610 = new BannerItem(); + std::wstring icon(L"cookie"); + auto* configured611 = item610->setIconName(icon); + auto* configured612 = configured611->setBaseItemTypeAndMaterial(0x36, 0); + configured612->setDescriptionId(StringIDs::Banner); + registerItem(0x1a9, name, item610); + } + { + std::wstring name(L"end_crystal"); + auto* item613 = new EndCrystalItem(); + item613->setDescriptionId(StringIDs::EndCrystal, StringIDs::HealsEnderDragonAndCanBeUsedTo); + registerItem(0x1aa, name, item613); + } + { + std::wstring name(L"spruce_door"); + auto* item614 = new DoorItem(Blocks::SPRUCE_DOOR); + std::wstring icon(L"door_spruce"); + auto* configured615 = item614->setIconName(icon); + auto* configured616 = configured615->setBaseItemTypeAndMaterial(6, 0x27); + configured616->setDescriptionId(StringIDs::SpruceDoor, + StringIDs::WoodenDoorsAreActivatedByUsingHittingmOr); + registerItem(0x1ab, name, item614); + } + { + std::wstring name(L"birch_door"); + auto* item617 = new DoorItem(Blocks::BIRCH_DOOR); + std::wstring icon(L"door_birch"); + auto* configured618 = item617->setIconName(icon); + auto* configured619 = configured618->setBaseItemTypeAndMaterial(6, 0x28); + configured619->setDescriptionId(StringIDs::BirchDoor, + StringIDs::WoodenDoorsAreActivatedByUsingHittingmOr); + registerItem(0x1ac, name, item617); + } + { + std::wstring name(L"jungle_door"); + auto* item620 = new DoorItem(Blocks::JUNGLE_DOOR); + std::wstring icon(L"door_jungle"); + auto* configured621 = item620->setIconName(icon); + auto* configured622 = configured621->setBaseItemTypeAndMaterial(6, 0x29); + configured622->setDescriptionId(StringIDs::JungleDoor, + StringIDs::WoodenDoorsAreActivatedByUsingHittingmOr); + registerItem(0x1ad, name, item620); + } + { + std::wstring name(L"acacia_door"); + auto* item623 = new DoorItem(Blocks::ACACIA_DOOR); + std::wstring icon(L"door_acacia"); + auto* configured624 = item623->setIconName(icon); + auto* configured625 = configured624->setBaseItemTypeAndMaterial(6, 0x2a); + configured625->setDescriptionId(StringIDs::AcaciaDoor, + StringIDs::WoodenDoorsAreActivatedByUsingHittingmOr); + registerItem(0x1ae, name, item623); + } + { + std::wstring name(L"dark_oak_door"); + auto* item626 = new DoorItem(Blocks::DARK_OAK_DOOR); + std::wstring icon(L"door_dark_oak"); + auto* configured627 = item626->setIconName(icon); + auto* configured628 = configured627->setBaseItemTypeAndMaterial(6, 0x2b); + configured628->setDescriptionId(StringIDs::DarkOakDoor, + StringIDs::WoodenDoorsAreActivatedByUsingHittingmOr); + registerItem(0x1af, name, item626); + } + { + std::wstring name(L"chorus_fruit"); + auto* item629 = new ChorusFruitItem(4, 0.3f); + auto* food630 = item629->setAlwaysEat(); + std::wstring icon(L"chorus_fruit"); + auto* configured631 = food630->setIconName(icon); + configured631->setDescriptionId(StringIDs::ChorusFruit, StringIDs::EatingRestores2IconShank01AndMay); + registerItem(0x1b0, name, food630); + } + { + std::wstring name(L"chorus_fruit_popped"); + auto* item632 = new Item(); + std::wstring icon(L"chorus_fruit_popped"); + auto* configured633 = item632->setIconName(icon); + configured633->setDescriptionId(StringIDs::PoppedChorusFruit, + StringIDs::CreatedByCookingChorusFruitInAFurnace); + registerItem(0x1b1, name, item632); + } + { + std::wstring name(L"beetroot"); + auto* item634 = new FoodItem(1, 0.6f, 0); + std::wstring icon(L"beetroot"); + auto* configured635 = item634->setIconName(icon); + configured635->setDescriptionId(StringIDs::Beetroot, StringIDs::Restores05IconShank01WhenEaten); + registerItem(0x1b2, name, item634); + } + { + std::wstring name(L"beetroot_seeds"); + auto* item636 = new SeedItem(Blocks::BEETROOTS, Blocks::FARMLAND); + std::wstring icon(L"beetroot_seeds"); + auto* configured637 = item636->setIconName(icon); + auto* configured638 = configured637->setBaseItemTypeAndMaterial(0x21, 0); + configured638->setDescriptionId(StringIDs::BeetrootSeeds, + StringIDs::CanBePlantedInFarmlandToGrowBeetroot); + registerItem(0x1b3, name, item636); + } + { + std::wstring name(L"beetroot_soup"); + auto* item639 = new BowlFoodItem(6); + std::wstring icon(L"beetroot_soup"); + auto* configured640 = item639->setIconName(icon); + auto* configured641 = configured640->setBaseItemTypeAndMaterial(0x27, 0); + configured641->setDescriptionId(StringIDs::BeetrootSoup, StringIDs::Restores3IconShank01WhenEaten); + registerItem(0x1b4, name, item639); + } + { + std::wstring name(L"dragon_breath"); + auto* item642 = new Item(); + std::wstring icon(L"dragon_breath"); + auto* configured643 = item642->setIconName(icon); + auto* configured644 = configured643->setCraftingRemainingItem(item480); + configured644->setDescriptionId(StringIDs::DragonSBreath, + StringIDs::UsedInPotionBrewingObtainedByCapturingEnder); + registerItem(0x1b5, name, item642); + } + { + std::wstring name(L"splash_potion"); + auto* item645 = static_cast(::operator new(sizeof(SplashPotionItem))); + std::memset(static_cast(item645), 0, sizeof(SplashPotionItem)); + new (item645) SplashPotionItem(); + std::wstring icon(L"splash_potion"); + auto* configured646 = item645->setIconName(icon); + configured646->setDescriptionId(StringIDs::SplashPotion, StringIDs::APotionThatCanBeThrown); + registerItem(0x1b6, name, item645); + } + { + std::wstring name(L"spectral_arrow"); + auto* item647 = new SpectralArrowItem(); + std::wstring icon(L"spectral_arrow"); + auto* configured648 = item647->setIconName(icon); + configured648->setBaseItemTypeAndMaterial(0x18, 0x12); + item647->setDescriptionId(0x558958e, StringIDs::GivesVictimAGlowingOutlineThatCanBe); + registerItem(0x1b7, name, item647); + } + { + std::wstring name(L"tipped_arrow"); + auto* item649 = static_cast(::operator new(sizeof(TippedArrowItem))); + std::memset(static_cast(item649), 0, sizeof(TippedArrowItem)); + new (item649) TippedArrowItem(); + std::wstring icon(L"tipped_arrow_base"); + auto* configured650 = item649->setIconName(icon); + auto* configured651 = configured650->setBaseItemTypeAndMaterial(0x18, 0x12); + configured651->setDescriptionId(StringIDs::TippedArrow, + StringIDs::AnArrowThatAppliesAPotionEffectBased); + registerItem(0x1b8, name, item649); + } + { + std::wstring name(L"lingering_potion"); + auto* item652 = static_cast(::operator new(sizeof(LingeringPotionItem))); + std::memset(static_cast(item652), 0, sizeof(LingeringPotionItem)); + new (item652) LingeringPotionItem(); + std::wstring icon(L"lingering_potion"); + auto* configured653 = item652->setIconName(icon); + configured653->setDescriptionId(StringIDs::LingeringPotion, + StringIDs::APotionThatCanBeThrownAndApplies); + registerItem(0x1b9, name, item652); + } + { + std::wstring name(L"elytra"); + auto* item654 = new ElytraItem(); + std::wstring icon(L"elytra"); + auto* configured655 = item654->setIconName(icon); + configured655->setDescriptionId(StringIDs::Elytra_1, StringIDs::AllowsPlayerToGlideWhenWorn); + registerItem(0x1bb, name, item654); + } + { + std::wstring name(L"spruce_boat"); + auto* item656 = new BoatItem(1); + std::wstring icon(L"spruce_boat"); + auto* configured657 = item656->setIconName(icon); + configured657->setBaseItemTypeAndMaterial(0x37, 0x40); + item656->setDescriptionId(StringIDs::SpruceBoat, StringIDs::UsedToTravelInWaterMoreQuicklyThan_5); + registerItem(0x1bc, name, item656); + } + { + std::wstring name(L"birch_boat"); + auto* item658 = new BoatItem(2); + std::wstring icon(L"birch_boat"); + auto* configured659 = item658->setIconName(icon); + auto* configured660 = configured659->setBaseItemTypeAndMaterial(0x37, 0x41); + configured660->setDescriptionId(StringIDs::BirchBoat, + StringIDs::UsedToTravelInWaterMoreQuicklyThan_2); + registerItem(0x1bd, name, item658); + } + { + std::wstring name(L"jungle_boat"); + auto* item661 = new BoatItem(3); + std::wstring icon(L"jungle_boat"); + auto* configured662 = item661->setIconName(icon); + auto* configured663 = configured662->setBaseItemTypeAndMaterial(0x37, 0x42); + configured663->setDescriptionId(StringIDs::JungleBoat, + StringIDs::UsedToTravelInWaterMoreQuicklyThan_4); + registerItem(0x1be, name, item661); + } + { + std::wstring name(L"acacia_boat"); + auto* item664 = new BoatItem(4); + std::wstring icon(L"acacia_boat"); + auto* configured665 = item664->setIconName(icon); + auto* configured666 = configured665->setBaseItemTypeAndMaterial(0x37, 0x43); + configured666->setDescriptionId(StringIDs::AcaciaBoat, + StringIDs::UsedToTravelInWaterMoreQuicklyThan_1); + registerItem(0x1bf, name, item664); + } + { + std::wstring name(L"dark_oak_boat"); + auto* item667 = new BoatItem(5); + std::wstring icon(L"dark_oak_boat"); + auto* configured668 = item667->setIconName(icon); + auto* configured669 = configured668->setBaseItemTypeAndMaterial(0x37, 0x44); + configured669->setDescriptionId(StringIDs::DarkOakBoat, + StringIDs::UsedToTravelInWaterMoreQuicklyThan_3); + registerItem(0x1c0, name, item667); + } + { + std::wstring name(L"totem_of_undying"); + auto* item670 = new Item(); + std::wstring icon(L"totem"); + auto* configured671 = item670->setIconName(icon); + auto* configured672 = configured671->setDescriptionId(StringIDs::TotemOfUndying, 0x3b5e68a); + configured672->setMaxStackSize(1); + registerItem(0x1c1, name, item670); + } + { + std::wstring name(L"shulker_shell"); + auto* item673 = new Item(); + std::wstring icon(L"shulker_shell"); + auto* configured674 = item673->setIconName(icon); + configured674->setDescriptionId(StringIDs::ShulkerShell, + StringIDs::SometimesDroppedByShulkersCanBeUsedTo); + registerItem(0x1c2, name, item673); + } + { + std::wstring name(L"iron_nugget"); + auto* item675 = new Item(); + std::wstring icon(L"iron_nugget"); + auto* configured676 = item675->setIconName(icon); + auto* configured677 = configured676->setBaseItemTypeAndMaterial(0x1f, 3); + configured677->setDescriptionId(StringIDs::IronNugget, + StringIDs::CreatedBySmeltingIronArmourAndToolsIn); + registerItem(0x1c4, name, item675); + } + { + std::wstring name(L"leather_horse_armor"); + auto* item678 = new HorseArmorItem(1, 3, ItemBootstrap::LEATHER_ARMOR_TEXTURES, 2, L"lee"); + auto* configured679 = item678->setIconName(sBaseTierName); + auto* configured680 = configured679->setMaxStackSize(1); + auto* configured681 = configured680->setBaseItemTypeAndMaterial(0x3c, 6); + configured681->setDescriptionId(StringIDs::LeatherHorseArmor, + StringIDs::ASpecialTypeOfArmorThatCanBeDyedAnd1); + registerItem(0x1c5, name, item678); + } + { + std::wstring name(L"debug_fourj_item"); + auto* item682 = static_cast(::operator new(sizeof(DebugFourjItem))); + std::memset(static_cast(item682), 0, sizeof(DebugFourjItem)); + new (item682) DebugFourjItem(); + std::wstring icon(L"barrier"); + item682->setIconName(icon); + registerItem(0x8cf, name, item682); + } + { + std::wstring name(L"record_13"); + std::wstring icon(L"13"); + auto* item683 = new RecordItem(icon, StringIDs::C41813, SoundEvents::RECORD_13); + item683->setDescriptionId(StringIDs::MusicDisc, StringIDs::CollectedByGettingASkeletonToKillA); + registerItem(0x8d0, name, item683); + } + { + std::wstring name(L"record_cat"); + std::wstring icon(L"cat"); + auto* item684 = new RecordItem(icon, StringIDs::C418Cat, SoundEvents::CAT); + item684->setDescriptionId(StringIDs::MusicDisc, StringIDs::CollectedByGettingASkeletonToKillA); + registerItem(0x8d1, name, item684); + } + { + std::wstring name(L"record_blocks"); + std::wstring icon(L"blocks"); + auto* item685 = new RecordItem(icon, StringIDs::C418Blocks, SoundEvents::BLOCKS); + item685->setDescriptionId(StringIDs::MusicDisc, StringIDs::CollectedByGettingASkeletonToKillA); + registerItem(0x8d2, name, item685); + } + { + std::wstring name(L"record_chirp"); + std::wstring icon(L"chirp"); + auto* item686 = new RecordItem(icon, StringIDs::C418Chirp, SoundEvents::CHIRP); + item686->setDescriptionId(StringIDs::MusicDisc, StringIDs::CollectedByGettingASkeletonToKillA); + registerItem(0x8d3, name, item686); + } + { + std::wstring name(L"record_far"); + std::wstring icon(L"far"); + auto* item687 = new RecordItem(icon, 0x88245c3, SoundEvents::FAR); + item687->setDescriptionId(StringIDs::MusicDisc, StringIDs::CollectedByGettingASkeletonToKillA); + registerItem(0x8d4, name, item687); + } + { + std::wstring name(L"record_mall"); + std::wstring icon(L"mall"); + auto* item688 = new RecordItem(icon, StringIDs::C418Mall, SoundEvents::MALL); + item688->setDescriptionId(StringIDs::MusicDisc, StringIDs::CollectedByGettingASkeletonToKillA); + registerItem(0x8d5, name, item688); + } + { + std::wstring name(L"record_mellohi"); + std::wstring icon(L"mellohi"); + auto* item689 = new RecordItem(icon, StringIDs::C418Mellohi, SoundEvents::MELLOHI); + item689->setDescriptionId(StringIDs::MusicDisc, StringIDs::CollectedByGettingASkeletonToKillA); + registerItem(0x8d6, name, item689); + } + { + std::wstring name(L"record_stal"); + std::wstring icon(L"stal"); + auto* item690 = new RecordItem(icon, StringIDs::C418Stal, SoundEvents::STAL); + item690->setDescriptionId(StringIDs::MusicDisc, StringIDs::CollectedByGettingASkeletonToKillA); + registerItem(0x8d7, name, item690); + } + { + std::wstring name(L"record_strad"); + std::wstring icon(L"strad"); + auto* item691 = new RecordItem(icon, StringIDs::C418Strad, SoundEvents::STRAD); + item691->setDescriptionId(StringIDs::MusicDisc, StringIDs::CollectedByGettingASkeletonToKillA); + registerItem(0x8d8, name, item691); + } + { + std::wstring name(L"record_ward"); + std::wstring icon(L"ward"); + auto* item692 = new RecordItem(icon, StringIDs::C418Ward, SoundEvents::WARD); + item692->setDescriptionId(StringIDs::MusicDisc, StringIDs::CollectedByGettingASkeletonToKillA); + registerItem(0x8d9, name, item692); + } + { + std::wstring name(L"record_11"); + std::wstring icon(L"11"); + auto* item693 = new RecordItem(icon, StringIDs::C41811, SoundEvents::RECORD_11); + item693->setDescriptionId(StringIDs::MusicDisc, StringIDs::CollectedByGettingASkeletonToKillA); + registerItem(0x8da, name, item693); + } + { + std::wstring name(L"record_wait"); + std::wstring icon(L"where are we now"); + auto* item694 = new RecordItem(icon, StringIDs::C418Wait, SoundEvents::WHERE_ARE_WE_NOW); + item694->setDescriptionId(StringIDs::MusicDisc, StringIDs::CollectedByGettingASkeletonToKillA); + registerItem(0x8db, name, item694); + } + Items::staticCtor(); +} + +Item* Item::setBaseItemTypeAndMaterial(int type, int material) { + m_baseItemType = type; + m_material = material; + return this; +} + +// name guessed +Item* Item::setDescriptionId(int name) { + m_descriptionId = name; + return this; +} + +// name guessed +Item* Item::setUseDescriptionId(int description) { + m_useDescriptionId = description; + return this; +} + +Item* Item::setDescriptionId(int name, int description) { + return setDescriptionId(name)->setUseDescriptionId(description); +} + +// name guessed +Item* Item::setCraftingRemainingItem(Item* item) { + m_craftingRemainingItem = item; + return this; +} + +// name guessed +Item* Item::setMaxStackSize(int size) { + m_maxStackSize = size; + return this; +} + +// name guessed +Item* Item::setHandEquipped() { + m_handEquipped = true; + return this; +} + +// name guessed +Item* Item::setFlag78(bool value) { + m_byte78 = value; + return this; +} + +void Item::registerItem(int id, const std::wstring& name, Item* item) { + ResourceLocation key(name); + registerItem(id, key, item); +} + +void Item::setStackedByData(bool stackedByData) { + m_stackedByData = stackedByData; +} diff --git a/src/Minecraft.World/net/minecraft/world/item/Item.h b/src/Minecraft.World/net/minecraft/world/item/Item.h index 99756a27..9282a70b 100644 --- a/src/Minecraft.World/net/minecraft/world/item/Item.h +++ b/src/Minecraft.World/net/minecraft/world/item/Item.h @@ -73,7 +73,7 @@ class Item { unsigned int getId(); bool canBeDepleted(); std::wstring getIconName(); - void setIconName(const std::wstring&); + Item* setIconName(const std::wstring&); void setMaxDamage(int); int getMaxDamage(); void setStackedByData(bool); @@ -152,6 +152,17 @@ class Item { virtual int GetOverrideCountColour(); virtual TextureAtlasSprite* GetOverrideCountIcon(not_null_ptr itemInstance); + static unsigned int StoneBlockNameResolver(not_null_ptr); + static unsigned int StoneBlockDescResolver(not_null_ptr); + Item* setBaseItemTypeAndMaterial(int, int); + Item* setDescriptionId(int); + Item* setDescriptionId(int, int); + Item* setUseDescriptionId(int); + Item* setCraftingRemainingItem(Item*); + Item* setMaxStackSize(int); + Item* setHandEquipped(); + Item* setFlag78(bool); + static void staticCtor(); static void staticInit(); diff --git a/src/Minecraft.World/net/minecraft/world/item/ItemBootstrapTypes.h b/src/Minecraft.World/net/minecraft/world/item/ItemBootstrapTypes.h new file mode 100644 index 00000000..f9ff878a --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/ItemBootstrapTypes.h @@ -0,0 +1,368 @@ +#pragma once + +/** Constructor declarations and storage recovered from Item::staticCtor. + * Opaque fields do not supply the still-unreconstructed item behavior. + * Out-of-line destructor declarations retain original external vtable dependencies + * for reconstructed constructors while subclass virtual behavior remains missing. + */ +#include "net/minecraft/world/ArrayWithLength.h" +#include "net/minecraft/world/eINSTANCEOF.h" +#include "net/minecraft/world/entity/mob/MinecartType.h" +#include "net/minecraft/world/item/ArrowItem.h" +#include "net/minecraft/world/item/BlockItem.h" +#include "net/minecraft/world/item/FoodItem.h" +#include "net/minecraft/world/level/block/HalfSlabBlock.h" + +class SoundEvent; + +class SlabBlockItem : public BlockItem { +public: + SlabBlockItem(Block*, HalfSlabBlock*, HalfSlabBlock*); + ~SlabBlockItem() override; + HalfSlabBlock* m_halfSlab; + HalfSlabBlock* m_fullSlab; +}; + +class MultiBlockItem : public BlockItem { +public: + MultiBlockItem(Block*, Block*, unsigned int (*)(not_null_ptr), + unsigned int (*)(not_null_ptr)); + ~MultiBlockItem() override; + Block* m_secondaryBlock; + unsigned int (*m_nameResolver)(not_null_ptr); + unsigned int (*m_descriptionResolver)(not_null_ptr); +}; + +class TintedBlockItem : public BlockItem { +public: + TintedBlockItem(Block*, bool); + ~TintedBlockItem() override; + arrayWithLength m_descriptionIds; + TintedBlockItem* setDescriptionIds(arrayWithLength); +}; + +class LeafBlockItem : public BlockItem { +public: + LeafBlockItem(Block*); + ~LeafBlockItem() override; + Block* m_leavesBlock; +}; + +class PistonBlockItem : public BlockItem { +public: + PistonBlockItem(Block*); + ~PistonBlockItem() override; +}; + +class SnowItem : public BlockItem { +public: + SnowItem(Block*); + ~SnowItem() override; +}; + +class WaterLilyBlockItem : public TintedBlockItem { +public: + WaterLilyBlockItem(Block*); + ~WaterLilyBlockItem() override; +}; + +class AnvilBlockItem : public MultiBlockItem { +public: + AnvilBlockItem(Block*); +}; + +class ShulkerBoxBlockItem : public BlockItem { +public: + ShulkerBoxBlockItem(Block*); + ~ShulkerBoxBlockItem() override; +}; + +class FlintAndSteelItem : public Item { +public: + FlintAndSteelItem(); + ~FlintAndSteelItem() override; +}; + +class BowlFoodItem : public FoodItem { +public: + BowlFoodItem(int); + ~BowlFoodItem() override; +}; + +class BlockPlanterItem : public Item { +public: + BlockPlanterItem(Block*); + ~BlockPlanterItem() override; + Block* m_block; +}; + +class HoeItem : public Item { +public: + HoeItem(const Item::Tier*); + void* m_unknown[1]; +}; + +class SeedItem : public Item { +public: + SeedItem(Block*, Block*); + ~SeedItem() override; + Block* m_crop; + Block* m_farmland; +}; + +class HangingEntityItem : public Item { +public: + HangingEntityItem(eINSTANCEOF); + ~HangingEntityItem() override; + eINSTANCEOF m_type; +}; + +class GoldenAppleItem : public FoodItem { +public: + GoldenAppleItem(int, float, bool); +}; + +class SignItem : public Item { +public: + SignItem(); + ~SignItem() override; +}; + +class DoorItem : public Item { +public: + DoorItem(Block*); + ~DoorItem() override; + Block* m_block; +}; + +class BucketItem : public Item { +public: + BucketItem(Block*); + ~BucketItem() override; + Block* m_block; +}; + +class MinecartItem : public Item { +public: + MinecartItem(const MinecartType*); + void* m_unknown[1]; +}; + +class SaddleItem : public Item { +public: + SaddleItem(); + ~SaddleItem() override; +}; + +class RedStoneDustItem : public Item { +public: + RedStoneDustItem(); + ~RedStoneDustItem() override; +}; + +class SnowballItem : public Item { +public: + SnowballItem(); + ~SnowballItem() override; +}; + +class BoatItem : public Item { +public: + BoatItem(int); + ~BoatItem() override; + int m_type; +}; + +class MilkBucketItem : public Item { +public: + MilkBucketItem(); + ~MilkBucketItem() override; +}; + +class BookItem : public Item { +public: + BookItem(); + ~BookItem() override; +}; + +class EggItem : public Item { +public: + EggItem(); + ~EggItem() override; +}; + +class CompassItem : public Item { +public: + CompassItem(); + void* m_unknown[4]; +}; + +class ClockItem : public Item { +public: + ClockItem(); + void* m_unknown[4]; +}; + +class FishFoodItem : public FoodItem { +public: + FishFoodItem(bool); +}; + +class DyeItem : public Item { +public: + DyeItem(); + void* m_unknown[16]; +}; + +class BedItem : public Item { +public: + BedItem(); + void* m_unknown[1]; +}; + +class ShearsItem : public Item { +public: + ShearsItem(); +}; + +class EnderpearlItem : public Item { +public: + EnderpearlItem(); + ~EnderpearlItem() override; +}; + +class PotionItem : public Item { +public: + PotionItem(); + void* m_unknown[2]; +}; + +class BottleItem : public Item { +public: + BottleItem(); + ~BottleItem() override; +}; + +class EnderEyeItem : public Item { +public: + EnderEyeItem(); + ~EnderEyeItem() override; +}; + +class SpawnEggItem : public Item { +public: + SpawnEggItem(); + void* m_unknown[1]; +}; + +class ExperienceBottleItem : public Item { +public: + ExperienceBottleItem(); + ~ExperienceBottleItem() override; +}; + +class FireChargeItem : public Item { +public: + FireChargeItem(); + void* m_unknown[1]; +}; + +class WritableBookItem : public Item { +public: + WritableBookItem(); + ~WritableBookItem() override; +}; + +class WrittenBookItem : public Item { +public: + WrittenBookItem(); + ~WrittenBookItem() override; +}; + +class SeedFoodItem : public FoodItem { +public: + SeedFoodItem(int, float, Block*, Block*); + void* m_unknown[2]; +}; + +class CarrotOnAStickItem : public Item { +public: + CarrotOnAStickItem(); + ~CarrotOnAStickItem() override; +}; + +class SimpleFoiledItem : public Item { +public: + SimpleFoiledItem(); + ~SimpleFoiledItem() override; +}; + +class FireworksItem : public Item { +public: + FireworksItem(); + ~FireworksItem() override; +}; + +class FireworkChargeItem : public Item { +public: + FireworkChargeItem(); + void* m_unknown[1]; +}; + +class EnchantedBookItem : public Item { +public: + EnchantedBookItem(); + ~EnchantedBookItem() override; +}; + +class NameTagItem : public Item { +public: + NameTagItem(); + ~NameTagItem() override; +}; + +class BannerItem : public BlockItem { +public: + BannerItem(); +}; + +class EndCrystalItem : public Item { +public: + EndCrystalItem(); +}; + +class ChorusFruitItem : public FoodItem { +public: + ChorusFruitItem(int, float); +}; + +class SplashPotionItem : public PotionItem { +public: + SplashPotionItem(); +}; + +class SpectralArrowItem : public ArrowItem { +public: + SpectralArrowItem(); +}; + +class TippedArrowItem : public ArrowItem { +public: + TippedArrowItem(); + void* m_unknown[1]; +}; + +class LingeringPotionItem : public PotionItem { +public: + LingeringPotionItem(); +}; + +class RecordItem : public Item { +public: + RecordItem(const std::wstring&, unsigned int, SoundEvent*); + void* m_unknown[5]; +}; + +namespace ItemBootstrap { +extern const int LEATHER_ARMOR_TEXTURES[2]; +} diff --git a/src/Minecraft.World/net/minecraft/world/item/ItemInstance.cpp b/src/Minecraft.World/net/minecraft/world/item/ItemInstance.cpp index 1b8c457e..86fe0b86 100644 --- a/src/Minecraft.World/net/minecraft/world/item/ItemInstance.cpp +++ b/src/Minecraft.World/net/minecraft/world/item/ItemInstance.cpp @@ -1,8 +1,35 @@ #include "net/minecraft/world/item/ItemInstance.h" #include "com/mojang/nbt/CompoundTag.h" +#include "net/minecraft/client/ui/StringIDs.h" +#include "net/minecraft/resources/ResourceLocation.h" +#include "net/minecraft/world/CensoredString.h" #include "net/minecraft/world/item/Item.h" +#include "net/minecraft/world/item/Items.h" #include "net/minecraft/world/level/block/Block.h" +#include "net/minecraft/world/level/block/Blocks.h" + +#include + +void ItemInstance::init(Item* item, int count, int aux) { + m_count = count; + m_dword14 = 0; + m_damage = aux; + m_item = item; + m_tag = nullptr; + m_byte30 = false; + m_censoredString = std::shared_ptr( + new CensoredString(StringIDs::AwaitingApproval, StringIDs::Censored)); + m_qword58 = nullptr; + m_byte60 = false; + updateEmptyCacheFlag(); +} + +// name guessed +ItemInstance::~ItemInstance() { + if (m_tag) + delete m_tag; +} ItemInstance::ItemInstance(Block* block) { this->init(Item::byBlock(block), 1, 0); @@ -49,3 +76,121 @@ ItemInstance::ItemInstance(CompoundTag* compoundTag) { } this->updateEmptyCacheFlag(); } + +CompoundTag* ItemInstance::save(CompoundTag* tag) { + ResourceLocation key = Items::Registry.getKey(m_item); + tag->putString(L"id", key.toString()); + tag->putByte(L"Count", m_count); + tag->putShort(L"Damage", m_damage); + if (m_tag) + tag->put(L"tag", m_tag->copy()); + return tag; +} + +bool ItemInstance::isEmpty() const { + return this == EMPTY.get() || m_item == nullptr || m_item == Item::byBlock(Blocks::AIR) || m_count < 1; +} + +void ItemInstance::updateEmptyCacheFlag() { + m_isEmpty = isEmpty(); +} + +Item* ItemInstance::getItem() const { + return m_isEmpty ? Item::byBlock(Blocks::AIR) : m_item; +} + +int ItemInstance::getCount() { + return m_isEmpty ? 0 : m_count; +} + +void ItemInstance::setCount(int count) { + m_count = count; + updateEmptyCacheFlag(); +} + +// name guessed +void ItemInstance::grow(int count) { + setCount(m_count + count); +} + +void ItemInstance::shrink(int count) { + grow(-count); +} + +// name guessed +int ItemInstance::getMaxStackSize() { + return getItem()->getMaxStackSize(); +} + +// name guessed +bool ItemInstance::isStackable() { + return getMaxStackSize() > 1 && (!isDamageableItem() || !isDamaged()); +} + +bool ItemInstance::isStackedByData() { + return getItem()->isStackedByData(); +} + +bool ItemInstance::isDamaged() { + return isDamageableItem() && m_damage > 0; +} + +// NON_MATCHING | score: 1101 (lower is better) +bool ItemInstance::isDamageableItem() { + return !m_isEmpty && m_item->getMaxDamage() > 0 && (!hasTag() || !getTag()->getBoolean(L"Unbreakable")); +} + +int ItemInstance::getDamageValue() { + return m_damage; +} + +int ItemInstance::getAuxValue() const { + return m_damage; +} + +bool ItemInstance::hasTag() { + return !m_isEmpty && m_tag != nullptr; +} + +CompoundTag* ItemInstance::getTag() { + return m_tag; +} + +void ItemInstance::setTag(CompoundTag* tag) { + if (m_tag) + delete m_tag; + m_tag = tag; +} + +// NON_MATCHING | score: 1690 (lower is better) +bool ItemInstance::tagMatches(const not_null_ptr& first, + const not_null_ptr& second) { + if (first->isEmpty() && second->isEmpty()) + return true; + if (first->isEmpty() || second->isEmpty()) + return false; + return first->m_tag ? first->m_tag->equals(second->m_tag) : second->m_tag == nullptr; +} + +not_null_ptr ItemInstance::copy() const { + not_null_ptr result(new ItemInstance(m_item, m_count, m_damage)); + if (m_tag) + result->m_tag = m_tag->copy(); + return result; +} + +// name guessed +not_null_ptr ItemInstance::split(int count) { + int amount = std::min(count, m_count); + auto result = copy(); + result->setCount(amount); + shrink(amount); + if (m_count < 1) + m_count = 0; + return result; +} + +// name guessed +void ItemInstance::setPopTime(int ticks) { + m_dword14 = ticks; +} diff --git a/src/Minecraft.World/net/minecraft/world/item/ItemInstance.h b/src/Minecraft.World/net/minecraft/world/item/ItemInstance.h index 8cfecdab..51bd6942 100644 --- a/src/Minecraft.World/net/minecraft/world/item/ItemInstance.h +++ b/src/Minecraft.World/net/minecraft/world/item/ItemInstance.h @@ -5,6 +5,7 @@ #include #include +#include class Block; class BlockState; @@ -23,7 +24,7 @@ class Random; class Tag; class CensoredString; -class ItemInstance { +class ItemInstance : public std::enable_shared_from_this { public: static not_null_ptr EMPTY; @@ -53,7 +54,7 @@ class ItemInstance { void use(Level*, std::shared_ptr, InteractionHand::EInteractionHand); void finishUsingItem(Level*, std::shared_ptr); CompoundTag* save(CompoundTag*); - void getMaxStackSize(); + int getMaxStackSize(); bool hasTag(); CompoundTag* getTag(); bool isDamageableItem(); @@ -130,8 +131,6 @@ class ItemInstance { bool operator=(const ItemInstance&); private: - void* m_qword0 = nullptr; - void* m_qword8 = nullptr; int m_count; int m_dword14; Item* m_item; @@ -139,11 +138,12 @@ class ItemInstance { bool m_isEmpty; int m_damage; bool m_byte30; - void* m_qword38 = nullptr; - void* m_qword40 = nullptr; - std::shared_ptr m_censoredString; + std::weak_ptr m_frame; + std::shared_ptr m_censoredString; void* m_qword58; bool m_byte60; void* m_qword68; void* m_qword70; }; + +ASSERT_SIZEOF(ItemInstance, 0x78) diff --git a/src/Minecraft.World/net/minecraft/world/item/ItemResolvers.cpp b/src/Minecraft.World/net/minecraft/world/item/ItemResolvers.cpp new file mode 100644 index 00000000..3a5c17d4 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/ItemResolvers.cpp @@ -0,0 +1,268 @@ +#include "net/minecraft/world/item/ItemResolvers.h" + +#include "net/minecraft/client/ui/StringIDs.h" +#include "net/minecraft/world/item/DyeColor.h" +#include "net/minecraft/world/item/ItemInstance.h" +#include "net/minecraft/world/level/block/Blocks.h" +#include "net/minecraft/world/level/block/DirtBlock.h" +#include "net/minecraft/world/level/block/DoublePlantBlock.h" +#include "net/minecraft/world/level/block/FlowerBlock.h" +#include "net/minecraft/world/level/block/MonsterEggBlock.h" +#include "net/minecraft/world/level/block/NewLogBlock.h" +#include "net/minecraft/world/level/block/OldLogBlock.h" +#include "net/minecraft/world/level/block/PlanksBlock.h" +#include "net/minecraft/world/level/block/PrismarineBlock.h" +#include "net/minecraft/world/level/block/RedSandStoneBlock.h" +#include "net/minecraft/world/level/block/SandBlock.h" +#include "net/minecraft/world/level/block/SandStoneBlock.h" +#include "net/minecraft/world/level/block/SpongeBlock.h" +#include "net/minecraft/world/level/block/StoneBlock.h" +#include "net/minecraft/world/level/block/StoneBrickBlock.h" +#include "net/minecraft/world/level/block/WallBlock.h" +#include "net/minecraft/world/level/block/state/BlockState.h" +#include "net/minecraft/world/level/block/state/BooleanProperty.h" + +BooleanProperty* SpongeBlock::WET; // name guessed + +namespace ItemResolvers { +extern const unsigned int LOG_NAMES[6] = { + StringIDs::OakWood, StringIDs::SpruceWood, StringIDs::BirchWood, + StringIDs::JungleWood, StringIDs::AcaciaWood, StringIDs::DarkOakWood, +}; + +const unsigned int ANVIL_NAMES[3] = { + StringIDs::BlockOfQuartz, + StringIDs::ChiseledQuartzBlock, + StringIDs::PillarQuartzBlock, +}; + +const unsigned int WOOL_NAMES[16] = { + StringIDs::BlackWool, StringIDs::RedWool, StringIDs::GreenWool, StringIDs::BrownWool, + StringIDs::BlueWool, StringIDs::PurpleWool, StringIDs::CyanWool, StringIDs::LightGrayWool, + StringIDs::GrayWool, StringIDs::PinkWool, StringIDs::LimeWool, StringIDs::YellowWool, + StringIDs::LightBlueWool, StringIDs::MagentaWool, StringIDs::OrangeWool, StringIDs::WhiteWool, +}; + +const unsigned int STAINEDCLAY_NAMES[16] = { + StringIDs::BlackTerracotta, StringIDs::RedTerracotta, StringIDs::GreenTerracotta, + StringIDs::BrownTerracotta, StringIDs::BlueTerracotta, StringIDs::PurpleTerracotta, + StringIDs::CyanTerracotta, StringIDs::LightGrayTerracotta, StringIDs::GrayTerracotta, + StringIDs::PinkTerracotta, StringIDs::LimeTerracotta, StringIDs::YellowTerracotta, + StringIDs::LightBlueTerracotta, StringIDs::MagentaTerracotta, StringIDs::OrangeTerracotta, + StringIDs::WhiteTerracotta, +}; + +const unsigned int STAINEDGLASSPANE_NAMES[16] = { + StringIDs::BlackCarpet, StringIDs::RedCarpet, StringIDs::GreenCarpet, StringIDs::BrownCarpet, + StringIDs::BlueCarpet, StringIDs::PurpleCarpet, StringIDs::CyanCarpet, StringIDs::LightGrayCarpet, + StringIDs::GrayCarpet, StringIDs::PinkCarpet, StringIDs::LimeCarpet, StringIDs::YellowCarpet, + StringIDs::LightBlueCarpet, StringIDs::MagentaCarpet, StringIDs::OrangeCarpet, StringIDs::WhiteCarpet, +}; + +const unsigned int CARPET_NAMES[16] = { + StringIDs::BlackStainedGlass, StringIDs::RedStainedGlass, StringIDs::GreenStainedGlass, + StringIDs::BrownStainedGlass, StringIDs::BlueStainedGlass, StringIDs::PurpleStainedGlass, + StringIDs::CyanStainedGlass, StringIDs::LightGrayStainedGlass, StringIDs::GrayStainedGlass, + StringIDs::PinkStainedGlass, StringIDs::LimeStainedGlass, StringIDs::YellowStainedGlass, + StringIDs::LightBlueStainedGlass, StringIDs::MagentaStainedGlass, StringIDs::OrangeStainedGlass, + StringIDs::WhiteStainedGlass, +}; + +const unsigned int STAINEDGLASS_NAMES[16] = { + StringIDs::BlackStainedGlassPane, StringIDs::RedStainedGlassPane, + StringIDs::GreenStainedGlassPane, StringIDs::BrownStainedGlassPane, + StringIDs::BlueStainedGlassPane, StringIDs::PurpleStainedGlassPane, + StringIDs::CyanStainedGlassPane, StringIDs::LightGrayStainedGlassPane, + StringIDs::GrayStainedGlassPane, StringIDs::PinkStainedGlassPane, + StringIDs::LimeStainedGlassPane, StringIDs::YellowStainedGlassPane, + StringIDs::LightBlueStainedGlassPane, StringIDs::MagentaStainedGlassPane, + StringIDs::OrangeStainedGlassPane, StringIDs::WhiteStainedGlassPane, +}; + +const unsigned int CONCRETE_NAMES[16] = { + StringIDs::BlackConcrete, StringIDs::RedConcrete, StringIDs::GreenConcrete, + StringIDs::BrownConcrete, StringIDs::BlueConcrete, StringIDs::PurpleConcrete, + StringIDs::CyanConcrete, StringIDs::LightGrayConcrete, StringIDs::GrayConcrete, + StringIDs::PinkConcrete, StringIDs::LimeConcrete, StringIDs::YellowConcrete, + StringIDs::LightBlueConcrete, StringIDs::MagentaConcrete, StringIDs::OrangeConcrete, + StringIDs::WhiteConcrete, +}; + +const unsigned int CONCRETEPOWDER_NAMES[16] = { + StringIDs::BlackConcretePowder, StringIDs::RedConcretePowder, StringIDs::GreenConcretePowder, + StringIDs::BrownConcretePowder, StringIDs::BlueConcretePowder, StringIDs::PurpleConcretePowder, + StringIDs::CyanConcretePowder, StringIDs::LightGrayConcretePowder, StringIDs::GrayConcretePowder, + StringIDs::PinkConcretePowder, StringIDs::LimeConcretePowder, StringIDs::YellowConcretePowder, + StringIDs::LightBlueConcretePowder, StringIDs::MagentaConcretePowder, StringIDs::OrangeConcretePowder, + StringIDs::WhiteConcretePowder, +}; + +} // namespace ItemResolvers + +unsigned int Item::StoneBlockNameResolver(not_null_ptr item) { + return StoneBlock::Variant::byData(item->getAuxValue())->getNameId(); +} + +unsigned int Item::StoneBlockDescResolver(not_null_ptr item) { + return StoneBlock::Variant::byData(item->getAuxValue())->getDescriptionId(); +} + +// name guessed +unsigned int ItemResolvers::DirtBlockName(not_null_ptr item) { + return DirtBlock::Variant::byData(item->getAuxValue())->getNameId(); +} + +// name guessed +unsigned int ItemResolvers::DirtBlockDesc(not_null_ptr item) { + return DirtBlock::Variant::byData(item->getAuxValue())->getDescriptionId(); +} + +// name guessed +unsigned int ItemResolvers::PlanksBlockName(not_null_ptr item) { + return PlanksBlock::Variant::byData(item->getAuxValue())->getNameId(); +} + +// name guessed +unsigned int ItemResolvers::SandBlockName(not_null_ptr item) { + return SandBlock::Variant::byData(item->getAuxValue())->getNameId(); +} + +// name guessed +unsigned int ItemResolvers::SandBlockDesc(not_null_ptr item) { + return SandBlock::Variant::byData(item->getAuxValue())->getDescriptionId(); +} + +// name guessed +unsigned int ItemResolvers::SandStoneBlockName(not_null_ptr item) { + return SandStoneBlock::Variant::byData(item->getAuxValue())->getNameId(); +} + +// name guessed +unsigned int ItemResolvers::MonsterEggBlockName(not_null_ptr item) { + return MonsterEggBlock::Variant::byData(item->getAuxValue())->getTranslationKey(); +} + +// name guessed +unsigned int ItemResolvers::StoneBrickBlockName(not_null_ptr item) { + return StoneBrickBlock::Variant::byData(item->getAuxValue())->getTranslationKey(); +} + +// name guessed +unsigned int ItemResolvers::WallBlockName(not_null_ptr item) { + return WallBlock::Variant::byData(item->getAuxValue())->getNameId(); +} + +// name guessed +unsigned int ItemResolvers::DoublePlantBlockName(not_null_ptr item) { + return DoublePlantBlock::Variant::byData(item->getAuxValue())->getNameId(); +} + +// name guessed +unsigned int ItemResolvers::DoublePlantBlockDesc(not_null_ptr item) { + return DoublePlantBlock::Variant::byData(item->getAuxValue())->getDescriptionId(); +} + +// name guessed +unsigned int ItemResolvers::PrismarineBlockName(not_null_ptr item) { + return PrismarineBlock::Variant::byData(item->getAuxValue())->getNameId(); +} + +// name guessed +unsigned int ItemResolvers::PrismarineBlockDesc(not_null_ptr item) { + return PrismarineBlock::Variant::byData(item->getAuxValue())->getDescriptionId(); +} + +// name guessed +unsigned int ItemResolvers::RedSandStoneBlockName(not_null_ptr item) { + return RedSandStoneBlock::Variant::byData(item->getAuxValue())->getNameId(); +} + +// name guessed +unsigned int ItemResolvers::WoolName(not_null_ptr item) { + return WOOL_NAMES[DyeColor::byItemData(item->getAuxValue())->getBlockData()]; +} + +// name guessed +unsigned int ItemResolvers::StainedClayName(not_null_ptr item) { + return STAINEDCLAY_NAMES[DyeColor::byItemData(item->getAuxValue())->getBlockData()]; +} + +// name guessed +unsigned int ItemResolvers::StainedGlassPaneName(not_null_ptr item) { + return STAINEDGLASSPANE_NAMES[DyeColor::byItemData(item->getAuxValue())->getBlockData()]; +} + +// name guessed +unsigned int ItemResolvers::CarpetName(not_null_ptr item) { + return CARPET_NAMES[DyeColor::byItemData(item->getAuxValue())->getBlockData()]; +} + +// name guessed +unsigned int ItemResolvers::StainedGlassName(not_null_ptr item) { + return STAINEDGLASS_NAMES[DyeColor::byItemData(item->getAuxValue())->getBlockData()]; +} + +// name guessed +unsigned int ItemResolvers::ConcreteName(not_null_ptr item) { + return CONCRETE_NAMES[DyeColor::byItemData(item->getAuxValue())->getBlockData()]; +} + +// name guessed +unsigned int ItemResolvers::ConcretePowderName(not_null_ptr item) { + return CONCRETEPOWDER_NAMES[DyeColor::byItemData(item->getAuxValue())->getBlockData()]; +} + +// name guessed +unsigned int ItemResolvers::SaplingName(not_null_ptr item) { + return Blocks::SAPLING->getDescriptionId(item->getAuxValue()); +} + +// name guessed +unsigned int ItemResolvers::LogName(not_null_ptr item) { + return LOG_NAMES[Blocks::LOG->getBlockState(item->getAuxValue()) + ->getValue(OldLogBlock::VARIANT) + ->getData()]; +} + +// name guessed +unsigned int ItemResolvers::Log2Name(not_null_ptr item) { + return LOG_NAMES[Blocks::LOG2->getBlockState(item->getAuxValue()) + ->getValue(NewLogBlock::VARIANT) + ->getData()]; +} + +// name guessed +unsigned int ItemResolvers::SpongeName(not_null_ptr item) { + return Blocks::SPONGE->getBlockState(item->getAuxValue())->getValue(SpongeBlock::WET) ? + StringIDs::WetSponge : + StringIDs::Sponge; +} + +// name guessed +unsigned int ItemResolvers::SpongeDesc(not_null_ptr item) { + return Blocks::SPONGE->getBlockState(item->getAuxValue())->getValue(SpongeBlock::WET) ? + StringIDs::CanBeDriedInAFurnaceAllowingSponge : + StringIDs::CanAbsorbWaterNearbyTurningIntoAWet; +} + +// name guessed +unsigned int ItemResolvers::FlowerName(not_null_ptr item) { + FlowerBlock* block = static_cast(Block::byId(item->getItem()->getId())); + return block->getBlockState(item->getAuxValue()) + ->getValue(block->m_flowerProperty) + ->getNameId(); +} + +// name guessed +unsigned int ItemResolvers::FlowerDesc(not_null_ptr item) { + FlowerBlock* block = static_cast(Block::byId(item->getItem()->getId())); + return block->getBlockState(item->getAuxValue()) + ->getValue(block->m_flowerProperty) + ->getDescriptionId(); +} + +// name guessed +unsigned int ItemResolvers::AnvilName(not_null_ptr item) { + int aux = item->getAuxValue(); + return ANVIL_NAMES[static_cast(aux) > 2 ? 0 : aux]; +} diff --git a/src/Minecraft.World/net/minecraft/world/item/ItemResolvers.h b/src/Minecraft.World/net/minecraft/world/item/ItemResolvers.h new file mode 100644 index 00000000..c1b6f6d5 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/ItemResolvers.h @@ -0,0 +1,38 @@ +#pragma once + +#include "net/minecraft/world/item/Item.h" + +/** Subtype callbacks referenced by Item::staticCtor. */ +// name guessed: callback names describe their returned subtypes. +namespace ItemResolvers { +extern const unsigned int LOG_NAMES[6]; +unsigned int DirtBlockName(not_null_ptr); +unsigned int DirtBlockDesc(not_null_ptr); +unsigned int PlanksBlockName(not_null_ptr); +unsigned int SandBlockName(not_null_ptr); +unsigned int SandBlockDesc(not_null_ptr); +unsigned int SandStoneBlockName(not_null_ptr); +unsigned int MonsterEggBlockName(not_null_ptr); +unsigned int StoneBrickBlockName(not_null_ptr); +unsigned int WallBlockName(not_null_ptr); +unsigned int DoublePlantBlockName(not_null_ptr); +unsigned int DoublePlantBlockDesc(not_null_ptr); +unsigned int PrismarineBlockName(not_null_ptr); +unsigned int PrismarineBlockDesc(not_null_ptr); +unsigned int RedSandStoneBlockName(not_null_ptr); +unsigned int WoolName(not_null_ptr); +unsigned int StainedClayName(not_null_ptr); +unsigned int StainedGlassPaneName(not_null_ptr); +unsigned int CarpetName(not_null_ptr); +unsigned int StainedGlassName(not_null_ptr); +unsigned int ConcreteName(not_null_ptr); +unsigned int ConcretePowderName(not_null_ptr); +unsigned int SaplingName(not_null_ptr); +unsigned int LogName(not_null_ptr); +unsigned int Log2Name(not_null_ptr); +unsigned int SpongeName(not_null_ptr); +unsigned int SpongeDesc(not_null_ptr); +unsigned int FlowerName(not_null_ptr); +unsigned int FlowerDesc(not_null_ptr); +unsigned int AnvilName(not_null_ptr); +} // namespace ItemResolvers diff --git a/src/Minecraft.World/net/minecraft/world/item/Items.h b/src/Minecraft.World/net/minecraft/world/item/Items.h index c41514d8..a799a198 100644 --- a/src/Minecraft.World/net/minecraft/world/item/Items.h +++ b/src/Minecraft.World/net/minecraft/world/item/Items.h @@ -1,5 +1,7 @@ #pragma once +#include + #include "net/minecraft/client/resources/MappedRegistry.h" #include diff --git a/src/Minecraft.World/net/minecraft/world/item/LeadItem.cpp b/src/Minecraft.World/net/minecraft/world/item/LeadItem.cpp new file mode 100644 index 00000000..a4736f64 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/LeadItem.cpp @@ -0,0 +1,6 @@ +#include "net/minecraft/world/item/LeadItem.h" + +#include "net/minecraft/world/item/ItemBootstrapTypes.h" + +// name guessed +LeadItem::LeadItem() {} diff --git a/src/Minecraft.World/net/minecraft/world/item/LeadItem.h b/src/Minecraft.World/net/minecraft/world/item/LeadItem.h index e29b734f..c670b19d 100644 --- a/src/Minecraft.World/net/minecraft/world/item/LeadItem.h +++ b/src/Minecraft.World/net/minecraft/world/item/LeadItem.h @@ -4,5 +4,7 @@ class LeadItem : public Item { public: + LeadItem(); + ~LeadItem() override; static bool bindPlayerMobsTest(std::shared_ptr player, Level* level, const BlockPos& pos); }; diff --git a/src/Minecraft.World/net/minecraft/world/item/LeafBlockItem.cpp b/src/Minecraft.World/net/minecraft/world/item/LeafBlockItem.cpp new file mode 100644 index 00000000..e5438b2b --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/LeafBlockItem.cpp @@ -0,0 +1,7 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" + +// name guessed +LeafBlockItem::LeafBlockItem(Block* block) : BlockItem(block), m_leavesBlock(block) { + setMaxDamage(0); + setStackedByData(true); +} diff --git a/src/Minecraft.World/net/minecraft/world/item/MilkBucketItem.cpp b/src/Minecraft.World/net/minecraft/world/item/MilkBucketItem.cpp new file mode 100644 index 00000000..64ccec98 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/MilkBucketItem.cpp @@ -0,0 +1,7 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" +#include "net/minecraft/world/item/LeadItem.h" + +// name guessed +MilkBucketItem::MilkBucketItem() { + setMaxStackSize(1); +} diff --git a/src/Minecraft.World/net/minecraft/world/item/MultiBlockItem.cpp b/src/Minecraft.World/net/minecraft/world/item/MultiBlockItem.cpp new file mode 100644 index 00000000..a7f212a1 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/MultiBlockItem.cpp @@ -0,0 +1,11 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" + +// name guessed +MultiBlockItem::MultiBlockItem(Block* block, Block* secondaryBlock, + unsigned int (*nameResolver)(not_null_ptr), + unsigned int (*descriptionResolver)(not_null_ptr)) + : BlockItem(block), m_secondaryBlock(secondaryBlock), m_nameResolver(nameResolver), + m_descriptionResolver(descriptionResolver) { + setMaxDamage(0); + setStackedByData(true); +} diff --git a/src/Minecraft.World/net/minecraft/world/item/NameTagItem.cpp b/src/Minecraft.World/net/minecraft/world/item/NameTagItem.cpp new file mode 100644 index 00000000..1c756dad --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/NameTagItem.cpp @@ -0,0 +1,4 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" + +// name guessed +NameTagItem::NameTagItem() {} diff --git a/src/Minecraft.World/net/minecraft/world/item/PistonBlockItem.cpp b/src/Minecraft.World/net/minecraft/world/item/PistonBlockItem.cpp new file mode 100644 index 00000000..3c0559f1 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/PistonBlockItem.cpp @@ -0,0 +1,4 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" + +// name guessed +PistonBlockItem::PistonBlockItem(Block* block) : BlockItem(block) {} diff --git a/src/Minecraft.World/net/minecraft/world/item/RedStoneDustItem.cpp b/src/Minecraft.World/net/minecraft/world/item/RedStoneDustItem.cpp new file mode 100644 index 00000000..b7125947 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/RedStoneDustItem.cpp @@ -0,0 +1,4 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" + +// name guessed +RedStoneDustItem::RedStoneDustItem() {} diff --git a/src/Minecraft.World/net/minecraft/world/item/SaddleItem.cpp b/src/Minecraft.World/net/minecraft/world/item/SaddleItem.cpp new file mode 100644 index 00000000..aa031026 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/SaddleItem.cpp @@ -0,0 +1,7 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" +#include "net/minecraft/world/item/LeadItem.h" + +// name guessed +SaddleItem::SaddleItem() { + m_maxStackSize = 1; +} diff --git a/src/Minecraft.World/net/minecraft/world/item/SeedItem.cpp b/src/Minecraft.World/net/minecraft/world/item/SeedItem.cpp new file mode 100644 index 00000000..c4b906f2 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/SeedItem.cpp @@ -0,0 +1,5 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" +#include "net/minecraft/world/item/LeadItem.h" + +// name guessed +SeedItem::SeedItem(Block* crop, Block* farmland) : m_crop(crop), m_farmland(farmland) {} diff --git a/src/Minecraft.World/net/minecraft/world/item/ShulkerBoxBlockItem.cpp b/src/Minecraft.World/net/minecraft/world/item/ShulkerBoxBlockItem.cpp new file mode 100644 index 00000000..e465939f --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/ShulkerBoxBlockItem.cpp @@ -0,0 +1,6 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" + +// name guessed +ShulkerBoxBlockItem::ShulkerBoxBlockItem(Block* block) : BlockItem(block) { + setMaxStackSize(1); +} diff --git a/src/Minecraft.World/net/minecraft/world/item/SignItem.cpp b/src/Minecraft.World/net/minecraft/world/item/SignItem.cpp new file mode 100644 index 00000000..33ce2674 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/SignItem.cpp @@ -0,0 +1,6 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" + +// name guessed +SignItem::SignItem() { + m_maxStackSize = 16; +} diff --git a/src/Minecraft.World/net/minecraft/world/item/SimpleFoiledItem.cpp b/src/Minecraft.World/net/minecraft/world/item/SimpleFoiledItem.cpp new file mode 100644 index 00000000..4f404d08 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/SimpleFoiledItem.cpp @@ -0,0 +1,4 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" + +// name guessed +SimpleFoiledItem::SimpleFoiledItem() {} diff --git a/src/Minecraft.World/net/minecraft/world/item/SkullItem.h b/src/Minecraft.World/net/minecraft/world/item/SkullItem.h index f6976414..a3daaaa1 100644 --- a/src/Minecraft.World/net/minecraft/world/item/SkullItem.h +++ b/src/Minecraft.World/net/minecraft/world/item/SkullItem.h @@ -2,4 +2,7 @@ #include "net/minecraft/world/item/Item.h" -class SkullItem : public Item {}; +class SkullItem : public Item { +public: + SkullItem(); +}; diff --git a/src/Minecraft.World/net/minecraft/world/item/SlabBlockItem.cpp b/src/Minecraft.World/net/minecraft/world/item/SlabBlockItem.cpp new file mode 100644 index 00000000..6c2544d0 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/SlabBlockItem.cpp @@ -0,0 +1,8 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" + +// name guessed +SlabBlockItem::SlabBlockItem(Block* block, HalfSlabBlock* halfSlab, HalfSlabBlock* fullSlab) + : BlockItem(block), m_halfSlab(halfSlab), m_fullSlab(fullSlab) { + setMaxDamage(0); + setStackedByData(true); +} diff --git a/src/Minecraft.World/net/minecraft/world/item/SnowItem.cpp b/src/Minecraft.World/net/minecraft/world/item/SnowItem.cpp new file mode 100644 index 00000000..1c61263c --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/SnowItem.cpp @@ -0,0 +1,7 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" + +// name guessed +SnowItem::SnowItem(Block* block) : BlockItem(block) { + setMaxDamage(0); + setStackedByData(true); +} diff --git a/src/Minecraft.World/net/minecraft/world/item/SnowballItem.cpp b/src/Minecraft.World/net/minecraft/world/item/SnowballItem.cpp new file mode 100644 index 00000000..5651196b --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/SnowballItem.cpp @@ -0,0 +1,7 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" +#include "net/minecraft/world/item/LeadItem.h" + +// name guessed +SnowballItem::SnowballItem() { + m_maxStackSize = 16; +} diff --git a/src/Minecraft.World/net/minecraft/world/item/SwordItem.h b/src/Minecraft.World/net/minecraft/world/item/SwordItem.h index 1e5685ff..5457e32e 100644 --- a/src/Minecraft.World/net/minecraft/world/item/SwordItem.h +++ b/src/Minecraft.World/net/minecraft/world/item/SwordItem.h @@ -2,4 +2,8 @@ #include "net/minecraft/world/item/Item.h" -class SwordItem : public Item {}; +class SwordItem : public Item { +public: + SwordItem(const Item::Tier*); + void* m_unknown[1]; +}; diff --git a/src/Minecraft.World/net/minecraft/world/item/TintedBlockItem.cpp b/src/Minecraft.World/net/minecraft/world/item/TintedBlockItem.cpp new file mode 100644 index 00000000..d66428c1 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/TintedBlockItem.cpp @@ -0,0 +1,18 @@ +#include "net/minecraft/world/effect/MobEffectInstance.h" + +#include "net/minecraft/world/item/ItemBootstrapTypes.h" + +TintedBlockItem::TintedBlockItem(Block* block, bool stackedByData) : BlockItem(block) { + if (stackedByData) { + setMaxDamage(0); + setStackedByData(true); + } +} + +// name guessed +TintedBlockItem* TintedBlockItem::setDescriptionIds(arrayWithLength ids) { + m_descriptionIds = arrayWithLength(ids.m_length, true); + for (unsigned int i = 0; i < ids.m_length; ++i) + m_descriptionIds[i] = ids[i]; + return this; +} diff --git a/src/Minecraft.World/net/minecraft/world/item/WaterLilyBlockItem.cpp b/src/Minecraft.World/net/minecraft/world/item/WaterLilyBlockItem.cpp new file mode 100644 index 00000000..25457ffb --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/WaterLilyBlockItem.cpp @@ -0,0 +1,4 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" + +// name guessed +WaterLilyBlockItem::WaterLilyBlockItem(Block* block) : TintedBlockItem(block, false) {} diff --git a/src/Minecraft.World/net/minecraft/world/item/WritableBookItem.cpp b/src/Minecraft.World/net/minecraft/world/item/WritableBookItem.cpp new file mode 100644 index 00000000..1ae59ed8 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/WritableBookItem.cpp @@ -0,0 +1,7 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" +#include "net/minecraft/world/item/LeadItem.h" + +// name guessed +WritableBookItem::WritableBookItem() { + setMaxStackSize(1); +} diff --git a/src/Minecraft.World/net/minecraft/world/item/WrittenBookItem.cpp b/src/Minecraft.World/net/minecraft/world/item/WrittenBookItem.cpp new file mode 100644 index 00000000..9d165c4e --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/item/WrittenBookItem.cpp @@ -0,0 +1,7 @@ +#include "net/minecraft/world/item/ItemBootstrapTypes.h" +#include "net/minecraft/world/item/LeadItem.h" + +// name guessed +WrittenBookItem::WrittenBookItem() { + setMaxStackSize(1); +} diff --git a/src/Minecraft.World/net/minecraft/world/level/BaseMobSpawner.h b/src/Minecraft.World/net/minecraft/world/level/BaseMobSpawner.h new file mode 100644 index 00000000..fa925feb --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/level/BaseMobSpawner.h @@ -0,0 +1,10 @@ +#pragma once + +class ResourceLocation; + +class BaseMobSpawner { +public: + virtual ~BaseMobSpawner(); + virtual ResourceLocation getEntityId(); + virtual void setEntityId(const ResourceLocation&); +}; diff --git a/src/Minecraft.World/net/minecraft/world/level/Level.h b/src/Minecraft.World/net/minecraft/world/level/Level.h index 05a2cd92..0f7240e2 100644 --- a/src/Minecraft.World/net/minecraft/world/level/Level.h +++ b/src/Minecraft.World/net/minecraft/world/level/Level.h @@ -149,6 +149,7 @@ class Level : public LevelSource { ChunkSource* getChunkSource(); long long getSeed(); int getSeaLevel(); + bool setBlockAndData(int x, int y, int z, int id, int data, int flags); void setSeaLevel(int); static void enableLightingCache(); void setSpawnPos(const BlockPos&); @@ -173,6 +174,7 @@ class Level : public LevelSource { int getRawBrightness(const BlockPos&, bool); int getHeightmapHeight(int, int); int getHeightmap(int, int); + bool isSolidBlockingBlockInLoadedChunk(const BlockPos&, bool defaultValue); bool isWithinLevelBounds(int, int); int getBrightnessPropagate(LightLayer::variety, const BlockPos&); long getGameTime(); @@ -200,9 +202,13 @@ class Level : public LevelSource { bool hasChunksAt(const BlockPos&, const BlockPos&); int getAuxValueForMap(PlayerUID, int, int, int, int); std::shared_ptr getSavedData(const std::type_info&, const std::wstring&); + LevelStorage* getLevelStorage(); void setSavedData(const std::wstring&, std::shared_ptr); std::vector>* getEntitiesOfClass(const std::type_info&, AABB const*); bool shouldFreezeIgnoreNeighbors(const BlockPos&); + bool shouldFreeze(const BlockPos&, bool checkNeighbors); + bool shouldFreezeWithNeighbors(const BlockPos&); + bool isWaterAt(const BlockPos&); bool shouldSnow(const BlockPos&, bool); bool isFindingSpawn(); unsigned int countInstanceOf(eINSTANCEOF, bool, unsigned int*, unsigned int*); diff --git a/src/Minecraft.World/net/minecraft/world/level/biome/BeachBiome.h b/src/Minecraft.World/net/minecraft/world/level/biome/BeachBiome.h index 55836188..f0cba0b0 100644 --- a/src/Minecraft.World/net/minecraft/world/level/biome/BeachBiome.h +++ b/src/Minecraft.World/net/minecraft/world/level/biome/BeachBiome.h @@ -5,6 +5,7 @@ class BeachBiome : public Biome { public: BeachBiome(EBiomeIDs id, BiomeProperties* properties); + ~BeachBiome() override = default; int getBaseClass() override; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/biome/Biome.cpp b/src/Minecraft.World/net/minecraft/world/level/biome/Biome.cpp index aa2e74fc..fb9a3221 100644 --- a/src/Minecraft.World/net/minecraft/world/level/biome/Biome.cpp +++ b/src/Minecraft.World/net/minecraft/world/level/biome/Biome.cpp @@ -145,10 +145,10 @@ Biome* Biome::getBiome(int id, Biome* biome) { return biome; } -Block* Biome::getRandomFlower(Random& random, const BlockPos* pos) { +FlowerBlock::Flower* Biome::getRandomFlower(Random& random, const BlockPos* pos) { if (random.nextInt(3) > 0) - return (Block*)FlowerBlock::Flower::YELLOW_FLOWER; - return (Block*)FlowerBlock::Flower::RED_FLOWER; + return FlowerBlock::Flower::YELLOW_FLOWER; + return FlowerBlock::Flower::RED_FLOWER; } unsigned int Biome::getSkyColor(float timeOfDay) { @@ -269,16 +269,7 @@ void Biome::generateColoursDebugOutput() { return; } -// NON_MATCHING | Score: 5785 (lower is better) -// literally took me so many hours to get it finally partially completed (all registered, down to 99k score) -// but then I realized I had to make the last property of the BiomeProperties be set separately instead of -// chained -// ...or did I? Nope, just a waste of time... -// so then I figured out that I had to merge the BiomeProperties constructors directly into the Biome -// constructors... This got me down to like 70k iirc, which was closer but not close enough. then I saw that -// the wstring that gets assigned to the BiomeProperties constructor gets deleted after the var has been -// created but before the static Biome* has been set so that means I had to separate out the Biome's setters -// from the constructor init... and here I am, at 5785 score. -Dexrn +// NON_MATCHING | score: 5785 (lower is better) void Biome::staticCtor() { Biome::OCEAN = new OceanBiome(BiomeID_OCEAN, (new BiomeProperties(L"Ocean"))->depth(-1.0)->scale(0.1)); diff --git a/src/Minecraft.World/net/minecraft/world/level/biome/Biome.h b/src/Minecraft.World/net/minecraft/world/level/biome/Biome.h index c6bafb07..8ae6617b 100644 --- a/src/Minecraft.World/net/minecraft/world/level/biome/Biome.h +++ b/src/Minecraft.World/net/minecraft/world/level/biome/Biome.h @@ -4,6 +4,7 @@ #include #include "net/minecraft/world/WeighedRandomItem.h" +#include "net/minecraft/world/level/block/FlowerBlock.h" #include "net/minecraft/world/level/material/MaterialColor.h" #include "net/minecraft/world/phys/Vec3.h" @@ -16,9 +17,11 @@ class MobCategory; class BiomeDecorator; class Feature; class PerlinSimplexNoise; +class DoublePlantFeature; class Biome { public: + static int getId(Biome*); static Biome* BIOMES[256]; static Biome* OCEAN; @@ -86,6 +89,8 @@ class Biome { static Biome* DEFAULT; // anything that gets a biome will fall back to this once nullptr is hit static PerlinSimplexNoise* TEMPERATURE_NOISE; + static PerlinSimplexNoise* BIOME_INFO_NOISE; + static DoublePlantFeature* DOUBLE_PLANT_FEATURE; enum EBiomeIDs : int { BiomeID_OCEAN = 0, @@ -198,6 +203,9 @@ class Biome { }; class MobSpawnerData : public WeighedRandomItem { + friend class DesertBiome; + friend class IceBiome; + public: MobSpawnerData(int instanceType, int weight, int unk, int unk2) : WeighedRandomItem(weight) { m_instanceType = instanceType; @@ -217,6 +225,15 @@ class Biome { int m_data = 0; }; + static LegacyBlockData STONE; + static LegacyBlockData AIR; + static LegacyBlockData BEDROCK; + static LegacyBlockData GRAVEL; + static LegacyBlockData RED_SANDSTONE; + static LegacyBlockData SANDSTONE; + static LegacyBlockData ICE; + static LegacyBlockData WATER; + Biome(Biome::EBiomeIDs, Biome::BiomeProperties*); static Biome** getBiomes(); static Biome* getBiome(int); @@ -227,8 +244,8 @@ class Biome { virtual ~Biome(); virtual Feature* getTreeFeature(Random&); - virtual void getGrassFeature(Random&); - virtual Block* getRandomFlower(Random&, const BlockPos*); + virtual Feature* getGrassFeature(Random&); + virtual FlowerBlock::Flower* getRandomFlower(Random&, const BlockPos*); virtual unsigned int getSkyColor(float); virtual bool hasSnow(); virtual bool hasRain(); @@ -254,9 +271,10 @@ class Biome { Biome* setNameAndDescription(int name, int desc); Biome* setPreviewColor(eMinecraftColour color); + eMinecraftColour getPreviewColor(); Biome* setWaterSkyColor(eMinecraftColour water, eMinecraftColour sky); - std::vector* getMobs(MobCategory*); + std::vector* getMobs(MobCategory*); std::wstring getName(bool); std::wstring getDescription(); diff --git a/src/Minecraft.World/net/minecraft/world/level/biome/BiomeDecorator.h b/src/Minecraft.World/net/minecraft/world/level/biome/BiomeDecorator.h index 07e18dbf..e49289bd 100644 --- a/src/Minecraft.World/net/minecraft/world/level/biome/BiomeDecorator.h +++ b/src/Minecraft.World/net/minecraft/world/level/biome/BiomeDecorator.h @@ -1,11 +1,13 @@ #pragma once +#include "net/minecraft/core/BlockPos.h" + class Level; class Random; class Biome; -class BlockPos; class Feature; -class ClayFeature; +class FlowerFeature; +class CustomizableSourceSettings; class BiomeDecorator { public: @@ -15,40 +17,47 @@ class BiomeDecorator { virtual void decorate(Biome*, Level*, Random&); virtual void decorateOres(Level*, Random&); -private: - char byte_8; - void* qword_c; - void* qword_18; - ClayFeature* field_20; - void* qword_28; - void* qword_30; - void* qword_38; - void* qword_40; - void* qword_48; - void* qword_50; - void* qword_58; - void* qword_60; - void* qword_68; - void* qword_70; - void* qword_78; - void* qword_80; - void* qword_88; - Feature* field_90; - void* field_98; - void* field_a0; - void* field_a8; - void* field_b0; - void* field_b8; - void* qword_c0; - void* qword_c8; - int dword_d0; - int dword_d4; - void* qword_d8; - void* qword_e0; - int dword_e8; - int dword_ec; - int dword_f0; - int dword_f4; - int dword_f8; - char byte_fc; + void decorateDepthSpan(Level*, Random&, int count, Feature*, int minHeight, int maxHeight); + void decorateDepthAverage(Level*, Random&, int count, Feature*, int centerHeight, int spread); + + bool m_decorating; + BlockPos m_origin; + CustomizableSourceSettings* m_settings; + Feature* m_clay; + Feature* m_sand; + Feature* m_gravelPatch; + Feature* m_dirt; + Feature* m_gravel; + Feature* m_granite; + Feature* m_diorite; + Feature* m_andesite; + Feature* m_coal; + Feature* m_iron; + Feature* m_gold; + Feature* m_redstone; + Feature* m_diamond; + Feature* m_lapis; + FlowerFeature* m_flowers; + Feature* m_brownMushrooms; + Feature* m_redMushrooms; + Feature* m_hugeMushrooms; + Feature* m_reeds; + Feature* m_cactus; + Feature* m_waterlilies; + int m_waterlilyCount; + int m_treeCount; + float m_extraTreeChance; + int m_flowerCount; + int m_grassCount; + int m_deadBushCount; + int m_mushroomCount; + int m_reedCount; + int m_cactusCount; + int m_gravelPatchCount; + int m_sandCount; + int m_clayCount; + int m_hugeMushroomCount; + bool m_generateLiquids; }; + +static_assert(sizeof(BiomeDecorator) == 0x100, "Switch biome decorator layout"); diff --git a/src/Minecraft.World/net/minecraft/world/level/biome/BiomeSource.cpp b/src/Minecraft.World/net/minecraft/world/level/biome/BiomeSource.cpp index e12833b2..684cc31a 100644 --- a/src/Minecraft.World/net/minecraft/world/level/biome/BiomeSource.cpp +++ b/src/Minecraft.World/net/minecraft/world/level/biome/BiomeSource.cpp @@ -1,5 +1,7 @@ #include "net/minecraft/world/level/biome/BiomeSource.h" + #include +#include #include "NX/Platform.h" #include "net/minecraft/client/Minecraft.h" @@ -16,8 +18,7 @@ #include "net/minecraft/world/level/newbiome/layer/Layer.h" #include "net/minecraft/world/level/storage/LevelData.h" -// NON_MATCHING | Score: 535 (lower is better) -// Idk wtf is going on with this one - Azalea +// NON_MATCHING | score: 535 (lower is better) BiomeSource::LayerOverrideSettings::LayerOverrideSettings() { m_field38 = 0; m_genScale = static_cast(-1); @@ -113,7 +114,7 @@ void BiomeSource::LayerOverrideSettings::NullBiomeSection(int x, int z, int widt int end = depth + width; unsigned long len = z * sizeof(Biome*); for (int i = width; i < end; i++) { - memset((void*)&m_biomes[x + m_imageWidth * i], 0, len); + memset((void*)&m_biomes.get(x + m_imageWidth * i), 0, len); } } @@ -198,7 +199,7 @@ Biome* BiomeSource::LayerOverrideSettings::GetBiomeAt(float x, float z) { zPos = zThreshold; unsigned int index = getBiomeIndex(xPos, zPos); - return m_biomes[index]; + return m_biomes.get(index); } BiomeSource::CouldSpawnCache::CouldSpawnCache(BiomeSource* biomeSource, @@ -294,7 +295,7 @@ bool BiomeSource::fjCouldSpawn(const FjFeatureBiomeRequirements* biomeRequiremen } BiomeSource::~BiomeSource() { - nn::os::FinalizeMutex(&m_mutexType); + DeleteCriticalSection(&m_mutexType); delete m_biomeCache; } @@ -322,7 +323,7 @@ void BiomeSource::getRawBiomeBlock(arrayWithLength& biomes, int x, int z PIXBeginNamedEvent(0.0, "Copying values"); for (int i = 0; i < width * depth; i++) { - biomes[i] = Biome::getBiome(area[i], Biome::DEFAULT); + biomes.get(i) = Biome::getBiome(area[i], Biome::DEFAULT); } PIXEndNamedEvent(); } @@ -362,7 +363,7 @@ void BiomeSource::getBiomeBlock(arrayWithLength& biomes, int x, int z, i PIXBeginNamedEvent(0.0, "Copying values"); for (int i = 0; i < width * depth; i++) { - biomes[i] = Biome::getBiome(area[i], Biome::DEFAULT); + biomes.get(i) = Biome::getBiome(area[i], Biome::DEFAULT); } PIXEndNamedEvent(); } diff --git a/src/Minecraft.World/net/minecraft/world/level/biome/DesertBiome.h b/src/Minecraft.World/net/minecraft/world/level/biome/DesertBiome.h index 218bf613..a98cf144 100644 --- a/src/Minecraft.World/net/minecraft/world/level/biome/DesertBiome.h +++ b/src/Minecraft.World/net/minecraft/world/level/biome/DesertBiome.h @@ -7,4 +7,5 @@ class DesertBiome : public Biome { DesertBiome(EBiomeIDs id, BiomeProperties* properties); int getBaseClass() override; + void decorate(Level*, Random&, const BlockPos&) override; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/biome/ExtremeHillsBiome.h b/src/Minecraft.World/net/minecraft/world/level/biome/ExtremeHillsBiome.h index 274f28fe..3d99c95b 100644 --- a/src/Minecraft.World/net/minecraft/world/level/biome/ExtremeHillsBiome.h +++ b/src/Minecraft.World/net/minecraft/world/level/biome/ExtremeHillsBiome.h @@ -2,15 +2,23 @@ #include "net/minecraft/world/level/biome/Biome.h" +class OreFeature; + class ExtremeHillsBiome : public Biome { public: enum EType { DEFAULT = 0, EDGE = 1, M = 2 }; ExtremeHillsBiome(EBiomeIDs id, EType type, BiomeProperties* properties); + ~ExtremeHillsBiome() override; int getBaseClass() override; + Feature* getTreeFeature(Random&) override; + void decorate(Level*, Random&, const BlockPos&) override; + void buildSurfaceAt(Level*, Random&, ChunkPrimer*, int, int, double) override; - char m_padding[0x10]; +private: + OreFeature* m_oreFeature; + EType m_type; }; ASSERT_SIZEOF(ExtremeHillsBiome, 0x158) diff --git a/src/Minecraft.World/net/minecraft/world/level/biome/ForestBiome.h b/src/Minecraft.World/net/minecraft/world/level/biome/ForestBiome.h index d4c0d3b0..0803b9de 100644 --- a/src/Minecraft.World/net/minecraft/world/level/biome/ForestBiome.h +++ b/src/Minecraft.World/net/minecraft/world/level/biome/ForestBiome.h @@ -7,6 +7,18 @@ class ForestBiome : public Biome { enum EType { DEFAULT = 0, FLOWER = 1, BIRCH = 2, ROOFED = 3 }; ForestBiome(EBiomeIDs id, EType type, BiomeProperties* properties); + ~ForestBiome() override = default; int getBaseClass() override; + Feature* getTreeFeature(Random&) override; + FlowerBlock::Flower* getRandomFlower(Random&, const BlockPos*) override; + unsigned int getGrassColor(const BlockPos*) override; + void decorate(Level*, Random&, const BlockPos&) override; + void addMushrooms(Level*, Random&, const BlockPos&); + void addDoublePlants(Level*, Random&, const BlockPos&, int); + +private: + EType m_type; }; + +ASSERT_SIZEOF(ForestBiome, 0x148) diff --git a/src/Minecraft.World/net/minecraft/world/level/biome/HellBiome.h b/src/Minecraft.World/net/minecraft/world/level/biome/HellBiome.h index 09420259..e6c746e9 100644 --- a/src/Minecraft.World/net/minecraft/world/level/biome/HellBiome.h +++ b/src/Minecraft.World/net/minecraft/world/level/biome/HellBiome.h @@ -5,6 +5,11 @@ class HellBiome : public Biome { public: HellBiome(EBiomeIDs id, BiomeProperties* properties); + ~HellBiome() override = default; int getBaseClass() override; + unsigned int getSkyColor(float) override; + Vec3* getFogColor(float, float) const override; + bool isFoggy() override; + bool isNatural() override; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/biome/IceBiome.h b/src/Minecraft.World/net/minecraft/world/level/biome/IceBiome.h index 5256b041..a482a5d5 100644 --- a/src/Minecraft.World/net/minecraft/world/level/biome/IceBiome.h +++ b/src/Minecraft.World/net/minecraft/world/level/biome/IceBiome.h @@ -6,11 +6,17 @@ class IceBiome : public Biome { public: enum EType { DEFAULT = 0, SPIKES = 1 }; - IceBiome(EBiomeIDs id, EType type, BiomeProperties* properties); + IceBiome(EBiomeIDs id, bool spikes, BiomeProperties* properties); int getBaseClass() override; + float getCreatureProbability() override; + Feature* getTreeFeature(Random&) override; + void decorate(Level*, Random&, const BlockPos&) override; - char m_padding[0x10]; +private: + bool m_spikes; + Feature* m_spikeFeature; + Feature* m_patchFeature; }; ASSERT_SIZEOF(IceBiome, 0x158) diff --git a/src/Minecraft.World/net/minecraft/world/level/biome/JungleBiome.h b/src/Minecraft.World/net/minecraft/world/level/biome/JungleBiome.h index 1d503b0b..97f19c49 100644 --- a/src/Minecraft.World/net/minecraft/world/level/biome/JungleBiome.h +++ b/src/Minecraft.World/net/minecraft/world/level/biome/JungleBiome.h @@ -6,7 +6,19 @@ class JungleBiome : public Biome { public: enum EType { DEFAULT = 0, EDGE = 1 }; - JungleBiome(EBiomeIDs id, EType type, BiomeProperties* properties); + JungleBiome(EBiomeIDs id, bool edge, BiomeProperties* properties); + static void staticCtor(); int getBaseClass() override; + Feature* getTreeFeature(Random&) override; + Feature* getGrassFeature(Random&) override; + void decorate(Level*, Random&, const BlockPos&) override; + +private: + static const BlockState* TRUNK; + static const BlockState* LEAVES; + static const BlockState* BUSH_LEAVES; + bool m_edge; }; + +ASSERT_SIZEOF(JungleBiome, 0x148) diff --git a/src/Minecraft.World/net/minecraft/world/level/biome/MesaBiome.h b/src/Minecraft.World/net/minecraft/world/level/biome/MesaBiome.h index 1675830c..4b6c5a92 100644 --- a/src/Minecraft.World/net/minecraft/world/level/biome/MesaBiome.h +++ b/src/Minecraft.World/net/minecraft/world/level/biome/MesaBiome.h @@ -1,15 +1,43 @@ #pragma once #include "net/minecraft/world/level/biome/Biome.h" +#include "net/minecraft/world/level/biome/BiomeDecorator.h" #include "types.h" class MesaBiome : public Biome { public: - MesaBiome(EBiomeIDs id, bool, bool, BiomeProperties* properties); + class MesaDecorator : public BiomeDecorator { + public: + MesaDecorator() = default; + void decorateOres(Level*, Random&) override; + }; + static LegacyBlockData COARSE_DIRT; + static LegacyBlockData GRASS; + static LegacyBlockData HARDENED_CLAY; + static LegacyBlockData STAINED_HARDENED_CLAY; + static LegacyBlockData ORANGE_CLAY; + static LegacyBlockData RED_SAND; + static void staticCtor(); + + MesaBiome(EBiomeIDs id, bool bryce, bool forest, BiomeProperties* properties); + ~MesaBiome() override; int getBaseClass() override; + Feature* getTreeFeature(Random&) override; + unsigned int getGrassColor(const BlockPos*) override; + unsigned int getFoliageColor(const BlockPos*) override; + void buildSurfaceAt(Level*, Random&, ChunkPrimer*, int, int, double) override; + + void generateBands(long long seed); + LegacyBlockData getBand(int x, int y, int z); - char m_padding[0x30]; + LegacyBlockData* m_clayBands; + long long m_seed; + PerlinSimplexNoise* m_pillarNoise; + PerlinSimplexNoise* m_pillarRoofNoise; + PerlinSimplexNoise* m_clayBandsOffsetNoise; + bool m_bryce; + bool m_forest; }; ASSERT_SIZEOF(MesaBiome, 0x178) diff --git a/src/Minecraft.World/net/minecraft/world/level/biome/MushroomIslandBiome.h b/src/Minecraft.World/net/minecraft/world/level/biome/MushroomIslandBiome.h index d3f665aa..4ffa6c07 100644 --- a/src/Minecraft.World/net/minecraft/world/level/biome/MushroomIslandBiome.h +++ b/src/Minecraft.World/net/minecraft/world/level/biome/MushroomIslandBiome.h @@ -5,6 +5,7 @@ class MushroomIslandBiome : public Biome { public: MushroomIslandBiome(EBiomeIDs id, BiomeProperties* properties); + ~MushroomIslandBiome() override = default; int getBaseClass() override; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/biome/MutatedForestBiome.h b/src/Minecraft.World/net/minecraft/world/level/biome/MutatedForestBiome.h index 03f9c5c5..179221bd 100644 --- a/src/Minecraft.World/net/minecraft/world/level/biome/MutatedForestBiome.h +++ b/src/Minecraft.World/net/minecraft/world/level/biome/MutatedForestBiome.h @@ -1,10 +1,10 @@ #pragma once -#include "net/minecraft/world/level/biome/Biome.h" +#include "net/minecraft/world/level/biome/ForestBiome.h" -class MutatedForestBiome : public Biome { +class MutatedForestBiome : public ForestBiome { public: MutatedForestBiome(EBiomeIDs id, BiomeProperties* properties); - int getBaseClass() override; + Feature* getTreeFeature(Random&) override; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/biome/MutatedSavannaBiome.h b/src/Minecraft.World/net/minecraft/world/level/biome/MutatedSavannaBiome.h index 2683132f..aef574e4 100644 --- a/src/Minecraft.World/net/minecraft/world/level/biome/MutatedSavannaBiome.h +++ b/src/Minecraft.World/net/minecraft/world/level/biome/MutatedSavannaBiome.h @@ -1,10 +1,11 @@ #pragma once -#include "net/minecraft/world/level/biome/Biome.h" +#include "net/minecraft/world/level/biome/SavannaBiome.h" -class MutatedSavannaBiome : public Biome { +class MutatedSavannaBiome : public SavannaBiome { public: MutatedSavannaBiome(EBiomeIDs id, BiomeProperties* properties); - int getBaseClass() override; + void buildSurfaceAt(Level*, Random&, ChunkPrimer*, int, int, double) override; + void decorate(Level*, Random&, const BlockPos&) override; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/biome/OceanBiome.h b/src/Minecraft.World/net/minecraft/world/level/biome/OceanBiome.h index 63c22a85..932ec5f7 100644 --- a/src/Minecraft.World/net/minecraft/world/level/biome/OceanBiome.h +++ b/src/Minecraft.World/net/minecraft/world/level/biome/OceanBiome.h @@ -5,6 +5,8 @@ class OceanBiome : public Biome { public: OceanBiome(EBiomeIDs id, BiomeProperties* properties); + ~OceanBiome() override = default; int getBaseClass() override; + int getTemperatureCategory() override; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/biome/PlainsBiome.h b/src/Minecraft.World/net/minecraft/world/level/biome/PlainsBiome.h index 582a3980..ed887a32 100644 --- a/src/Minecraft.World/net/minecraft/world/level/biome/PlainsBiome.h +++ b/src/Minecraft.World/net/minecraft/world/level/biome/PlainsBiome.h @@ -5,6 +5,15 @@ class PlainsBiome : public Biome { public: PlainsBiome(EBiomeIDs id, bool, BiomeProperties* properties); + ~PlainsBiome() override = default; int getBaseClass() override; + Feature* getTreeFeature(Random&) override; + FlowerBlock::Flower* getRandomFlower(Random&, const BlockPos*) override; + void decorate(Level*, Random&, const BlockPos&) override; + +private: + bool m_sunflowers; }; + +ASSERT_SIZEOF(PlainsBiome, 0x148) diff --git a/src/Minecraft.World/net/minecraft/world/level/biome/RiverBiome.h b/src/Minecraft.World/net/minecraft/world/level/biome/RiverBiome.h index 716c777f..ef12394b 100644 --- a/src/Minecraft.World/net/minecraft/world/level/biome/RiverBiome.h +++ b/src/Minecraft.World/net/minecraft/world/level/biome/RiverBiome.h @@ -5,6 +5,7 @@ class RiverBiome : public Biome { public: RiverBiome(EBiomeIDs id, BiomeProperties* properties); + ~RiverBiome() override = default; int getBaseClass() override; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/biome/SavannaBiome.h b/src/Minecraft.World/net/minecraft/world/level/biome/SavannaBiome.h index 0736cc5f..c88c4173 100644 --- a/src/Minecraft.World/net/minecraft/world/level/biome/SavannaBiome.h +++ b/src/Minecraft.World/net/minecraft/world/level/biome/SavannaBiome.h @@ -7,4 +7,6 @@ class SavannaBiome : public Biome { SavannaBiome(EBiomeIDs id, BiomeProperties* properties); int getBaseClass() override; + Feature* getTreeFeature(Random&) override; + void decorate(Level*, Random&, const BlockPos&) override; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/biome/StoneBeachBiome.h b/src/Minecraft.World/net/minecraft/world/level/biome/StoneBeachBiome.h index b8ac5286..49db2bb8 100644 --- a/src/Minecraft.World/net/minecraft/world/level/biome/StoneBeachBiome.h +++ b/src/Minecraft.World/net/minecraft/world/level/biome/StoneBeachBiome.h @@ -5,6 +5,7 @@ class StoneBeachBiome : public Biome { public: StoneBeachBiome(EBiomeIDs id, BiomeProperties* properties); + ~StoneBeachBiome() override = default; int getBaseClass() override; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/biome/SwampBiome.h b/src/Minecraft.World/net/minecraft/world/level/biome/SwampBiome.h index 9e7a3c7d..dda65f28 100644 --- a/src/Minecraft.World/net/minecraft/world/level/biome/SwampBiome.h +++ b/src/Minecraft.World/net/minecraft/world/level/biome/SwampBiome.h @@ -5,8 +5,17 @@ class SwampBiome : public Biome { public: SwampBiome(EBiomeIDs id, BiomeProperties* properties); + ~SwampBiome() override = default; int getBaseClass() override; + Feature* getTreeFeature(Random&) override; + FlowerBlock::Flower* getRandomFlower(Random&, const BlockPos*) override; + unsigned int getGrassColor(const BlockPos*) override; + unsigned int getFoliageColor(const BlockPos*) override; + void decorate(Level*, Random&, const BlockPos&) override; + void buildSurfaceAt(Level*, Random&, ChunkPrimer*, int, int, double) override; + + static LegacyBlockData WATERLILY; void* m_padding; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/biome/TaigaBiome.h b/src/Minecraft.World/net/minecraft/world/level/biome/TaigaBiome.h index 3e5a8ed8..bfe6f492 100644 --- a/src/Minecraft.World/net/minecraft/world/level/biome/TaigaBiome.h +++ b/src/Minecraft.World/net/minecraft/world/level/biome/TaigaBiome.h @@ -7,6 +7,16 @@ class TaigaBiome : public Biome { enum EType { DEFAULT = 0, MEGA = 1, MEGA_SPRUCE = 2 }; TaigaBiome(EBiomeIDs id, EType type, BiomeProperties* properties); + ~TaigaBiome() override = default; int getBaseClass() override; + Feature* getTreeFeature(Random&) override; + Feature* getGrassFeature(Random&) override; + void decorate(Level*, Random&, const BlockPos&) override; + void buildSurfaceAt(Level*, Random&, ChunkPrimer*, int, int, double) override; + +private: + EType m_type; }; + +ASSERT_SIZEOF(TaigaBiome, 0x148) diff --git a/src/Minecraft.World/net/minecraft/world/level/biome/TheEndBiome.h b/src/Minecraft.World/net/minecraft/world/level/biome/TheEndBiome.h index 1e1876ec..a0df69e3 100644 --- a/src/Minecraft.World/net/minecraft/world/level/biome/TheEndBiome.h +++ b/src/Minecraft.World/net/minecraft/world/level/biome/TheEndBiome.h @@ -5,6 +5,10 @@ class TheEndBiome : public Biome { public: TheEndBiome(EBiomeIDs id, BiomeProperties* properties); + ~TheEndBiome() override = default; int getBaseClass() override; + unsigned int getSkyColor(float) override; + Vec3* getFogColor(float, float) const override; + bool isNatural() override; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/biome/VoidBiome.h b/src/Minecraft.World/net/minecraft/world/level/biome/VoidBiome.h index 7bac67ec..de318de8 100644 --- a/src/Minecraft.World/net/minecraft/world/level/biome/VoidBiome.h +++ b/src/Minecraft.World/net/minecraft/world/level/biome/VoidBiome.h @@ -7,4 +7,5 @@ class VoidBiome : public Biome { VoidBiome(EBiomeIDs id, BiomeProperties* properties); int getBaseClass() override; + bool isAlwaysValidSpawn() override; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/block/Block.cpp b/src/Minecraft.World/net/minecraft/world/level/block/Block.cpp index 0ce58cab..c10bb55d 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/Block.cpp +++ b/src/Minecraft.World/net/minecraft/world/level/block/Block.cpp @@ -1,5 +1,7 @@ #include "net/minecraft/world/level/block/Block.h" +#include "net/minecraft/world/level/block/BlockBootstrapAllocation.h" + #include "net/minecraft/client/resources/IdMapper.h" #include "net/minecraft/core/Direction.h" #include "net/minecraft/stats/Stats.h" @@ -269,8 +271,7 @@ bool Block::ParticlesSurviveWithin() { return false; } -// NON_MATCHING: play with ifs in cases (so they are not optimised, the ifs) logic should be the same (unless -// I broke something while trying to match) +// NON_MATCHING | score: 3870 (lower is better) int Block::GetInteractTooltip(const BlockTooltipDataHolder& data) { int blockId = data.m_itemInstance->getItem()->getId(); // int returnValue = 0xFFFFFFFF; @@ -483,7 +484,6 @@ const AABB* Block::getShape(const BlockState* state, LevelSource* levelSource, c return Block::defaultBlockShape; } -// NON_MATCHING: i don't have a clue int Block::getLightColor(const BlockState* state, LevelSource* levelSource, const BlockPos& pos, int) { Block* blockFromLevel = levelSource->getBlockState(pos)->getBlock(); int color = levelSource->getLightColor(pos, blockFromLevel->getLightEmission(state), 0xFFFFFFFF); @@ -590,7 +590,7 @@ Item* Block::getResource(const BlockState* state, Random*, int) { return Item::byBlock(this); } -// NON_MATCHING: I don't have a clue +// NON_MATCHING | score: 650 (lower is better) float Block::getDestroyProgress(const BlockState* state, std::shared_ptr player, Level* level, const BlockPos& pos) { float destSpeed = state->getDestroySpeed(level, pos); @@ -735,6 +735,7 @@ int Block::getColor(LevelSource* levelSource, const BlockPos& pos, const BlockSt return 0xFFFFFF; } +// NON_MATCHING | score: 400 (lower is better) int Block::getSignal(const BlockState* state, LevelSource* levelSource, const BlockPos& pos, const Direction* direction) { return 0; @@ -886,8 +887,7 @@ int xOffsets[6] = {1, -1, 0, 0, 0, 0}; int yOffsets[6] = {0, 0, 1, -1, 0, 0}; int zOffsets[6] = {0, 0, 0, 0, 1, -1}; -// NON_MATCHING: too lazy to figure out this, wasLeaves is probably someshit generated by compiler and that's -// prob why it's not matching +// NON_MATCHING | score: 3310 (lower is better) TextureAtlasSprite* Block::getTexture(LevelSource* levelSource, const BlockPos& pos, const Direction* direction, const BlockState* state) { if (LeafBlock::isLeaves(state->getBlock())) @@ -944,7 +944,7 @@ const Vec3* ZERO = new Vec3(0, 0, 0); Vec3* Block::getOffset(const BlockState* state, LevelSource* levelSource, const BlockPos& pos) { int offsetType = this->getOffsetType(); if (!offsetType) - return Vec3::newTemp(ZERO); + return Vec3::newTemp(Vec3::ZERO); int64_t seed = Mth::getSeed(pos.getX(), 0, pos.getZ()); return Vec3::newTemp((((seed >> 16 & 0xF) / 15.0f) - 0.5) * 0.5, @@ -979,20 +979,8 @@ bool Block::isExceptionBlockForAttachingPlusPiston(Block* block) { return Block::isExceptionBlockForAttaching(block); } -// NON_MATCHING | Score: 333111 (lower is better) -// This is the second-largest method in the entire executable -// I (Dexrn) automated the block registry code, but I'm not sure how well it worked -// Also, there's stuff missing at both the header and the footer... so it won't match until that's done. -// Additionally, it seems that setBaseItemTypeAndMaterial is sometimes called outside of the chain... -// e.g: -// Block *someBlock = new SomeBlock() -// ->setDestroyTime(0) -// ->setExplodeable(10.0); -// someBlock->setBaseItemTypeAndMaterial(14, 2); -// Block::registerBlock(1, L"some_block", someBlock); -// -// The size given in the comments above every block was from the `operator new` call to allocate space for the -// block This gives us the class size of every block that is registered. +/** Allocates the full object sizes, including fields absent from partial class declarations. */ +// NON_MATCHING | score: 60165 (lower is better) void Block::staticCtor() { DEFAULT_FACING = DirectionProperty::create(L"facing"); HORIZONTAL_FACING = DirectionProperty::create(L"facing", Direction::Plane::HORIZONTAL); @@ -1080,7 +1068,7 @@ void Block::staticCtor() { // Size: 0xC8u Block::registerBlock( 2, L"grass", - (new GrassBlock()) + (new (BlockBootstrapAllocation<0xc8>{}) GrassBlock()) ->setDestroyTime(0.6) ->setSoundType(SoundType::GRASS) ->setIconName(L"grass") @@ -1119,15 +1107,15 @@ void Block::staticCtor() { Block::registerBlock(5, L"planks", planksBlock); - Block* saplingBlock - = (new SaplingBlock()) - ->setDestroyTime(0.0) - ->setSoundType(SoundType::GRASS) - ->setIconName(L"sapling") - ->sendBlockData(15) - ->setNameAndDescriptionId(StringIDs::Sapling, StringIDs::CanBePlantedAndWillEventuallyGrowInto) - ->disableMipmap(); - Block::registerBlock(6, L"sapling", saplingBlock); + Block::registerBlock( + 6, L"sapling", + (new (BlockBootstrapAllocation<0xe0>{}) SaplingBlock()) + ->setDestroyTime(0.0) + ->setSoundType(SoundType::GRASS) + ->setIconName(L"sapling") + ->sendBlockData(15) + ->setNameAndDescriptionId(StringIDs::Sapling, StringIDs::CanBePlantedAndWillEventuallyGrowInto) + ->disableMipmap()); Block::registerBlock(7, L"bedrock", (new BlockImpl(Material::STONE)) @@ -1141,7 +1129,7 @@ void Block::staticCtor() { // Size: 0xF0u Block::registerBlock( 8, L"flowing_water", - (new DynamicLiquidBlock(Material::WATER)) + (new (BlockBootstrapAllocation<0xf0>{}) DynamicLiquidBlock(Material::WATER)) ->setDestroyTime(100.0) ->setLightBlock(3) ->setIconName(L"water_flow") @@ -1152,7 +1140,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock( 9, L"water", - (new StaticLiquidBlock(Material::WATER)) + (new (BlockBootstrapAllocation<0xb8>{}) StaticLiquidBlock(Material::WATER)) ->setDestroyTime(100.0) ->setLightBlock(3) ->setIconName(L"water_still") @@ -1163,7 +1151,7 @@ void Block::staticCtor() { // Size: 0xF0u Block::registerBlock( 10, L"flowing_lava", - (new DynamicLiquidBlock(Material::LAVA)) + (new (BlockBootstrapAllocation<0xf0>{}) DynamicLiquidBlock(Material::LAVA)) ->setDestroyTime(100.0) ->setLightEmission(1.0) ->setIconName(L"lava_flow") @@ -1175,7 +1163,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock( 11, L"lava", - (new StaticLiquidBlock(Material::LAVA)) + (new (BlockBootstrapAllocation<0xb8>{}) StaticLiquidBlock(Material::LAVA)) ->setDestroyTime(100.0) ->setLightEmission(1.0) ->setIconName(L"lava_still") @@ -1244,7 +1232,7 @@ void Block::staticCtor() { // Size: 0x110u Block::registerBlock(18, L"leaves", - (new OldLeafBlock()) + (new (BlockBootstrapAllocation<0x110>{}) OldLeafBlock()) ->setIconName(L"leaves") ->sendBlockData(3) ->setNameAndDescriptionId(StringIDs::Leaves, @@ -1253,7 +1241,7 @@ void Block::staticCtor() { // Size: 0xB0u Block::registerBlock( 19, L"sponge", - (new SpongeBlock()) + (new (BlockBootstrapAllocation<0xb0>{}) SpongeBlock()) ->setDestroyTime(0.6) ->setSoundType(SoundType::GRASS) ->setIconName(L"sponge") @@ -1294,7 +1282,7 @@ void Block::staticCtor() { // Size: 0xE0u Block::registerBlock( 23, L"dispenser", - (new DispenserBlock()) + (new (BlockBootstrapAllocation<0xe0>{}) DispenserBlock()) ->setDestroyTime(3.5) ->setSoundType(SoundType::STONE) ->setIconName(L"dispenser") @@ -1316,7 +1304,7 @@ void Block::staticCtor() { // Size: 0xB0u Block::registerBlock(25, L"noteblock", - (new NoteBlock()) + (new (BlockBootstrapAllocation<0xb0>{}) NoteBlock()) ->setSoundType(SoundType::WOOD) ->setDestroyTime(0.8) ->setIconName(L"noteblock") @@ -1327,7 +1315,7 @@ void Block::staticCtor() { // Size: 0xE0u Block::registerBlock( 26, L"bed", - (new BedBlock()) + (new (BlockBootstrapAllocation<0xe0>{}) BedBlock()) ->setSoundType(SoundType::WOOD) ->setDestroyTime(0.2) ->setIconName(L"bed") @@ -1338,7 +1326,7 @@ void Block::staticCtor() { // Size: 0xB0u Block::registerBlock( 27, L"golden_rail", - (new PoweredRailBlock()) + (new (BlockBootstrapAllocation<0xb0>{}) PoweredRailBlock()) ->setDestroyTime(0.7) ->setSoundType(SoundType::METAL) ->setIconName(L"rail_golden") @@ -1350,7 +1338,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock(28, L"detector_rail", - (new DetectorRailBlock()) + (new (BlockBootstrapAllocation<0xb8>{}) DetectorRailBlock()) ->setDestroyTime(0.7) ->setSoundType(SoundType::METAL) ->setIconName(L"rail_detector") @@ -1363,7 +1351,7 @@ void Block::staticCtor() { // Size: 0xC0u Block::registerBlock( 29, L"sticky_piston", - (new PistonBaseBlock(true)) + (new (BlockBootstrapAllocation<0xc0>{}) PistonBaseBlock(true)) ->sendBlockData(15) ->setNameAndDescriptionId(StringIDs::StickyPiston, StringIDs::WhenPoweredUsingAButtonALeverARetractsPullsBackBlockTouching) @@ -1383,7 +1371,7 @@ void Block::staticCtor() { // Size: 0xC8u Block::registerBlock( 31, L"tallgrass", - (new TallGrassBlock()) + (new (BlockBootstrapAllocation<0xc8>{}) TallGrassBlock()) ->setDestroyTime(0.0) ->setSoundType(SoundType::GRASS) ->setIconName(L"tallgrass") @@ -1402,7 +1390,7 @@ void Block::staticCtor() { // Size: 0xC0u Block::registerBlock( 33, L"piston", - (new PistonBaseBlock(false)) + (new (BlockBootstrapAllocation<0xc0>{}) PistonBaseBlock(false)) ->sendBlockData(15) ->setNameAndDescriptionId(StringIDs::Piston, StringIDs::WhenPoweredUsingAButtonALeverA) ->setBaseItemTypeAndMaterial(27, 28) @@ -1411,13 +1399,13 @@ void Block::staticCtor() { // Size: 0xB0u Block::registerBlock( 34, L"piston_head", - (new PistonHeadBlock()) + (new (BlockBootstrapAllocation<0xb0>{}) PistonHeadBlock()) ->setNameAndDescriptionId(StringIDs::Piston, StringIDs::WhenPoweredUsingAButtonALeverA) ->sendBlockData(15)); // Size: 0x128u Block::registerBlock(35, L"wool", - (new ColoredBlock(Material::WOOL)) + (new (BlockBootstrapAllocation<0x128>{}) ColoredBlock(Material::WOOL)) ->setDestroyTime(0.8) ->setSoundType(SoundType::WOOL) ->setIconName(L"wool_colored") @@ -1427,7 +1415,7 @@ void Block::staticCtor() { // Size: 0xB0u Block::registerBlock(36, L"piston_extension", - (new PistonMagicBlock()) + (new (BlockBootstrapAllocation<0xb0>{}) PistonMagicBlock()) ->setIconName(L"pistonBase") ->setNameAndDescriptionId(StringIDs::Piston, 0xFFFFFFFF)); @@ -1494,7 +1482,7 @@ void Block::staticCtor() { // Size: 0xB0u Block::registerBlock(43, L"double_stone_slab", - (new FullStoneSlabBlock()) + (new (BlockBootstrapAllocation<0xb0>{}) FullStoneSlabBlock()) ->setDestroyTime(2.0) ->setExplodeable(10.0) ->setSoundType(SoundType::STONE) @@ -1505,7 +1493,7 @@ void Block::staticCtor() { // Size: 0xB0u Block::registerBlock(44, L"stone_slab", - (new HalfStoneSlabBlock()) + (new (BlockBootstrapAllocation<0xb0>{}) HalfStoneSlabBlock()) ->setDestroyTime(2.0) ->setExplodeable(10.0) ->setSoundType(SoundType::STONE) @@ -1526,7 +1514,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock(46, L"tnt", - (new TntBlock()) + (new (BlockBootstrapAllocation<0xb8>{}) TntBlock()) ->setDestroyTime(0.0) ->setSoundType(SoundType::GRASS) ->setIconName(L"tnt") @@ -1593,7 +1581,7 @@ void Block::staticCtor() { // Size: 0xB0u Block::registerBlock(52, L"mob_spawner", - (new MobSpawnerBlock()) + (new (BlockBootstrapAllocation<0xb0>{}) MobSpawnerBlock()) ->setDestroyTime(5.0) ->setSoundType(SoundType::METAL) ->setIconName(L"mob_spawner") @@ -1601,20 +1589,20 @@ void Block::staticCtor() { ->setNameAndDescriptionId(StringIDs::MonsterSpawner, 0x4330c9)); // Size: 0xC0u - const BlockState* stairBlockVariant = planksBlock->defaultBlockState()->setValue( - PlanksBlock::VARIANT, PlanksBlock::Variant::OAK); - Block* stairBlock - = (new StairBlock(stairBlockVariant)) - ->setIconName(L"stairsWood") - ->sendBlockData(15) - ->setNameAndDescriptionId(StringIDs::OakWoodStairs, StringIDs::UsedForCompactStaircases_1) - ->setBaseItemTypeAndMaterial(16, 1); - Block::registerBlock(53, L"oak_stairs", stairBlock); + Block::registerBlock( + 53, L"oak_stairs", + (new (BlockBootstrapAllocation<0xc0>{}) + StairBlock(planksBlock->defaultBlockState()->setValue( + PlanksBlock::VARIANT, PlanksBlock::Variant::OAK))) + ->setIconName(L"stairsWood") + ->sendBlockData(15) + ->setNameAndDescriptionId(StringIDs::OakWoodStairs, StringIDs::UsedForCompactStaircases_1) + ->setBaseItemTypeAndMaterial(16, 1)); // Size: 0xB8u Block::registerBlock( 54, L"chest", - (new ChestBlock(0)) + (new (BlockBootstrapAllocation<0xb8>{}) ChestBlock(0)) ->setDestroyTime(2.5) ->setSoundType(SoundType::WOOD) ->setIconName(L"chest") @@ -1625,7 +1613,7 @@ void Block::staticCtor() { // Size: 0xF8u Block::registerBlock( 55, L"redstone_wire", - (new RedStoneWireBlock()) + (new (BlockBootstrapAllocation<0xf8>{}) RedStoneWireBlock()) ->setDestroyTime(0.0) ->setSoundType(SoundType::STONE) ->setIconName(L"redstone_dust") @@ -1657,7 +1645,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock(58, L"crafting_table", - (new CraftingTableBlock()) + (new (BlockBootstrapAllocation<0xb8>{}) CraftingTableBlock()) ->setDestroyTime(2.5) ->setSoundType(SoundType::WOOD) ->setIconName(L"crafting_table") @@ -1668,7 +1656,7 @@ void Block::staticCtor() { // Size: 0xF0u Block::registerBlock( 59, L"wheat", - (new CropBlock(false)) + (new (BlockBootstrapAllocation<0xf0>{}) CropBlock(false)) ->setIconName(L"wheat") ->setNotCollectStatistics() ->sendBlockData(15) @@ -1676,7 +1664,7 @@ void Block::staticCtor() { ->disableMipmap()); // Size: 0xB8u - Block* farmBlock = (new FarmBlock()) + Block* farmBlock = (new (BlockBootstrapAllocation<0xb8>{}) FarmBlock()) ->setDestroyTime(0.6) ->setSoundType(SoundType::DIRT) ->setIconName(L"farmland") @@ -1688,7 +1676,7 @@ void Block::staticCtor() { // Size: 0xC8u Block::registerBlock( 61, L"furnace", - (new FurnaceBlock(false)) + (new (BlockBootstrapAllocation<0xc8>{}) FurnaceBlock(false)) ->setDestroyTime(3.5) ->setSoundType(SoundType::STONE) ->setIconName(L"furnace") @@ -1699,7 +1687,7 @@ void Block::staticCtor() { // Size: 0xC8u Block::registerBlock( 62, L"lit_furnace", - (new FurnaceBlock(true)) + (new (BlockBootstrapAllocation<0xc8>{}) FurnaceBlock(true)) ->setDestroyTime(3.5) ->setSoundType(SoundType::STONE) ->setIconName(L"furnace") @@ -1710,7 +1698,7 @@ void Block::staticCtor() { // Size: 0xB0u Block::registerBlock( 63, L"standing_sign", - (new StandingSignBlock()) + (new (BlockBootstrapAllocation<0xb0>{}) StandingSignBlock()) ->setDestroyTime(1.0) ->setSoundType(SoundType::WOOD) ->setIconName(L"sign") @@ -1720,7 +1708,7 @@ void Block::staticCtor() { // Size: 0xC8u Block::registerBlock(64, L"wooden_door", - (new DoorBlock(Material::WOOD)) + (new (BlockBootstrapAllocation<0xc8>{}) DoorBlock(Material::WOOD)) ->setDestroyTime(3.0) ->setSoundType(SoundType::WOOD) ->setIconName(L"door_wood") @@ -1742,7 +1730,7 @@ void Block::staticCtor() { // Size: 0xB0u Block::registerBlock(66, L"rail", - (new RailBlock()) + (new (BlockBootstrapAllocation<0xb0>{}) RailBlock()) ->setDestroyTime(0.7) ->setSoundType(SoundType::METAL) ->setIconName(L"rail_normal") @@ -1754,7 +1742,7 @@ void Block::staticCtor() { // Size: 0xC0u Block::registerBlock( 67, L"stone_stairs", - (new StairBlock(cobblestoneBlock->defaultBlockState())) + (new (BlockBootstrapAllocation<0xc0>{}) StairBlock(cobblestoneBlock->defaultBlockState())) ->setIconName(L"stairsStone") ->sendBlockData(15) ->setNameAndDescriptionId(StringIDs::CobblestoneStairs, StringIDs::UsedForCompactStaircases_1) @@ -1763,7 +1751,7 @@ void Block::staticCtor() { // Size: 0xB0u Block::registerBlock( 68, L"wall_sign", - (new WallSignBlock()) + (new (BlockBootstrapAllocation<0xb0>{}) WallSignBlock()) ->setDestroyTime(1.0) ->setSoundType(SoundType::WOOD) ->setIconName(L"sign") @@ -1784,20 +1772,20 @@ void Block::staticCtor() { ->setBaseItemTypeAndMaterial(45, 1)); // Size: 0xC8u - Block::registerBlock( - 70, L"stone_pressure_plate", - (new PressurePlateBlock(L"stone", Material::STONE, PressurePlateBlock::Sensitivity::STONE)) - ->setDestroyTime(0.5) - ->setSoundType(SoundType::STONE) - ->sendBlockData(15) - ->setNameAndDescriptionId(StringIDs::StonePressurePlate, - StringIDs::APressureSensitivePadThatWillActivateWhen) - ->setBaseItemTypeAndMaterial(15, 2)); + Block::registerBlock(70, L"stone_pressure_plate", + (new (BlockBootstrapAllocation<0xc8>{}) PressurePlateBlock( + L"stone", Material::STONE, PressurePlateBlock::Sensitivity::STONE)) + ->setDestroyTime(0.5) + ->setSoundType(SoundType::STONE) + ->sendBlockData(15) + ->setNameAndDescriptionId(StringIDs::StonePressurePlate, + StringIDs::APressureSensitivePadThatWillActivateWhen) + ->setBaseItemTypeAndMaterial(15, 2)); // Size: 0xC8u Block::registerBlock( 71, L"iron_door", - (new DoorBlock(Material::METAL)) + (new (BlockBootstrapAllocation<0xc8>{}) DoorBlock(Material::METAL)) ->setIconName(L"door_iron") ->setDestroyTime(5.0) ->setSoundType(SoundType::METAL) @@ -1808,7 +1796,8 @@ void Block::staticCtor() { // Size: 0xC8u Block::registerBlock( 72, L"wooden_pressure_plate", - (new PressurePlateBlock(L"planks_oak", Material::WOOD, PressurePlateBlock::Sensitivity::WOOD)) + (new (BlockBootstrapAllocation<0xc8>{}) + PressurePlateBlock(L"planks_oak", Material::WOOD, PressurePlateBlock::Sensitivity::WOOD)) ->setDestroyTime(0.5) ->setSoundType(SoundType::WOOD) ->sendBlockData(15) @@ -1910,7 +1899,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock( 81, L"cactus", - (new CactusBlock()) + (new (BlockBootstrapAllocation<0xb8>{}) CactusBlock()) ->setIconName(L"cactus") ->setDestroyTime(0.4) ->setSoundType(SoundType::WOOL) @@ -1940,7 +1929,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock(84, L"jukebox", - (new JukeboxBlock()) + (new (BlockBootstrapAllocation<0xb8>{}) JukeboxBlock()) ->setIconName(L"jukebox") ->setDestroyTime(2.0) ->setExplodeable(10.0) @@ -1952,7 +1941,8 @@ void Block::staticCtor() { // Size: 0xC0u Block::registerBlock( 85, L"fence", - (new FenceBlock(L"planks_oak", Material::WOOD, PlanksBlock::Variant::OAK->getMaterialColor())) + (new (BlockBootstrapAllocation<0xc0>{}) + FenceBlock(L"planks_oak", Material::WOOD, PlanksBlock::Variant::OAK->getMaterialColor())) ->setDestroyTime(2.0) ->setExplodeable(5.0) ->setSoundType(SoundType::WOOD) @@ -1961,7 +1951,7 @@ void Block::staticCtor() { // Size: 0xD8u Block* pumpkinBlock - = (new PumpkinBlock()) + = (new (BlockBootstrapAllocation<0xd8>{}) PumpkinBlock()) ->setIconName(L"pumpkin") ->setDestroyTime(1.0) ->setSoundType(SoundType::WOOD) @@ -2010,7 +2000,7 @@ void Block::staticCtor() { // Size: 0xD8u Block::registerBlock(91, L"lit_pumpkin", - (new PumpkinBlock()) + (new (BlockBootstrapAllocation<0xd8>{}) PumpkinBlock()) ->setIconName(L"pumpkin") ->setDestroyTime(1.0) ->setSoundType(SoundType::WOOD) @@ -2022,7 +2012,7 @@ void Block::staticCtor() { // Size: 0xC0u Block::registerBlock( 92, L"cake", - (new CakeBlock()) + (new (BlockBootstrapAllocation<0xc0>{}) CakeBlock()) ->setIconName(L"cake") ->setDestroyTime(0.5) ->setSoundType(SoundType::WOOL) @@ -2059,7 +2049,7 @@ void Block::staticCtor() { // Size: 0xC0u Block::registerBlock( 95, L"stained_glass", - (new StainedGlassBlock(Material::GLASS)) + (new (BlockBootstrapAllocation<0xc0>{}) StainedGlassBlock(Material::GLASS)) ->setIconName(L"glass") ->setDestroyTime(0.3) ->setSoundType(SoundType::GLASS) @@ -2103,7 +2093,8 @@ void Block::staticCtor() { // Size: 0xD8u Block::registerBlock( 99, L"brown_mushroom_block", - (new HugeMushroomBlock(Material::WOOD, MaterialColor::DIRT, brownMushroomBlock)) + (new (BlockBootstrapAllocation<0xd8>{}) + HugeMushroomBlock(Material::WOOD, MaterialColor::DIRT, brownMushroomBlock)) ->setIconName(L"mushroom_block") ->setDestroyTime(0.2) ->setSoundType(SoundType::WOOD) @@ -2113,7 +2104,8 @@ void Block::staticCtor() { // Size: 0xD8u Block::registerBlock( 100, L"red_mushroom_block", - (new HugeMushroomBlock(Material::WOOD, MaterialColor::COLOR_RED, redMushroomBlock)) + (new (BlockBootstrapAllocation<0xd8>{}) + HugeMushroomBlock(Material::WOOD, MaterialColor::COLOR_RED, redMushroomBlock)) ->setIconName(L"mushroom_block") ->setDestroyTime(0.2) ->setSoundType(SoundType::WOOD) @@ -2123,7 +2115,8 @@ void Block::staticCtor() { // Size: 0xE0u Block::registerBlock( 101, L"iron_bars", - (new ThinFenceBlock(L"iron_bars", L"iron_bars", Material::METAL, true)) + (new (BlockBootstrapAllocation<0xe0>{}) + ThinFenceBlock(L"iron_bars", L"iron_bars", Material::METAL, true)) ->setDestroyTime(5.0) ->setExplodeable(10.0) ->setSoundType(SoundType::METAL) @@ -2133,7 +2126,8 @@ void Block::staticCtor() { // Size: 0xE0u Block::registerBlock( 102, L"glass_pane", - (new ThinFenceBlock(L"glass", L"glass_pane_top", Material::GLASS, false)) + (new (BlockBootstrapAllocation<0xe0>{}) + ThinFenceBlock(L"glass", L"glass_pane_top", Material::GLASS, false)) ->setDestroyTime(0.3) ->setSoundType(SoundType::GLASS) ->setNameAndDescriptionId(StringIDs::GlassPane, StringIDs::TransparentBlocksThatCanBeUsedAsAn) @@ -2141,7 +2135,7 @@ void Block::staticCtor() { // Size: 0xB0u Block* melonBlock - = (new MelonBlock()) + = (new (BlockBootstrapAllocation<0xb0>{}) MelonBlock()) ->setIconName(L"melon") ->setDestroyTime(1.0) ->setSoundType(SoundType::WOOD) @@ -2150,7 +2144,7 @@ void Block::staticCtor() { // Size: 0xC0u Block::registerBlock(104, L"pumpkin_stem", - (new StemBlock(pumpkinBlock)) + (new (BlockBootstrapAllocation<0xc0>{}) StemBlock(pumpkinBlock)) ->setIconName(L"pumpkin_stem") ->setDestroyTime(0.0) ->setSoundType(SoundType::WOOD) @@ -2160,7 +2154,7 @@ void Block::staticCtor() { // Size: 0xC0u Block::registerBlock(105, L"melon_stem", - (new StemBlock(melonBlock)) + (new (BlockBootstrapAllocation<0xc0>{}) StemBlock(melonBlock)) ->setIconName(L"melon_stem") ->setDestroyTime(0.0) ->setSoundType(SoundType::WOOD) @@ -2180,33 +2174,33 @@ void Block::staticCtor() { ->disableMipmap()); // Size: 0xC0u - Block::registerBlock(107, L"fence_gate", - (new FenceGateBlock(L"planks_oak", PlanksBlock::Variant::OAK)) - ->setIconName(L"fenceGate") - ->setDestroyTime(2.0) - ->setExplodeable(5.0) - ->setSoundType(SoundType::WOOD) - ->sendBlockData(15) - ->setNameAndDescriptionId(StringIDs::OakFenceGate, - StringIDs::SimilarToADoorButUsedPrimarilyWithFences) - ->setBaseItemTypeAndMaterial(47, 1)); + Block::registerBlock( + 107, L"fence_gate", + (new (BlockBootstrapAllocation<0xc0>{}) FenceGateBlock(L"planks_oak", PlanksBlock::Variant::OAK)) + ->setIconName(L"fenceGate") + ->setDestroyTime(2.0) + ->setExplodeable(5.0) + ->setSoundType(SoundType::WOOD) + ->sendBlockData(15) + ->setNameAndDescriptionId(StringIDs::OakFenceGate, + StringIDs::SimilarToADoorButUsedPrimarilyWithFences) + ->setBaseItemTypeAndMaterial(47, 1)); // Size: 0xC0u Block::registerBlock( 108, L"brick_stairs", - (new StairBlock(brickBlock->defaultBlockState())) + (new (BlockBootstrapAllocation<0xc0>{}) StairBlock(brickBlock->defaultBlockState())) ->setIconName(L"stairsBrick") ->sendBlockData(15) ->setNameAndDescriptionId(StringIDs::BrickStairs, StringIDs::UsedForCompactStaircases_1) ->setBaseItemTypeAndMaterial(16, 14)); // Size: 0xC0u - const BlockState* stoneBrickStairBlockVariant - = stoneBrickBlock->defaultBlockState()->setValue( - StoneBrickBlock::VARIANT, StoneBrickBlock::Variant::DEFAULT); Block::registerBlock( 109, L"stone_brick_stairs", - (new StairBlock(stoneBrickStairBlockVariant)) + (new (BlockBootstrapAllocation<0xc0>{}) + StairBlock(stoneBrickBlock->defaultBlockState()->setValue( + StoneBrickBlock::VARIANT, StoneBrickBlock::Variant::DEFAULT))) ->setIconName(L"stairsStoneBrickSmooth") ->sendBlockData(15) ->setNameAndDescriptionId(StringIDs::StoneBrickStairs, StringIDs::UsedForCompactStaircases_1) @@ -2215,7 +2209,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock( 110, L"mycelium", - (new MyceliumBlock()) + (new (BlockBootstrapAllocation<0xb8>{}) MyceliumBlock()) ->setIconName(L"mycelium") ->setDestroyTime(0.6) ->setSoundType(SoundType::GRASS) @@ -2246,7 +2240,8 @@ void Block::staticCtor() { // Size: 0xC0u Block::registerBlock( 113, L"nether_brick_fence", - (new FenceBlock(L"nether_brick", Material::STONE, MaterialColor::NETHER)) + (new (BlockBootstrapAllocation<0xc0>{}) + FenceBlock(L"nether_brick", Material::STONE, MaterialColor::NETHER)) ->setDestroyTime(2.0) ->setExplodeable(10.0) ->setSoundType(SoundType::STONE) @@ -2256,7 +2251,7 @@ void Block::staticCtor() { // Size: 0xC0u Block::registerBlock( 114, L"nether_brick_stairs", - (new StairBlock(netherBrickBlock->defaultBlockState())) + (new (BlockBootstrapAllocation<0xc0>{}) StairBlock(netherBrickBlock->defaultBlockState())) ->setIconName(L"stairsNetherBrick") ->sendBlockData(15) ->setNameAndDescriptionId(StringIDs::NetherBrickStairs, StringIDs::UsedForCompactStaircases_1) @@ -2264,7 +2259,7 @@ void Block::staticCtor() { // Size: 0xC0u Block::registerBlock(115, L"nether_wart", - (new NetherWartBlock()) + (new (BlockBootstrapAllocation<0xc0>{}) NetherWartBlock()) ->setIconName(L"nether_wart") ->sendBlockData(15) ->setNameAndDescriptionId(StringIDs::NetherWart_1, @@ -2274,7 +2269,7 @@ void Block::staticCtor() { // Size: 0xC0u Block::registerBlock( 116, L"enchanting_table", - (new EnchantmentTableBlock()) + (new (BlockBootstrapAllocation<0xc0>{}) EnchantmentTableBlock()) ->setIconName(L"enchanting_table") ->setDestroyTime(5.0) ->setExplodeable(2000.0) @@ -2284,7 +2279,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock(117, L"brewing_stand", - (new BrewingStandBlock()) + (new (BlockBootstrapAllocation<0xb8>{}) BrewingStandBlock()) ->setIconName(L"brewing_stand") ->setDestroyTime(0.5) ->setLightEmission(0.125) @@ -2296,7 +2291,7 @@ void Block::staticCtor() { // Size: 0xD0u Block::registerBlock( 118, L"cauldron", - (new CauldronBlock()) + (new (BlockBootstrapAllocation<0xd0>{}) CauldronBlock()) ->setIconName(L"cauldron") ->setDestroyTime(2.0) ->sendBlockData(15) @@ -2305,19 +2300,19 @@ void Block::staticCtor() { // Size: 0xB0u Block::registerBlock( 119, L"end_portal", - (new EndPortalBlock(Material::PORTAL)) - ->setDestroyTime(3.4028e38) + (new (BlockBootstrapAllocation<0xb0>{}) EndPortalBlock(Material::PORTAL)) + ->setDestroyTime(3.4028234663852886e38f) ->setExplodeable(6000000.0) ->setNameAndDescriptionId(StringIDs::EndPortal, StringIDs::ThisCanBeActivatedUsingTwelveEyeOf)); // Size: 0xB8u Block::registerBlock( 120, L"end_portal_frame", - (new EndPortalFrameBlock()) + (new (BlockBootstrapAllocation<0xb8>{}) EndPortalFrameBlock()) ->setIconName(L"endframe") ->setSoundType(SoundType::GLASS) ->setLightEmission(0.125) - ->setDestroyTime(3.4028e38) + ->setDestroyTime(3.4028234663852886e38f) ->sendBlockData(15) ->setExplodeable(6000000.0) ->setNameAndDescriptionId(StringIDs::EndPortalFrame, StringIDs::UsedToFormAnEndPortal)); @@ -2388,7 +2383,7 @@ void Block::staticCtor() { // Size: 0xC8u Block::registerBlock( 127, L"cocoa", - (new CocoaBlock()) + (new (BlockBootstrapAllocation<0xc8>{}) CocoaBlock()) ->setIconName(L"cocoa") ->setDestroyTime(0.2) ->setExplodeable(5.0) @@ -2397,16 +2392,15 @@ void Block::staticCtor() { ->setNameAndDescriptionId(StringIDs::Cocoa, StringIDs::CanBeFarmedToCollectCocoaBeans)); // Size: 0xC0u - const BlockState* sandStoneStairBlockVariant - = sandStoneBlock->defaultBlockState()->setValue( - SandStoneBlock::TYPE, SandStoneBlock::Variant::DEFAULT); - Block* sandStoneStairBlock - = (new StairBlock(sandStoneStairBlockVariant)) - ->setIconName(L"stairsSandstone") - ->sendBlockData(15) - ->setNameAndDescriptionId(StringIDs::SandstoneStairs, StringIDs::UsedForCompactStaircases_1) - ->setBaseItemTypeAndMaterial(16, 13); - Block::registerBlock(128, L"sandstone_stairs", sandStoneStairBlock); + Block::registerBlock( + 128, L"sandstone_stairs", + (new (BlockBootstrapAllocation<0xc0>{}) + StairBlock(sandStoneBlock->defaultBlockState()->setValue( + SandStoneBlock::TYPE, SandStoneBlock::Variant::DEFAULT))) + ->setIconName(L"stairsSandstone") + ->sendBlockData(15) + ->setNameAndDescriptionId(StringIDs::SandstoneStairs, StringIDs::UsedForCompactStaircases_1) + ->setBaseItemTypeAndMaterial(16, 13)); // Size: 0xA8u Block::registerBlock( @@ -2421,7 +2415,7 @@ void Block::staticCtor() { // Size: 0xB0u Block::registerBlock( 130, L"ender_chest", - (new EnderChestBlock()) + (new (BlockBootstrapAllocation<0xb0>{}) EnderChestBlock()) ->setDestroyTime(22.5) ->setIconName(L"enderChest") ->setExplodeable(1000.0) @@ -2461,45 +2455,42 @@ void Block::staticCtor() { ->setBaseItemTypeAndMaterial(32, 44)); // Size: 0xC0u - const BlockState* spruceStairBlockVariant - = planksBlock->defaultBlockState()->setValue(PlanksBlock::VARIANT, - PlanksBlock::Variant::SPRUCE); - Block* spruceStairBlock - = (new StairBlock(spruceStairBlockVariant)) - ->setIconName(L"stairsWoodSpruce") - ->sendBlockData(15) - ->setNameAndDescriptionId(StringIDs::SpruceWoodStairs, StringIDs::UsedForCompactStaircases_1) - ->setBaseItemTypeAndMaterial(16, 39); - Block::registerBlock(134, L"spruce_stairs", stairBlock); + Block::registerBlock( + 134, L"spruce_stairs", + (new (BlockBootstrapAllocation<0xc0>{}) + StairBlock(planksBlock->defaultBlockState()->setValue( + PlanksBlock::VARIANT, PlanksBlock::Variant::SPRUCE))) + ->setIconName(L"stairsWoodSpruce") + ->sendBlockData(15) + ->setNameAndDescriptionId(StringIDs::SpruceWoodStairs, StringIDs::UsedForCompactStaircases_1) + ->setBaseItemTypeAndMaterial(16, 39)); // Size: 0xC0u - const BlockState* birchStairBlockVariant - = planksBlock->defaultBlockState()->setValue(PlanksBlock::VARIANT, - PlanksBlock::Variant::BIRCH); - Block* birchStairBlock - = (new StairBlock(birchStairBlockVariant)) - ->setIconName(L"stairsWoodBirch") - ->sendBlockData(15) - ->setNameAndDescriptionId(StringIDs::BirchWoodStairs, StringIDs::UsedForCompactStaircases_1) - ->setBaseItemTypeAndMaterial(16, 40); - Block::registerBlock(135, L"birch_stairs", birchStairBlock); + Block::registerBlock( + 135, L"birch_stairs", + (new (BlockBootstrapAllocation<0xc0>{}) + StairBlock(planksBlock->defaultBlockState()->setValue( + PlanksBlock::VARIANT, PlanksBlock::Variant::BIRCH))) + ->setIconName(L"stairsWoodBirch") + ->sendBlockData(15) + ->setNameAndDescriptionId(StringIDs::BirchWoodStairs, StringIDs::UsedForCompactStaircases_1) + ->setBaseItemTypeAndMaterial(16, 40)); // Size: 0xC0u - const BlockState* jungleStairBlockVariant - = planksBlock->defaultBlockState()->setValue(PlanksBlock::VARIANT, - PlanksBlock::Variant::JUNGLE); - Block* jungleStairBlock - = (new StairBlock(jungleStairBlockVariant)) - ->setIconName(L"stairsWoodJungle") - ->sendBlockData(15) - ->setNameAndDescriptionId(StringIDs::JungleWoodStairs, StringIDs::UsedForCompactStaircases_1) - ->setBaseItemTypeAndMaterial(16, 41); - Block::registerBlock(136, L"jungle_stairs", jungleStairBlock); + Block::registerBlock( + 136, L"jungle_stairs", + (new (BlockBootstrapAllocation<0xc0>{}) + StairBlock(planksBlock->defaultBlockState()->setValue( + PlanksBlock::VARIANT, PlanksBlock::Variant::JUNGLE))) + ->setIconName(L"stairsWoodJungle") + ->sendBlockData(15) + ->setNameAndDescriptionId(StringIDs::JungleWoodStairs, StringIDs::UsedForCompactStaircases_1) + ->setBaseItemTypeAndMaterial(16, 41)); // Size: 0xB0u Block::registerBlock( 138, L"beacon", - (new BeaconBlock()) + (new (BlockBootstrapAllocation<0xb0>{}) BeaconBlock()) ->setIconName(L"beacon") ->setLightEmission(1.0) ->setSoundType(SoundType::GLASS) @@ -2515,7 +2506,7 @@ void Block::staticCtor() { // Size: 0xB0u Block::registerBlock(140, L"flower_pot", - (new FlowerPotBlock()) + (new (BlockBootstrapAllocation<0xb0>{}) FlowerPotBlock()) ->setDestroyTime(0.0) ->setIconName(L"flower_pot") ->setSoundType(SoundType::STONE) @@ -2525,7 +2516,7 @@ void Block::staticCtor() { // Size: 0x110u Block::registerBlock( 141, L"carrots", - (new CarrotBlock()) + (new (BlockBootstrapAllocation<0x110>{}) CarrotBlock()) ->setIconName(L"carrots") ->setNameAndDescriptionId(StringIDs::Carrots, StringIDs::Restores15IconShank01AndCan) ->disableMipmap()); @@ -2533,7 +2524,7 @@ void Block::staticCtor() { // Size: 0x110u Block::registerBlock( 142, L"potatoes", - (new PotatoBlock()) + (new (BlockBootstrapAllocation<0x110>{}) PotatoBlock()) ->setIconName(L"potatoes") ->setNameAndDescriptionId(StringIDs::Potatoes, StringIDs::Restores05IconShank01OrCan) ->disableMipmap()); @@ -2552,7 +2543,7 @@ void Block::staticCtor() { // Size: 0xC0u Block::registerBlock( 144, L"skull", - (new SkullBlock()) + (new (BlockBootstrapAllocation<0xc0>{}) SkullBlock()) ->setIconName(L"") ->setDestroyTime(1.0) ->setSoundType(SoundType::STONE) @@ -2561,7 +2552,7 @@ void Block::staticCtor() { // Size: 0xC0u Block::registerBlock( 145, L"anvil", - (new AnvilBlock()) + (new (BlockBootstrapAllocation<0xc0>{}) AnvilBlock()) ->setIconName(L"anvil") ->setBaseItemTypeAndMaterial(30, 3) ->setDestroyTime(5.0) @@ -2573,7 +2564,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock( 146, L"trapped_chest", - (new ChestBlock(true)) + (new (BlockBootstrapAllocation<0xb8>{}) ChestBlock(true)) ->setBaseItemTypeAndMaterial(36, 25) ->setDestroyTime(2.5) ->setSoundType(SoundType::WOOD) @@ -2582,18 +2573,19 @@ void Block::staticCtor() { StringIDs::StoresBlocksAndItemsInsidePlaceTwoChestsATrappedAlsoCreatesRedstone)); // Size: 0xC8u - Block::registerBlock( - 147, L"light_weighted_pressure_plate", - (new WeightedPressurePlateBlock(L"gold_block", Material::METAL, 15, MaterialColor::GOLD)) - ->setBaseItemTypeAndMaterial(15, 4) - ->setDestroyTime(0.5) - ->setSoundType(SoundType::WOOD) - ->setNameAndDescriptionId(StringIDs::WeightedPressurePlateLight, - StringIDs::ProvidesARedstoneChargeTheChargeWillBe_1)); + Block::registerBlock(147, L"light_weighted_pressure_plate", + (new (BlockBootstrapAllocation<0xc8>{}) WeightedPressurePlateBlock( + L"gold_block", Material::METAL, 15, MaterialColor::GOLD)) + ->setBaseItemTypeAndMaterial(15, 4) + ->setDestroyTime(0.5) + ->setSoundType(SoundType::WOOD) + ->setNameAndDescriptionId(StringIDs::WeightedPressurePlateLight, + StringIDs::ProvidesARedstoneChargeTheChargeWillBe_1)); // Size: 0xC8u Block::registerBlock(148, L"heavy_weighted_pressure_plate", - (new WeightedPressurePlateBlock(L"iron_block", Material::METAL, 150, 0)) + (new (BlockBootstrapAllocation<0xc8>{}) + WeightedPressurePlateBlock(L"iron_block", Material::METAL, 150, 0)) ->setBaseItemTypeAndMaterial(15, 3) ->setDestroyTime(0.5) ->setSoundType(SoundType::WOOD) @@ -2602,7 +2594,7 @@ void Block::staticCtor() { // Size: 0xB0u Block::registerBlock(149, L"unpowered_comparator", - (new ComparatorBlock(false)) + (new (BlockBootstrapAllocation<0xb0>{}) ComparatorBlock(false)) ->setIconName(L"comparator_off") ->setDestroyTime(0.0) ->setSoundType(SoundType::WOOD) @@ -2613,7 +2605,7 @@ void Block::staticCtor() { // Size: 0xB0u Block::registerBlock(150, L"powered_comparator", - (new ComparatorBlock(true)) + (new (BlockBootstrapAllocation<0xb0>{}) ComparatorBlock(true)) ->setIconName(L"comparator_on") ->setDestroyTime(0.0) ->setLightEmission(0.625) @@ -2625,7 +2617,7 @@ void Block::staticCtor() { // Size: 0xD0u Block::registerBlock(151, L"daylight_detector", - (new DaylightDetectorBlock(false)) + (new (BlockBootstrapAllocation<0xd0>{}) DaylightDetectorBlock(false)) ->setIconName(L"daylight_detector") ->setNameAndDescriptionId(StringIDs::DaylightSensor, StringIDs::ABlockThatOutputsARedstoneSignalBased)); @@ -2654,7 +2646,7 @@ void Block::staticCtor() { // Size: 0xC8u Block::registerBlock( 154, L"hopper", - (new HopperBlock()) + (new (BlockBootstrapAllocation<0xc8>{}) HopperBlock()) ->setIconName(L"hopper") ->setDestroyTime(3.0) ->setExplodeable(8.0) @@ -2672,18 +2664,18 @@ void Block::staticCtor() { Block::registerBlock(155, L"quartz_block", quartzBlock); // Size: 0xC0u - const BlockState* variant = quartzBlock->defaultBlockState()->setValue( - QuartzBlock::VARIANT, QuartzBlock::Variant::DEFAULT); - Block* quartzStairsBlock - = (new StairBlock(variant)) - ->setIconName(L"stairsQuartz") - ->setNameAndDescriptionId(StringIDs::QuartzStairs, StringIDs::UsedForCompactStaircases_1) - ->setBaseItemTypeAndMaterial(16, 45); - Block::registerBlock(156, L"quartz_stairs", quartzStairsBlock); + Block::registerBlock( + 156, L"quartz_stairs", + (new (BlockBootstrapAllocation<0xc0>{}) + StairBlock(quartzBlock->defaultBlockState()->setValue( + QuartzBlock::VARIANT, QuartzBlock::Variant::DEFAULT))) + ->setIconName(L"stairsQuartz") + ->setNameAndDescriptionId(StringIDs::QuartzStairs, StringIDs::UsedForCompactStaircases_1) + ->setBaseItemTypeAndMaterial(16, 45)); // Size: 0xB0u Block::registerBlock(157, L"activator_rail", - (new PoweredRailBlock()) + (new (BlockBootstrapAllocation<0xb0>{}) PoweredRailBlock()) ->setIconName(L"rail_activator") ->setDestroyTime(0.7) ->setSoundType(SoundType::METAL) @@ -2693,7 +2685,7 @@ void Block::staticCtor() { // Size: 0xE8u Block::registerBlock( 158, L"dropper", - (new DropperBlock()) + (new (BlockBootstrapAllocation<0xe8>{}) DropperBlock()) ->setIconName(L"dropper") ->setDestroyTime(3.5) ->setSoundType(SoundType::STONE) @@ -2702,7 +2694,7 @@ void Block::staticCtor() { // Size: 0x128u Block::registerBlock(159, L"stained_hardened_clay", - (new StainedHardenedClayBlock()) + (new (BlockBootstrapAllocation<0x128>{}) StainedHardenedClayBlock()) ->setIconName(L"hardened_clay_stained") ->setDestroyTime(1.25) ->setExplodeable(7.0) @@ -2714,7 +2706,7 @@ void Block::staticCtor() { // Size: 0xE0u Block::registerBlock( 160, L"stained_glass_pane", - (new StainedGlassPaneBlock()) + (new (BlockBootstrapAllocation<0xe0>{}) StainedGlassPaneBlock()) ->setIconName(L"glass") ->setDestroyTime(0.3) ->setSoundType(SoundType::GLASS) @@ -2724,7 +2716,7 @@ void Block::staticCtor() { // Size: 0x110u Block::registerBlock(161, L"leaves2", - (new NewLeafBlock()) + (new (BlockBootstrapAllocation<0x110>{}) NewLeafBlock()) ->setIconName(L"leaves") ->sendBlockData(3) ->setNameAndDescriptionId(StringIDs::Leaves, @@ -2739,28 +2731,26 @@ void Block::staticCtor() { ->setNameAndDescriptionId(StringIDs::Wood, StringIDs::ChoppedUsingAnAxeAndCanBeCrafted)); // Size: 0xC0u - const BlockState* acaciaStairsBlockVariant - = planksBlock->defaultBlockState()->setValue(PlanksBlock::VARIANT, - PlanksBlock::Variant::ACACIA); - Block* acaciaStairsBlock - = (new StairBlock(acaciaStairsBlockVariant)) - ->setIconName(L"stairsWoodAcacia") - ->sendBlockData(15) - ->setNameAndDescriptionId(StringIDs::AcaciaWoodStairs, StringIDs::UsedForCompactStaircases_1) - ->setBaseItemTypeAndMaterial(16, 42); - Block::registerBlock(163, L"acacia_stairs", acaciaStairsBlock); + Block::registerBlock( + 163, L"acacia_stairs", + (new (BlockBootstrapAllocation<0xc0>{}) + StairBlock(planksBlock->defaultBlockState()->setValue( + PlanksBlock::VARIANT, PlanksBlock::Variant::ACACIA))) + ->setIconName(L"stairsWoodAcacia") + ->sendBlockData(15) + ->setNameAndDescriptionId(StringIDs::AcaciaWoodStairs, StringIDs::UsedForCompactStaircases_1) + ->setBaseItemTypeAndMaterial(16, 42)); // Size: 0xC0u - const BlockState* darkOakStairsBlockVariant - = planksBlock->defaultBlockState()->setValue(PlanksBlock::VARIANT, - PlanksBlock::Variant::DARK_OAK); - Block* darkOakStairsBlock - = (new StairBlock(darkOakStairsBlockVariant)) - ->setIconName(L"stairsWoodDarkOak") - ->sendBlockData(15) - ->setNameAndDescriptionId(StringIDs::DarkOakWoodStairs, StringIDs::UsedForCompactStaircases_1) - ->setBaseItemTypeAndMaterial(16, 43); - Block::registerBlock(164, L"dark_oak_stairs", darkOakStairsBlock); + Block::registerBlock( + 164, L"dark_oak_stairs", + (new (BlockBootstrapAllocation<0xc0>{}) + StairBlock(planksBlock->defaultBlockState()->setValue( + PlanksBlock::VARIANT, PlanksBlock::Variant::DARK_OAK))) + ->setIconName(L"stairsWoodDarkOak") + ->sendBlockData(15) + ->setNameAndDescriptionId(StringIDs::DarkOakWoodStairs, StringIDs::UsedForCompactStaircases_1) + ->setBaseItemTypeAndMaterial(16, 43)); // Size: 0xC0u Block::registerBlock(165, L"slime", @@ -2863,14 +2853,14 @@ void Block::staticCtor() { // Size: 0xB0u Block::registerBlock(175, L"double_plant", - (new DoublePlantBlock()) + (new (BlockBootstrapAllocation<0xb0>{}) DoublePlantBlock()) ->setNameAndDescriptionId(StringIDs::DoublePlantBlock, StringIDs::ALargePlant) ->disableMipmap()); // Size: 0xB0u Block::registerBlock( 176, L"standing_banner", - (new StandingBannerBlock()) + (new (BlockBootstrapAllocation<0xb0>{}) StandingBannerBlock()) ->setIconName(L"planks_oak") ->setDestroyTime(1.0) ->setSoundType(SoundType::WOOD) @@ -2881,7 +2871,7 @@ void Block::staticCtor() { // Size: 0xB0u Block::registerBlock( 177, L"wall_banner", - (new WallBannerBlock()) + (new (BlockBootstrapAllocation<0xb0>{}) WallBannerBlock()) ->setIconName(L"planks_oak") ->setDestroyTime(1.0) ->setSoundType(SoundType::WOOD) @@ -2891,7 +2881,7 @@ void Block::staticCtor() { // Size: 0xD0u Block::registerBlock(178, L"daylight_detector_inverted", - (new DaylightDetectorBlock(true)) + (new (BlockBootstrapAllocation<0xd0>{}) DaylightDetectorBlock(true)) ->setIconName(L"daylight_detector") ->setNameAndDescriptionId(StringIDs::DaylightSensor, StringIDs::ABlockThatOutputsARedstoneSignalBased)); @@ -2908,19 +2898,18 @@ void Block::staticCtor() { Block::registerBlock(179, L"red_sandstone", redSandStoneBlock); // Size: 0xC0u - const BlockState* redSandstoneStairsBlockVariant - = redSandStoneBlock->defaultBlockState()->setValue( - RedSandStoneBlock::TYPE, RedSandStoneBlock::Variant::DEFAULT); - Block* redSandstoneStairsBlock - = (new StairBlock(redSandstoneStairsBlockVariant)) - ->setIconName(L"red_sandstone") - ->setNameAndDescriptionId(StringIDs::RedSandstoneStairs, StringIDs::UsedForCompactStaircases_2) - ->setBaseItemTypeAndMaterial(16, 48); - Block::registerBlock(180, L"red_sandstone_stairs", redSandstoneStairsBlock); + Block::registerBlock( + 180, L"red_sandstone_stairs", + (new (BlockBootstrapAllocation<0xc0>{}) + StairBlock(redSandStoneBlock->defaultBlockState()->setValue( + RedSandStoneBlock::TYPE, RedSandStoneBlock::Variant::DEFAULT))) + ->setIconName(L"red_sandstone") + ->setNameAndDescriptionId(StringIDs::RedSandstoneStairs, StringIDs::UsedForCompactStaircases_2) + ->setBaseItemTypeAndMaterial(16, 48)); // Size: 0xB0u Block::registerBlock(181, L"double_stone_slab2", - (new FullNewStoneSlabBlock()) + (new (BlockBootstrapAllocation<0xb0>{}) FullNewStoneSlabBlock()) ->setIconName(L"double_stone_slab2") ->setDestroyTime(2.0) ->setExplodeable(10.0) @@ -2931,7 +2920,7 @@ void Block::staticCtor() { // Size: 0xB0u Block::registerBlock(182, L"stone_slab2", - (new HalfNewStoneSlabBlock()) + (new (BlockBootstrapAllocation<0xb0>{}) HalfNewStoneSlabBlock()) ->setIconName(L"stone_slab2") ->setDestroyTime(2.0) ->setExplodeable(10.0) @@ -2942,7 +2931,8 @@ void Block::staticCtor() { // Size: 0xC0u Block::registerBlock(183, L"spruce_fence_gate", - (new FenceGateBlock(L"planks_spruce", PlanksBlock::Variant::SPRUCE)) + (new (BlockBootstrapAllocation<0xc0>{}) + FenceGateBlock(L"planks_spruce", PlanksBlock::Variant::SPRUCE)) ->setIconName(L"fenceGate") ->setDestroyTime(2.0) ->setExplodeable(5.0) @@ -2953,20 +2943,22 @@ void Block::staticCtor() { ->setBaseItemTypeAndMaterial(47, 39)); // Size: 0xC0u - Block::registerBlock(184, L"birch_fence_gate", - (new FenceGateBlock(L"planks_birch", PlanksBlock::Variant::BIRCH)) - ->setIconName(L"fenceGate") - ->setDestroyTime(2.0) - ->setExplodeable(5.0) - ->setSoundType(SoundType::WOOD) - ->sendBlockData(15) - ->setNameAndDescriptionId(StringIDs::BirchFenceGate, - StringIDs::SimilarToADoorButUsedPrimarilyWithFences) - ->setBaseItemTypeAndMaterial(47, 40)); + Block::registerBlock( + 184, L"birch_fence_gate", + (new (BlockBootstrapAllocation<0xc0>{}) FenceGateBlock(L"planks_birch", PlanksBlock::Variant::BIRCH)) + ->setIconName(L"fenceGate") + ->setDestroyTime(2.0) + ->setExplodeable(5.0) + ->setSoundType(SoundType::WOOD) + ->sendBlockData(15) + ->setNameAndDescriptionId(StringIDs::BirchFenceGate, + StringIDs::SimilarToADoorButUsedPrimarilyWithFences) + ->setBaseItemTypeAndMaterial(47, 40)); // Size: 0xC0u Block::registerBlock(185, L"jungle_fence_gate", - (new FenceGateBlock(L"planks_jungle", PlanksBlock::Variant::JUNGLE)) + (new (BlockBootstrapAllocation<0xc0>{}) + FenceGateBlock(L"planks_jungle", PlanksBlock::Variant::JUNGLE)) ->setIconName(L"fenceGate") ->setDestroyTime(2.0) ->setExplodeable(5.0) @@ -2978,7 +2970,8 @@ void Block::staticCtor() { // Size: 0xC0u Block::registerBlock(186, L"dark_oak_fence_gate", - (new FenceGateBlock(L"planks_big_oak", PlanksBlock::Variant::DARK_OAK)) + (new (BlockBootstrapAllocation<0xc0>{}) + FenceGateBlock(L"planks_big_oak", PlanksBlock::Variant::DARK_OAK)) ->setIconName(L"fenceGate") ->setDestroyTime(2.0) ->setExplodeable(5.0) @@ -2990,7 +2983,8 @@ void Block::staticCtor() { // Size: 0xC0u Block::registerBlock(187, L"acacia_fence_gate", - (new FenceGateBlock(L"planks_acacia", PlanksBlock::Variant::ACACIA)) + (new (BlockBootstrapAllocation<0xc0>{}) + FenceGateBlock(L"planks_acacia", PlanksBlock::Variant::ACACIA)) ->setIconName(L"fenceGate") ->setDestroyTime(2.0) ->setExplodeable(5.0) @@ -3003,7 +2997,8 @@ void Block::staticCtor() { // Size: 0xC0u Block::registerBlock( 188, L"spruce_fence", - (new FenceBlock(L"planks_spruce", Material::WOOD, PlanksBlock::Variant::SPRUCE->getMaterialColor())) + (new (BlockBootstrapAllocation<0xc0>{}) + FenceBlock(L"planks_spruce", Material::WOOD, PlanksBlock::Variant::SPRUCE->getMaterialColor())) ->setDestroyTime(2.0) ->setExplodeable(5.0) ->setSoundType(SoundType::WOOD) @@ -3013,7 +3008,8 @@ void Block::staticCtor() { // Size: 0xC0u Block::registerBlock( 189, L"birch_fence", - (new FenceBlock(L"planks_birch", Material::WOOD, PlanksBlock::Variant::BIRCH->getMaterialColor())) + (new (BlockBootstrapAllocation<0xc0>{}) + FenceBlock(L"planks_birch", Material::WOOD, PlanksBlock::Variant::BIRCH->getMaterialColor())) ->setDestroyTime(2.0) ->setExplodeable(5.0) ->setSoundType(SoundType::WOOD) @@ -3023,7 +3019,8 @@ void Block::staticCtor() { // Size: 0xC0u Block::registerBlock( 190, L"jungle_fence", - (new FenceBlock(L"planks_jungle", Material::WOOD, PlanksBlock::Variant::JUNGLE->getMaterialColor())) + (new (BlockBootstrapAllocation<0xc0>{}) + FenceBlock(L"planks_jungle", Material::WOOD, PlanksBlock::Variant::JUNGLE->getMaterialColor())) ->setDestroyTime(2.0) ->setExplodeable(5.0) ->setSoundType(SoundType::WOOD) @@ -3033,8 +3030,8 @@ void Block::staticCtor() { // Size: 0xC0u Block::registerBlock( 191, L"dark_oak_fence", - (new FenceBlock(L"planks_big_oak", Material::WOOD, - PlanksBlock::Variant::DARK_OAK->getMaterialColor())) + (new (BlockBootstrapAllocation<0xc0>{}) FenceBlock( + L"planks_big_oak", Material::WOOD, PlanksBlock::Variant::DARK_OAK->getMaterialColor())) ->setDestroyTime(2.0) ->setExplodeable(5.0) ->setSoundType(SoundType::WOOD) @@ -3044,7 +3041,8 @@ void Block::staticCtor() { // Size: 0xC0u Block::registerBlock( 192, L"acacia_fence", - (new FenceBlock(L"planks_acacia", Material::WOOD, PlanksBlock::Variant::ACACIA->getMaterialColor())) + (new (BlockBootstrapAllocation<0xc0>{}) + FenceBlock(L"planks_acacia", Material::WOOD, PlanksBlock::Variant::ACACIA->getMaterialColor())) ->setDestroyTime(2.0) ->setExplodeable(5.0) ->setSoundType(SoundType::WOOD) @@ -3053,7 +3051,7 @@ void Block::staticCtor() { // Size: 0xC8u Block::registerBlock(193, L"spruce_door", - (new DoorBlock(Material::WOOD)) + (new (BlockBootstrapAllocation<0xc8>{}) DoorBlock(Material::WOOD)) ->setIconName(L"door_spruce") ->setDestroyTime(3.0) ->setSoundType(SoundType::WOOD) @@ -3064,7 +3062,7 @@ void Block::staticCtor() { // Size: 0xC8u Block::registerBlock(194, L"birch_door", - (new DoorBlock(Material::WOOD)) + (new (BlockBootstrapAllocation<0xc8>{}) DoorBlock(Material::WOOD)) ->setIconName(L"door_birch") ->setDestroyTime(3.0) ->setSoundType(SoundType::WOOD) @@ -3075,7 +3073,7 @@ void Block::staticCtor() { // Size: 0xC8u Block::registerBlock(195, L"jungle_door", - (new DoorBlock(Material::WOOD)) + (new (BlockBootstrapAllocation<0xc8>{}) DoorBlock(Material::WOOD)) ->setIconName(L"door_jungle") ->setDestroyTime(3.0) ->setSoundType(SoundType::WOOD) @@ -3086,7 +3084,7 @@ void Block::staticCtor() { // Size: 0xC8u Block::registerBlock(196, L"acacia_door", - (new DoorBlock(Material::WOOD)) + (new (BlockBootstrapAllocation<0xc8>{}) DoorBlock(Material::WOOD)) ->setIconName(L"door_acacia") ->setDestroyTime(3.0) ->setSoundType(SoundType::WOOD) @@ -3097,7 +3095,7 @@ void Block::staticCtor() { // Size: 0xC8u Block::registerBlock(197, L"dark_oak_door", - (new DoorBlock(Material::WOOD)) + (new (BlockBootstrapAllocation<0xc8>{}) DoorBlock(Material::WOOD)) ->setIconName(L"door_dark_oak") ->setDestroyTime(3.0) ->setSoundType(SoundType::WOOD) @@ -3129,7 +3127,7 @@ void Block::staticCtor() { // Size: 0xC0u Block::registerBlock( 200, L"chorus_flower", - (new ChorusFlowerBlock()) + (new (BlockBootstrapAllocation<0xc0>{}) ChorusFlowerBlock()) ->setIconName(L"chorus_flower") ->setDestroyTime(0.4) ->setSoundType(SoundType::WOOD) @@ -3149,7 +3147,8 @@ void Block::staticCtor() { // Size: 0xC8u Block::registerBlock( 202, L"purpur_pillar", - (new RotatedPillarBlockImpl(Material::STONE, MaterialColor::COLOR_MAGENTA)) + (new (BlockBootstrapAllocation<0xc8>{}) + RotatedPillarBlockImpl(Material::STONE, MaterialColor::COLOR_MAGENTA)) ->setIconTopName(L"purpur_pillar_top") // TODO ->setIconName(L"purpur_pillar") ->setDestroyTime(1.5) @@ -3160,7 +3159,7 @@ void Block::staticCtor() { // Size: 0xC0u Block::registerBlock(203, L"purpur_stairs", - (new StairBlock(purpurBlock->defaultBlockState())) + (new (BlockBootstrapAllocation<0xc0>{}) StairBlock(purpurBlock->defaultBlockState())) ->setNameAndDescriptionId(StringIDs::PurpurStairs, 0xdda0c93) ->setBaseItemTypeAndMaterial(16, 62)); @@ -3199,7 +3198,7 @@ void Block::staticCtor() { // Size: 0x110u Block::registerBlock( 207, L"beetroots", - (new BeetrootBlock()) + (new (BlockBootstrapAllocation<0x110>{}) BeetrootBlock()) ->setIconName(L"beetroots") ->disableMipmap() ->setNameAndDescriptionId(StringIDs::Beetroots, @@ -3207,7 +3206,7 @@ void Block::staticCtor() { // Size: 0xB0u Block* grassPathBlock - = (new GrassPathBlock()) + = (new (BlockBootstrapAllocation<0xb0>{}) GrassPathBlock()) ->setDestroyTime(0.65) ->setSoundType(SoundType::GRASS) ->setIconName(L"grass_path") @@ -3218,9 +3217,9 @@ void Block::staticCtor() { // Size: 0xB0u Block::registerBlock( 209, L"end_gateway", - (new EndGatewayBlock(Material::PORTAL)) + (new (BlockBootstrapAllocation<0xb0>{}) EndGatewayBlock(Material::PORTAL)) ->setIconName(L"stone") - ->setDestroyTime(3.4028e38) + ->setDestroyTime(3.4028234663852886e38f) ->setExplodeable(6000000.0) ->setNameAndDescriptionId(StringIDs::EndGateway, StringIDs::GeneratedWhenEnderDragonIsKilledThrowingAn)); @@ -3228,7 +3227,7 @@ void Block::staticCtor() { // Size: 0xD8u Block::registerBlock( 212, L"frosted_ice", - (new FrostedIceBlock()) + (new (BlockBootstrapAllocation<0xd8>{}) FrostedIceBlock()) ->setDestroyTime(0.5) ->setLightBlock(3) ->setSoundType(SoundType::GLASS) @@ -3281,14 +3280,14 @@ void Block::staticCtor() { // Size: 0xD0u Block::registerBlock(218, L"observer", - (new ObserverBlock()) + (new (BlockBootstrapAllocation<0xd0>{}) ObserverBlock()) ->setDestroyTime(3.0) ->setNameAndDescriptionId(StringIDs::Observer, StringIDs::EmitsARedstoneSignalWhenAdjacentBlocksAre)); // Size: 0xB8u Block::registerBlock(219, L"white_shulker_box", - (new ShulkerBoxBlock(DyeColor::WHITE)) + (new (BlockBootstrapAllocation<0xb8>{}) ShulkerBoxBlock(DyeColor::WHITE)) ->setIconName(L"shulker_top") ->setDestroyTime(2.0) ->setSoundType(SoundType::STONE) @@ -3298,7 +3297,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock(220, L"orange_shulker_box", - (new ShulkerBoxBlock(DyeColor::ORANGE)) + (new (BlockBootstrapAllocation<0xb8>{}) ShulkerBoxBlock(DyeColor::ORANGE)) ->setIconName(L"shulker_top") ->setDestroyTime(2.0) ->setSoundType(SoundType::STONE) @@ -3308,7 +3307,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock(221, L"magenta_shulker_box", - (new ShulkerBoxBlock(DyeColor::MAGENTA)) + (new (BlockBootstrapAllocation<0xb8>{}) ShulkerBoxBlock(DyeColor::MAGENTA)) ->setIconName(L"shulker_top") ->setDestroyTime(2.0) ->setSoundType(SoundType::STONE) @@ -3318,7 +3317,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock(222, L"light_blue_shulker_box", - (new ShulkerBoxBlock(DyeColor::LIGHT_BLUE)) + (new (BlockBootstrapAllocation<0xb8>{}) ShulkerBoxBlock(DyeColor::LIGHT_BLUE)) ->setIconName(L"shulker_top") ->setDestroyTime(2.0) ->setSoundType(SoundType::STONE) @@ -3328,7 +3327,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock(223, L"yellow_shulker_box", - (new ShulkerBoxBlock(DyeColor::YELLOW)) + (new (BlockBootstrapAllocation<0xb8>{}) ShulkerBoxBlock(DyeColor::YELLOW)) ->setIconName(L"shulker_top") ->setDestroyTime(2.0) ->setSoundType(SoundType::STONE) @@ -3339,7 +3338,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock( 224, L"lime_shulker_box", - (new ShulkerBoxBlock(DyeColor::LIME)) + (new (BlockBootstrapAllocation<0xb8>{}) ShulkerBoxBlock(DyeColor::LIME)) ->setIconName(L"shulker_top") ->setDestroyTime(2.0) ->setSoundType(SoundType::STONE) @@ -3349,7 +3348,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock( 225, L"pink_shulker_box", - (new ShulkerBoxBlock(DyeColor::PINK)) + (new (BlockBootstrapAllocation<0xb8>{}) ShulkerBoxBlock(DyeColor::PINK)) ->setIconName(L"shulker_top") ->setDestroyTime(2.0) ->setSoundType(SoundType::STONE) @@ -3359,7 +3358,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock( 226, L"gray_shulker_box", - (new ShulkerBoxBlock(DyeColor::GRAY)) + (new (BlockBootstrapAllocation<0xb8>{}) ShulkerBoxBlock(DyeColor::GRAY)) ->setIconName(L"shulker_top") ->setDestroyTime(2.0) ->setSoundType(SoundType::STONE) @@ -3368,7 +3367,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock(227, L"silver_shulker_box", - (new ShulkerBoxBlock(DyeColor::SILVER)) + (new (BlockBootstrapAllocation<0xb8>{}) ShulkerBoxBlock(DyeColor::SILVER)) ->setIconName(L"shulker_top") ->setDestroyTime(2.0) ->setSoundType(SoundType::STONE) @@ -3379,7 +3378,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock( 228, L"cyan_shulker_box", - (new ShulkerBoxBlock(DyeColor::CYAN)) + (new (BlockBootstrapAllocation<0xb8>{}) ShulkerBoxBlock(DyeColor::CYAN)) ->setIconName(L"shulker_top") ->setDestroyTime(2.0) ->setSoundType(SoundType::STONE) @@ -3388,7 +3387,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock(229, L"purple_shulker_box", - (new ShulkerBoxBlock(DyeColor::PURPLE)) + (new (BlockBootstrapAllocation<0xb8>{}) ShulkerBoxBlock(DyeColor::PURPLE)) ->setIconName(L"shulker_top") ->setDestroyTime(2.0) ->setSoundType(SoundType::STONE) @@ -3399,7 +3398,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock( 230, L"blue_shulker_box", - (new ShulkerBoxBlock(DyeColor::BLUE)) + (new (BlockBootstrapAllocation<0xb8>{}) ShulkerBoxBlock(DyeColor::BLUE)) ->setIconName(L"shulker_top") ->setDestroyTime(2.0) ->setSoundType(SoundType::STONE) @@ -3408,7 +3407,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock(231, L"brown_shulker_box", - (new ShulkerBoxBlock(DyeColor::BROWN)) + (new (BlockBootstrapAllocation<0xb8>{}) ShulkerBoxBlock(DyeColor::BROWN)) ->setIconName(L"shulker_top") ->setDestroyTime(2.0) ->setSoundType(SoundType::STONE) @@ -3418,7 +3417,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock(232, L"green_shulker_box", - (new ShulkerBoxBlock(DyeColor::GREEN)) + (new (BlockBootstrapAllocation<0xb8>{}) ShulkerBoxBlock(DyeColor::GREEN)) ->setIconName(L"shulker_top") ->setDestroyTime(2.0) ->setSoundType(SoundType::STONE) @@ -3429,7 +3428,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock( 233, L"red_shulker_box", - (new ShulkerBoxBlock(DyeColor::RED)) + (new (BlockBootstrapAllocation<0xb8>{}) ShulkerBoxBlock(DyeColor::RED)) ->setIconName(L"shulker_top") ->setDestroyTime(2.0) ->setSoundType(SoundType::STONE) @@ -3439,7 +3438,7 @@ void Block::staticCtor() { // Size: 0xB8u Block::registerBlock( 234, L"black_shulker_box", - (new ShulkerBoxBlock(DyeColor::BLACK)) + (new (BlockBootstrapAllocation<0xb8>{}) ShulkerBoxBlock(DyeColor::BLACK)) ->setIconName(L"shulker_top") ->setDestroyTime(2.0) ->setSoundType(SoundType::STONE) @@ -3570,7 +3569,7 @@ void Block::staticCtor() { // Size: 0x128u Block::registerBlock( 251, L"concrete", - (new ColoredBlock(Material::STONE)) + (new (BlockBootstrapAllocation<0x128>{}) ColoredBlock(Material::STONE)) ->setDestroyTime(1.8) ->setSoundType(SoundType::STONE) ->setIconName(L"concrete") @@ -3578,7 +3577,7 @@ void Block::staticCtor() { // Size: 0x128u Block::registerBlock(252, L"concrete_powder", - (new ConcretePowderBlock()) + (new (BlockBootstrapAllocation<0x128>{}) ConcretePowderBlock()) ->setDestroyTime(0.5) ->setSoundType(SoundType::SAND) ->setIconName(L"concrete_powder") @@ -3602,8 +3601,9 @@ void Block::staticCtor() { } else { StairBlock* s = dynamic_cast(block); HalfSlabBlock* b = dynamic_cast(block); - if (block == farmBlock || block == grassPathBlock || !s || b) - block->m_field3C = block->m_lightEmission == 0 || block->m_isBlocksLight; + // The original uses opacity here; emission is a separate field. + if (block != farmBlock && block != grassPathBlock && !s && !b) + block->m_field3C = block->m_lightBlock == 0 || block->m_isBlocksLight; else block->m_field3C = 1; diff --git a/src/Minecraft.World/net/minecraft/world/level/block/Block.h b/src/Minecraft.World/net/minecraft/world/level/block/Block.h index a023fa19..f87d0eb1 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/Block.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/Block.h @@ -217,6 +217,7 @@ class Block { Material* getMaterial(); int getId(); + static int getId(Block*); bool neighbourVisibleThroughShapes(const arrayWithLength*, LevelSource*, const BlockPos&, const Direction*); diff --git a/src/Minecraft.World/net/minecraft/world/level/block/BlockBootstrapAllocation.h b/src/Minecraft.World/net/minecraft/world/level/block/BlockBootstrapAllocation.h new file mode 100644 index 00000000..13fbd582 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/level/block/BlockBootstrapAllocation.h @@ -0,0 +1,19 @@ +#pragma once + +#include +#include + +/** Custom allocation tag for partial block layouts; preserves allocation before argument evaluation. */ +template +struct BlockBootstrapAllocation {}; + +template +inline __attribute__((always_inline)) void* operator new(std::size_t declaredSize, + BlockBootstrapAllocation) { + return ::operator new(OriginalSize); +} + +template +inline void operator delete(void* pointer, BlockBootstrapAllocation) noexcept { + ::operator delete(pointer); +} diff --git a/src/Minecraft.World/net/minecraft/world/level/block/Blocks.cpp b/src/Minecraft.World/net/minecraft/world/level/block/Blocks.cpp index 6077c6ca..d76b0989 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/Blocks.cpp +++ b/src/Minecraft.World/net/minecraft/world/level/block/Blocks.cpp @@ -1,5 +1,7 @@ #include "net/minecraft/world/level/block/Blocks.h" +#include + #include "net/minecraft/resources/ResourceLocation.h" #include "net/minecraft/world/level/block/FireBlock.h" #include "net/minecraft/world/level/block/LeafBlock.h" @@ -267,3 +269,20 @@ void Blocks::staticInit() { STRUCTURE_BLOCK = get(L"structure_block"); FireBlock::staticCtor(); } + +class Integer { +public: + static int parseInt(const std::wstring&, int base); +}; + +// name guessed +int Integer::parseInt(const std::wstring& value, int base) { + return static_cast(std::wcstol(value.c_str(), nullptr, base)); +} + +Block* Blocks::byString(const std::wstring& name) { + ResourceLocation location(name); + if (Registry->containsKey(location)) + return Registry->get(location); + return Registry->byId(Integer::parseInt(name, 10)); +} diff --git a/src/Minecraft.World/net/minecraft/world/level/block/Blocks.h b/src/Minecraft.World/net/minecraft/world/level/block/Blocks.h index b48fce2e..f8a415ed 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/Blocks.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/Blocks.h @@ -20,6 +20,7 @@ class Blocks { static void staticInit(); static Block* get(const std::wstring&); + static Block* byString(const std::wstring&); static inline Block* AIR; static inline Block* STONE; diff --git a/src/Minecraft.World/net/minecraft/world/level/block/CactusBlock.h b/src/Minecraft.World/net/minecraft/world/level/block/CactusBlock.h index 8b28cf17..b3a21a1c 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/CactusBlock.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/CactusBlock.h @@ -1,8 +1,9 @@ -#pragma once - -#include "net/minecraft/world/level/block/Block.h" - -class CactusBlock : public Block { -public: - CactusBlock(); -}; +#pragma once + +#include "net/minecraft/world/level/block/Block.h" + +class CactusBlock : public Block { +public: + CactusBlock(); + virtual bool canSurvive(Level*, const BlockPos&); +}; diff --git a/src/Minecraft.World/net/minecraft/world/level/block/ChestBlock.h b/src/Minecraft.World/net/minecraft/world/level/block/ChestBlock.h index 550daf3b..1903c70f 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/ChestBlock.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/ChestBlock.h @@ -5,6 +5,7 @@ class ChestBlock : public Block { public: ChestBlock(bool trapped); + const BlockState* reorient(Level*, const BlockPos&, const BlockState*); static void blockStaticCtor(); }; diff --git a/src/Minecraft.World/net/minecraft/world/level/block/ChorusFlowerBlock.h b/src/Minecraft.World/net/minecraft/world/level/block/ChorusFlowerBlock.h index 26e258ac..ed7b58fd 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/ChorusFlowerBlock.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/ChorusFlowerBlock.h @@ -1,8 +1,9 @@ -#pragma once - -#include "net/minecraft/world/level/block/Block.h" - -class ChorusFlowerBlock : public Block { -public: - ChorusFlowerBlock(); -}; +#pragma once + +#include "net/minecraft/world/level/block/Block.h" + +class ChorusFlowerBlock : public Block { +public: + static void generatePlant(Level*, BlockPos, Random*, int); + ChorusFlowerBlock(); +}; diff --git a/src/Minecraft.World/net/minecraft/world/level/block/CocoaBlock.h b/src/Minecraft.World/net/minecraft/world/level/block/CocoaBlock.h index a432208c..12e5472e 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/CocoaBlock.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/CocoaBlock.h @@ -1,13 +1,14 @@ -#pragma once - -#include "net/minecraft/world/level/block/BonemealableBlock.h" -#include "net/minecraft/world/level/block/HorizontalDirectionalBlock.h" - -class CocoaBlock : public HorizontalDirectionalBlock, public BonemealableBlock { -public: - CocoaBlock(); - - bool isValidBonemealTarget(Level*, const BlockPos&, const BlockState*, bool) override; - bool isBonemealSuccess(Level*, Random*, const BlockPos&, const BlockState*) override; - void performBonemeal(Level*, Random*, const BlockPos&, const BlockState*) override; -}; +#pragma once + +#include "net/minecraft/world/level/block/BonemealableBlock.h" +#include "net/minecraft/world/level/block/HorizontalDirectionalBlock.h" + +class CocoaBlock : public HorizontalDirectionalBlock, public BonemealableBlock { +public: + static Property* AGE; + CocoaBlock(); + + bool isValidBonemealTarget(Level*, const BlockPos&, const BlockState*, bool) override; + bool isBonemealSuccess(Level*, Random*, const BlockPos&, const BlockState*) override; + void performBonemeal(Level*, Random*, const BlockPos&, const BlockState*) override; +}; diff --git a/src/Minecraft.World/net/minecraft/world/level/block/ColoredBlock.h b/src/Minecraft.World/net/minecraft/world/level/block/ColoredBlock.h index 50e5b4a1..6850ba05 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/ColoredBlock.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/ColoredBlock.h @@ -4,6 +4,7 @@ class ColoredBlock : public Block { public: + static Property* COLOR; ColoredBlock(Material*); static void blockStaticCtor(); diff --git a/src/Minecraft.World/net/minecraft/world/level/block/DoublePlantBlock.h b/src/Minecraft.World/net/minecraft/world/level/block/DoublePlantBlock.h index e1632fc5..5afa88a6 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/DoublePlantBlock.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/DoublePlantBlock.h @@ -1,10 +1,34 @@ #pragma once +#include "net/minecraft/core/StringRepresentable.h" #include "net/minecraft/world/level/block/Block.h" class DoublePlantBlock : public Block { public: + class Variant : public StringRepresentable { + public: + static Variant* FERN; + static Variant* GRASS; + static Variant* SUNFLOWER; + static Variant* SYRINGA; + static Variant* ROSE; + static Variant* PAEONIA; + static inline Variant* VARIANTS[6]; + // name guessed + static Variant* byData(int data) { return VARIANTS[static_cast(data) > 5 ? 0 : data]; } + // name guessed + int getNameId() { return m_nameId; } + // name guessed + int getDescriptionId() { return m_descriptionId; } + + int m_data; + std::wstring m_name; + int m_nameId; + int m_descriptionId; + }; + DoublePlantBlock(); + void placeAt(Level*, const BlockPos&, Variant*, int); static void blockStaticCtor(); }; diff --git a/src/Minecraft.World/net/minecraft/world/level/block/EndGatewayBlock.h b/src/Minecraft.World/net/minecraft/world/level/block/EndGatewayBlock.h index 975f10f5..6017af17 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/EndGatewayBlock.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/EndGatewayBlock.h @@ -1,8 +1,10 @@ -#pragma once - -#include "net/minecraft/world/level/block/Block.h" - -class EndGatewayBlock : public BaseEntityBlock { -public: - EndGatewayBlock(Material*); -}; +#pragma once + +#include "net/minecraft/world/level/block/BaseEntityBlock.h" +#include "net/minecraft/world/level/block/state/IntegerProperty.h" + +class EndGatewayBlock : public BaseEntityBlock { +public: + static IntegerProperty* FJ_PORTAL_NUMBER; + EndGatewayBlock(Material*); +}; diff --git a/src/Minecraft.World/net/minecraft/world/level/block/FlowerBlock.cpp b/src/Minecraft.World/net/minecraft/world/level/block/FlowerBlock.cpp new file mode 100644 index 00000000..7b369c27 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/level/block/FlowerBlock.cpp @@ -0,0 +1,8 @@ +#include "net/minecraft/world/level/block/FlowerBlock.h" + +FlowerBlock::Flower* FlowerBlock::Flower::OXEYE_DAISY; // name guessed + +// name guessed +int FlowerBlock::Flower::getData() { + return m_data; +} diff --git a/src/Minecraft.World/net/minecraft/world/level/block/FlowerBlock.h b/src/Minecraft.World/net/minecraft/world/level/block/FlowerBlock.h index 429402f1..81ce2f48 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/FlowerBlock.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/FlowerBlock.h @@ -6,7 +6,10 @@ class FlowerBlock : public Bush, public BonemealableBlock { public: - class FlowerCategory; + class FlowerCategory { + public: + FlowerBlock* getBlock(); + }; class FlowerCategoryPredicate; class Flower { public: @@ -14,6 +17,14 @@ class FlowerBlock : public Bush, public BonemealableBlock { static Flower* RED_FLOWER; static Flower* RED_MUSHROOM; static Flower* BROWN_MUSHROOM; + static Flower* OXEYE_DAISY; + static Flower* BLUE_ORCHID; + static Flower* HOUSTONIA; + static Flower* RED_TULIP; + static Flower* ORANGE_TULIP; + static Flower* WHITE_TULIP; + static Flower* PINK_TULIP; + static Flower* FLOWERS[10]; enum EFlower {}; @@ -21,9 +32,18 @@ class FlowerBlock : public Bush, public BonemealableBlock { FlowerBlock::Flower::EFlower); void* m_field0; + FlowerCategory* getCategory() const; + int getData(); + int getNameId(); + int getDescriptionId(); + int m_field8; + int m_field12; + int m_data; }; virtual FlowerBlock::FlowerCategory* getFlowerCategory() = 0; - virtual void getFlowerProperty(); + virtual Property* getFlowerProperty(); + + Property* m_flowerProperty; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/block/HalfSlabBlock.h b/src/Minecraft.World/net/minecraft/world/level/block/HalfSlabBlock.h index 413356f6..94666f1f 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/HalfSlabBlock.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/HalfSlabBlock.h @@ -53,7 +53,7 @@ class HalfSlabBlock : public Block { bool isSolidRender(const BlockState*) const override; int getResourceCount(Random*) override; const BlockState* getStateForPlacement(Level*, const BlockPos&, const Direction*, float, float, float, - int, std::__1::shared_ptr) override; + int, std::shared_ptr) override; bool isSilkTouchable() override; virtual std::wstring getAuxName(int aux) = 0; virtual bool isFullSize() const = 0; diff --git a/src/Minecraft.World/net/minecraft/world/level/block/HorizontalDirectionalBlock.h b/src/Minecraft.World/net/minecraft/world/level/block/HorizontalDirectionalBlock.h index 77a4a29e..843c570c 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/HorizontalDirectionalBlock.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/HorizontalDirectionalBlock.h @@ -9,4 +9,5 @@ class HorizontalDirectionalBlock : public Block { static void blockStaticCtor(); static EnumProperty* AXIS; + static Property* FACING; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/block/HugeMushroomBlock.h b/src/Minecraft.World/net/minecraft/world/level/block/HugeMushroomBlock.h index 220150ff..bf3abb94 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/HugeMushroomBlock.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/HugeMushroomBlock.h @@ -4,6 +4,20 @@ class HugeMushroomBlock : public Block { public: + class Variant { + public: + static Variant* byData(int); + static Variant* NORTH_WEST; + static Variant* NORTH_EAST; + static Variant* SOUTH_WEST; + static Variant* SOUTH_EAST; + static Variant* CENTER; + static Variant* ALL_INSIDE; + static Variant* STEM; + }; + + static Property* VARIANT; + HugeMushroomBlock(Material*, const MaterialColor*, Block*); static void blockStaticCtor(); diff --git a/src/Minecraft.World/net/minecraft/world/level/block/LogBlock.cpp b/src/Minecraft.World/net/minecraft/world/level/block/LogBlock.cpp index 08e35443..44a91b63 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/LogBlock.cpp +++ b/src/Minecraft.World/net/minecraft/world/level/block/LogBlock.cpp @@ -5,6 +5,7 @@ #include "net/minecraft/core/BlockPos.h" #include "net/minecraft/core/BlockPosIterator.h" #include "net/minecraft/core/Direction.h" +#include "net/minecraft/world/item/ItemResolvers.h" #include "net/minecraft/world/level/Level.h" #include "net/minecraft/world/level/block/LeafBlock.h" #include "net/minecraft/world/level/block/Rotation.h" @@ -75,7 +76,7 @@ const BlockState* LogBlock::getStateForPlacement(Level*, const BlockPos&, const unsigned int LogBlock::getDescriptionId(int data) { const BlockState* state = data == -1 ? this->defaultBlockState() : this->getBlockState(data); - return LogBlock::DESCRIPTION_IDS[this->getWoodType(state)]; + return ItemResolvers::LOG_NAMES[this->getWoodType(state)]; // name guessed } void LogBlock::registerIcons(IconRegister* iconReg) { @@ -94,7 +95,7 @@ TextureAtlasSprite* LogBlock::getTopTexture(const BlockState* state) { return m_topTextures[this->getWoodType(state)]; } -// NON_MATCHING +// NON_MATCHING | score: 400 (lower is better) Direction::Axis* LogBlock::getAxis(const BlockState* state) { switch (state->getValue(LOG_AXIS)->getId()) { case 0: diff --git a/src/Minecraft.World/net/minecraft/world/level/block/Mirror.cpp b/src/Minecraft.World/net/minecraft/world/level/block/Mirror.cpp new file mode 100644 index 00000000..693f5285 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/level/block/Mirror.cpp @@ -0,0 +1,7 @@ +#include "net/minecraft/world/level/block/Mirror.h" + +// name guessed +Mirror::Mirror(const std::wstring& name, eTYPE type) { + m_name = name; + m_type = type; +} diff --git a/src/Minecraft.World/net/minecraft/world/level/block/Mirror.h b/src/Minecraft.World/net/minecraft/world/level/block/Mirror.h new file mode 100644 index 00000000..92640c3a --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/level/block/Mirror.h @@ -0,0 +1,18 @@ +#pragma once + +#include + +class Mirror { +public: + enum eTYPE { MIRROR_0, MIRROR_LEFT_RIGHT, MIRROR_FRONT_BACK }; + + static Mirror* NONE; + static Mirror* LEFT_RIGHT; + + Mirror(const std::wstring& name, eTYPE type); + + std::wstring m_name; + eTYPE m_type; +}; + +static_assert(sizeof(Mirror) == 0x20, "Switch mirror layout"); diff --git a/src/Minecraft.World/net/minecraft/world/level/block/NewLeafBlock.h b/src/Minecraft.World/net/minecraft/world/level/block/NewLeafBlock.h index 9eacf59c..da97518e 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/NewLeafBlock.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/NewLeafBlock.h @@ -1,9 +1,12 @@ #pragma once #include "net/minecraft/world/level/block/LeafBlock.h" +#include "net/minecraft/world/level/block/PlanksBlock.h" +#include "net/minecraft/world/level/block/state/EnumProperty.h" class NewLeafBlock : public LeafBlock { public: + static EnumProperty* VARIANT; NewLeafBlock(); static void blockStaticCtor(); diff --git a/src/Minecraft.World/net/minecraft/world/level/block/OldLeafBlock.h b/src/Minecraft.World/net/minecraft/world/level/block/OldLeafBlock.h index aabba62d..ccbbcbbd 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/OldLeafBlock.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/OldLeafBlock.h @@ -1,9 +1,11 @@ #pragma once #include "net/minecraft/world/level/block/LeafBlock.h" +#include "net/minecraft/world/level/block/PlanksBlock.h" class OldLeafBlock : public LeafBlock { public: + static EnumProperty* VARIANT; OldLeafBlock(); static void blockStaticCtor(); diff --git a/src/Minecraft.World/net/minecraft/world/level/block/OreBlock.cpp b/src/Minecraft.World/net/minecraft/world/level/block/OreBlock.cpp index ded354b1..92a3c2b6 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/OreBlock.cpp +++ b/src/Minecraft.World/net/minecraft/world/level/block/OreBlock.cpp @@ -59,7 +59,7 @@ void OreBlock::spawnResources(Level* level, const BlockPos& pos, const BlockStat int OreBlock::getResourceCountForLootBonus(int fortuneLevel, Random* random) { if (fortuneLevel > 0 && Item::byBlock(this) - != this->getResource(this->getBlockStateDefinition()->getPossibleBlockStates()->get(0), random, + != this->getResource((*this->getBlockStateDefinition()->getPossibleBlockStates())[0], random, fortuneLevel)) { int i = random->nextInt(fortuneLevel + 2) - 1; if (i < 0) { diff --git a/src/Minecraft.World/net/minecraft/world/level/block/PlanksBlock.h b/src/Minecraft.World/net/minecraft/world/level/block/PlanksBlock.h index 987fa049..6201bcc7 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/PlanksBlock.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/PlanksBlock.h @@ -33,6 +33,8 @@ class PlanksBlock : public Block { } int getData() { return this->m_data; } + // name guessed + int getNameId() { return this->m_nameId; } const MaterialColor* getMaterialColor() { return this->m_materialColor; } std::wstring toString() const override { return this->m_name; } diff --git a/src/Minecraft.World/net/minecraft/world/level/block/RedSandStoneBlock.h b/src/Minecraft.World/net/minecraft/world/level/block/RedSandStoneBlock.h index f663f30a..79aab4c6 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/RedSandStoneBlock.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/RedSandStoneBlock.h @@ -28,6 +28,8 @@ class RedSandStoneBlock : public Block { } int getData() { return this->m_data; } + // name guessed + int getNameId() { return this->m_nameId; } std::wstring toString() const override { return this->m_name; } std::wstring getSerializedName() const override { return this->m_name; } diff --git a/src/Minecraft.World/net/minecraft/world/level/block/Rotation.cpp b/src/Minecraft.World/net/minecraft/world/level/block/Rotation.cpp new file mode 100644 index 00000000..7ad0e081 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/level/block/Rotation.cpp @@ -0,0 +1,11 @@ +#include "net/minecraft/world/level/block/Rotation.h" + +// name guessed +Rotation::Rotation(const std::wstring& name, eTYPE type) { + m_name = name; + m_type = type; +} + +Rotation::eTYPE Rotation::getType() const { + return m_type; +} diff --git a/src/Minecraft.World/net/minecraft/world/level/block/Rotation.h b/src/Minecraft.World/net/minecraft/world/level/block/Rotation.h index 5370e3c4..0e406644 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/Rotation.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/Rotation.h @@ -9,6 +9,9 @@ class Rotation { public: enum eTYPE { ROTATE_0, ROTATE_90, ROTATE_180, ROTATE_270 }; + static Rotation* NONE; + static Rotation* CLOCKWISE_90; + Rotation(const std::wstring& name, eTYPE type); Rotation* getRotated(Rotation* rot); diff --git a/src/Minecraft.World/net/minecraft/world/level/block/SandBlock.h b/src/Minecraft.World/net/minecraft/world/level/block/SandBlock.h index 0ff2ded5..4d2cd805 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/SandBlock.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/SandBlock.h @@ -32,6 +32,10 @@ class SandBlock : public FallingBlock { } int getData() { return this->m_data; } + // name guessed + int getNameId() { return this->m_nameId; } + // name guessed + int getDescriptionId() { return this->m_descId; } std::wstring getName() { return this->m_name; } const MaterialColor* getMaterialColor() { return this->m_materialColor; } int getDustColor() { return this->m_dustColor; } diff --git a/src/Minecraft.World/net/minecraft/world/level/block/SandStoneBlock.h b/src/Minecraft.World/net/minecraft/world/level/block/SandStoneBlock.h index 1152ab95..92ab91d0 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/SandStoneBlock.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/SandStoneBlock.h @@ -27,6 +27,8 @@ class SandStoneBlock : public Block { } int getData() { return this->m_data; } + // name guessed + int getNameId() { return this->m_nameId; } std::wstring toString() const override { return this->m_name; } std::wstring getSerializedName() const override { return this->m_name; } diff --git a/src/Minecraft.World/net/minecraft/world/level/block/SoundType.cpp b/src/Minecraft.World/net/minecraft/world/level/block/SoundType.cpp new file mode 100644 index 00000000..8fd57579 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/level/block/SoundType.cpp @@ -0,0 +1,64 @@ +#include "net/minecraft/world/level/block/SoundType.h" + +#include "net/minecraft/sounds/SoundEvent.h" +#include "net/minecraft/sounds/SoundEvents.h" + +const SoundType* SoundType::WOOD; +const SoundType* SoundType::DIRT; +const SoundType* SoundType::GRASS; +const SoundType* SoundType::STONE; +const SoundType* SoundType::METAL; +const SoundType* SoundType::GLASS; +const SoundType* SoundType::WOOL; +const SoundType* SoundType::SAND; +const SoundType* SoundType::SNOW; +const SoundType* SoundType::LADDER; +const SoundType* SoundType::ANVIL; +const SoundType* SoundType::SLIME_BLOCK; + +SoundType::SoundType(float volume, float pitch, const SoundEvent* dig, const SoundEvent* step, + const SoundEvent* place, const SoundEvent* hit, const SoundEvent* fall) + : m_volume(volume), m_pitch(pitch), m_digSound(dig), m_stepSound(step), m_placeSound(place), + m_hitSound(hit), m_fallSound(fall) {} + +const SoundEvent* SoundType::getBreakSound() { + return m_digSound; +} +const SoundEvent* SoundType::getStepSound() { + return m_stepSound; +} +const SoundEvent* SoundType::getHitSound() { + return m_hitSound; +} +const SoundEvent* SoundType::getFallSound() { + return m_fallSound; +} + +void SoundType::staticCtor() { + WOOD = new SoundType(1.0f, 1.0f, SoundEvents::DIG_WOOD_4, SoundEvents::STEP_WOOD_3, + SoundEvents::DIG_WOOD_5, SoundEvents::STEP_WOOD_2, SoundEvents::STEP_WOOD); + DIRT = new SoundType(1.0f, 1.0f, SoundEvents::DIG_GRAVEL, SoundEvents::STEP_GRAVEL_3, + SoundEvents::DIG_GRAVEL_2, SoundEvents::STEP_GRAVEL_2, SoundEvents::STEP_GRAVEL); + GRASS = new SoundType(1.0f, 1.0f, SoundEvents::DIG_GRASS, SoundEvents::STEP_GRASS_3, + SoundEvents::DIG_GRASS_2, SoundEvents::STEP_GRASS_2, SoundEvents::STEP_GRASS); + STONE = new SoundType(1.0f, 1.0f, SoundEvents::DIG_STONE_6, SoundEvents::STEP_STONE_11, + SoundEvents::DIG_STONE_7, SoundEvents::STEP_STONE_10, SoundEvents::STEP_STONE_9); + METAL = new SoundType(1.0f, 1.5f, SoundEvents::DIG_STONE_4, SoundEvents::STEP_STONE_8, + SoundEvents::DIG_STONE_5, SoundEvents::STEP_STONE_7, SoundEvents::STEP_STONE_6); + GLASS = new SoundType(1.0f, 1.0f, SoundEvents::RANDOM_GLASS, SoundEvents::STEP_STONE_5, + SoundEvents::DIG_STONE_3, SoundEvents::STEP_STONE_4, SoundEvents::STEP_STONE_3); + WOOL = new SoundType(1.0f, 1.0f, SoundEvents::DIG_CLOTH, SoundEvents::STEP_CLOTH_3, + SoundEvents::DIG_CLOTH_2, SoundEvents::STEP_CLOTH_2, SoundEvents::STEP_CLOTH); + SAND = new SoundType(1.0f, 1.0f, SoundEvents::DIG_SAND, SoundEvents::STEP_SAND_3, SoundEvents::DIG_SAND_2, + SoundEvents::STEP_SAND_2, SoundEvents::STEP_SAND); + SNOW = new SoundType(1.0f, 1.0f, SoundEvents::DIG_SNOW, SoundEvents::STEP_SNOW_3, SoundEvents::DIG_SNOW_2, + SoundEvents::STEP_SNOW_2, SoundEvents::STEP_SNOW); + LADDER = new SoundType(1.0f, 1.0f, SoundEvents::DIG_WOOD_2, SoundEvents::STEP_LADDER_3, + SoundEvents::DIG_WOOD_3, SoundEvents::STEP_LADDER_2, SoundEvents::STEP_LADDER); + ANVIL = new SoundType(0.30000001f, 1.0f, SoundEvents::DIG_STONE, SoundEvents::STEP_STONE_2, + SoundEvents::RANDOM_ANVIL_LAND_3, SoundEvents::STEP_STONE, + SoundEvents::RANDOM_ANVIL_LAND); + SLIME_BLOCK = new SoundType(1.0f, 1.0f, SoundEvents::MOB_SLIME_BIG_3, SoundEvents::MOB_SLIME_SMALL_3, + SoundEvents::MOB_SLIME_BIG_4, SoundEvents::MOB_SLIME_SMALL_2, + SoundEvents::MOB_SLIME_SMALL); +} diff --git a/src/Minecraft.World/net/minecraft/world/level/block/SoundType.h b/src/Minecraft.World/net/minecraft/world/level/block/SoundType.h index 65ce03c0..cb41a51d 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/SoundType.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/SoundType.h @@ -22,11 +22,16 @@ class SoundType { SoundType(float volume, float pitch, const SoundEvent* dig, const SoundEvent* step, const SoundEvent* place, const SoundEvent* hit, const SoundEvent* fall); + const SoundEvent* getBreakSound(); + const SoundEvent* getStepSound(); + const SoundEvent* getHitSound(); + const SoundEvent* getFallSound(); + float m_volume; float m_pitch; - SoundEvent* m_digSound; - SoundEvent* m_stepSound; - SoundEvent* m_placeSound; - SoundEvent* m_hitSound; - SoundEvent* m_fallSound; + const SoundEvent* m_digSound; + const SoundEvent* m_stepSound; + const SoundEvent* m_placeSound; + const SoundEvent* m_hitSound; + const SoundEvent* m_fallSound; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/block/SpongeBlock.h b/src/Minecraft.World/net/minecraft/world/level/block/SpongeBlock.h index 3b8e272a..4330169f 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/SpongeBlock.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/SpongeBlock.h @@ -1,8 +1,11 @@ -#pragma once - -#include "net/minecraft/world/level/block/Block.h" - -class SpongeBlock : public Block { -public: - SpongeBlock(); -}; +#pragma once + +#include "net/minecraft/world/level/block/Block.h" + +class BooleanProperty; + +class SpongeBlock : public Block { +public: + SpongeBlock(); + static BooleanProperty* WET; +}; diff --git a/src/Minecraft.World/net/minecraft/world/level/block/StoneSlabBlock.h b/src/Minecraft.World/net/minecraft/world/level/block/StoneSlabBlock.h index 079b9960..f9950ed8 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/StoneSlabBlock.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/StoneSlabBlock.h @@ -1,8 +1,18 @@ #pragma once +#include "net/minecraft/core/StringRepresentable.h" #include "net/minecraft/world/level/block/Block.h" +#include "net/minecraft/world/level/block/state/EnumProperty.h" class StoneSlabBlock : public Block { public: + /** Variant interface only; catalogue layout and construction remain unreconstructed. + */ + class Variant : public StringRepresentable { + public: + static Variant* SANDSTONE; + }; + + static EnumProperty* VARIANT; static void blockStaticCtor(); }; diff --git a/src/Minecraft.World/net/minecraft/world/level/block/TallGrassBlock.h b/src/Minecraft.World/net/minecraft/world/level/block/TallGrassBlock.h index 207120ed..f627212d 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/TallGrassBlock.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/TallGrassBlock.h @@ -1,10 +1,18 @@ #pragma once -#include "net/minecraft/world/level/block/Block.h" +#include "net/minecraft/world/level/block/Bush.h" -class TallGrassBlock : public Block { +class TallGrassBlock : public Bush { public: + class Variant { + public: + static Variant* GRASS; + static Variant* FERN; + }; + TallGrassBlock(); static void blockStaticCtor(); + + static Property* TYPE; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/block/TorchBlock.h b/src/Minecraft.World/net/minecraft/world/level/block/TorchBlock.h index e69cbbcf..1c99fc7f 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/TorchBlock.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/TorchBlock.h @@ -4,6 +4,7 @@ class TorchBlock : public Block { public: + static Property* FACING; TorchBlock(); static void blockStaticCtor(); diff --git a/src/Minecraft.World/net/minecraft/world/level/block/VineBlock.h b/src/Minecraft.World/net/minecraft/world/level/block/VineBlock.h index 4274adad..18681488 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/VineBlock.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/VineBlock.h @@ -1,8 +1,14 @@ -#pragma once - -#include "net/minecraft/world/level/block/Block.h" - -class VineBlock : public Block { -public: - VineBlock(); -}; +#pragma once + +#include "net/minecraft/world/level/block/Block.h" + +class BooleanProperty; + +class VineBlock : public Block { +public: + static BooleanProperty* EAST; + static BooleanProperty* WEST; + static BooleanProperty* SOUTH; + static BooleanProperty* NORTH; + VineBlock(); +}; diff --git a/src/Minecraft.World/net/minecraft/world/level/block/WallBlock.h b/src/Minecraft.World/net/minecraft/world/level/block/WallBlock.h index bcf900df..786d71a2 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/WallBlock.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/WallBlock.h @@ -1,9 +1,23 @@ #pragma once +#include "net/minecraft/core/StringRepresentable.h" #include "net/minecraft/world/level/block/Block.h" class WallBlock : public Block { public: + class Variant : public StringRepresentable { + public: + static inline Variant* VARIANTS[2]; + // name guessed + static Variant* byData(int data) { return VARIANTS[static_cast(data) > 1 ? 0 : data]; } + // name guessed + int getNameId() { return m_nameId; } + + int m_data; + std::wstring m_name; + int m_nameId; + }; + WallBlock(Block*); static void blockStaticCtor(); diff --git a/src/Minecraft.World/net/minecraft/world/level/block/boxed/Boxed.h b/src/Minecraft.World/net/minecraft/world/level/block/boxed/Boxed.h index de4a67a6..37abcd91 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/boxed/Boxed.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/boxed/Boxed.h @@ -1,5 +1,7 @@ #pragma once +#include + #include template diff --git a/src/Minecraft.World/net/minecraft/world/level/block/entity/BannerPattern.cpp b/src/Minecraft.World/net/minecraft/world/level/block/entity/BannerPattern.cpp new file mode 100644 index 00000000..7f0ad052 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/level/block/entity/BannerPattern.cpp @@ -0,0 +1,387 @@ +#include "net/minecraft/world/level/block/entity/BannerPattern.h" + +#include "net/minecraft/world/item/ItemInstance.h" +#include "net/minecraft/world/item/Items.h" +#include "net/minecraft/world/level/block/Blocks.h" +#include "net/minecraft/world/level/block/FlowerBlock.h" + +std::vector BannerPattern::VALUES; // name guessed +BannerPattern* BannerPattern::BASE; +BannerPattern* BannerPattern::BORDER; +BannerPattern* BannerPattern::BRICKS; // name guessed +BannerPattern* BannerPattern::CIRCLE; +BannerPattern* BannerPattern::CREEPER; +BannerPattern* BannerPattern::CROSS; // name guessed +BannerPattern* BannerPattern::CURLY_BORDER; +BannerPattern* BannerPattern::DIAGONAL_LEFT; +BannerPattern* BannerPattern::DIAGONAL_RIGHT_MIRROR; // name guessed +BannerPattern* BannerPattern::DIAGONAL_LEFT_MIRROR; +BannerPattern* BannerPattern::DIAGONAL_RIGHT; +BannerPattern* BannerPattern::FLOWER; // name guessed +BannerPattern* BannerPattern::GRADIENT; +BannerPattern* BannerPattern::GRADIENT_UP; +BannerPattern* BannerPattern::HALF_HORIZONTAL; // name guessed +BannerPattern* BannerPattern::HALF_HORIZONTAL_MIRROR; +BannerPattern* BannerPattern::HALF_VERTICAL; +BannerPattern* BannerPattern::HALF_VERTICAL_MIRROR; // name guessed +BannerPattern* BannerPattern::MOJANG; +BannerPattern* BannerPattern::RHOMBUS; +BannerPattern* BannerPattern::SKULL; // name guessed +BannerPattern* BannerPattern::SMALL_STRIPES; +BannerPattern* BannerPattern::SQUARE_BOTTOM_LEFT; +BannerPattern* BannerPattern::SQUARE_BOTTOM_RIGHT; // name guessed +BannerPattern* BannerPattern::SQUARE_TOP_LEFT; +BannerPattern* BannerPattern::SQUARE_TOP_RIGHT; +BannerPattern* BannerPattern::STRAIGHT_CROSS; // name guessed +BannerPattern* BannerPattern::STRIPE_BOTTOM; +BannerPattern* BannerPattern::STRIPE_CENTER; +BannerPattern* BannerPattern::STRIPE_DOWNLEFT; // name guessed +BannerPattern* BannerPattern::STRIPE_DOWNRIGHT; +BannerPattern* BannerPattern::STRIPE_LEFT; +BannerPattern* BannerPattern::STRIPE_MIDDLE; // name guessed +BannerPattern* BannerPattern::STRIPE_RIGHT; +BannerPattern* BannerPattern::STRIPE_TOP; +BannerPattern* BannerPattern::TRIANGLE_BOTTOM; // name guessed +BannerPattern* BannerPattern::TRIANGLE_TOP; +BannerPattern* BannerPattern::TRIANGLES_BOTTOM; +BannerPattern* BannerPattern::TRIANGLES_TOP; // name guessed + +static const unsigned char bannerKeys[39][64] = { + { + 0xd2, 0xf6, 0xbe, 0xa2, 0x85, 0x4c, 0xfd, 0x5d, 0xf0, 0x36, 0x89, 0x2d, 0x75, 0x64, 0x9f, 0x22, + 0xc9, 0xbb, 0x85, 0x2a, 0xa8, 0x43, 0xe4, 0x68, 0x91, 0x89, 0x0b, 0x79, 0x90, 0xe5, 0xb8, 0x14, + 0x3a, 0x2c, 0x09, 0xfb, 0x48, 0x26, 0xf0, 0xed, 0xe3, 0xf8, 0xb3, 0x41, 0x4b, 0x6b, 0xc0, 0x0e, + 0x6b, 0x43, 0xfa, 0x1c, 0x46, 0x13, 0x35, 0x4f, 0x2e, 0x16, 0xf1, 0x3b, 0x7a, 0x36, 0xed, 0x44, + }, + { + 0x71, 0x3f, 0x45, 0x81, 0x16, 0x72, 0xbd, 0x6b, 0xa3, 0x95, 0x56, 0x67, 0xbe, 0x7a, 0xc3, 0xf9, + 0x7a, 0x35, 0xab, 0x09, 0x83, 0x61, 0x95, 0x9c, 0x42, 0xf4, 0xdc, 0xb8, 0x2b, 0xb4, 0xd1, 0x5a, + 0x11, 0x34, 0xae, 0xbe, 0x73, 0x9c, 0x71, 0x2d, 0x30, 0xc9, 0x9b, 0xff, 0xb8, 0x77, 0x48, 0x66, + 0x00, 0x91, 0xce, 0xce, 0x95, 0x28, 0x12, 0x10, 0x6d, 0x5d, 0x43, 0x75, 0x79, 0xfd, 0xd3, 0x0f, + }, + { + 0xa7, 0x3f, 0xeb, 0x6d, 0xb0, 0x1a, 0xc6, 0xcf, 0x15, 0x26, 0xcf, 0x3b, 0xe8, 0xd7, 0x88, 0xec, + 0x7c, 0x92, 0xce, 0xca, 0x25, 0x5f, 0x5b, 0x01, 0x44, 0xaf, 0x35, 0x7f, 0xad, 0x30, 0xe5, 0x71, + 0xd7, 0x71, 0x9b, 0x4b, 0x95, 0xe9, 0x50, 0x38, 0x76, 0x3a, 0xda, 0x70, 0x9e, 0x87, 0xff, 0x0b, + 0x96, 0xac, 0x67, 0x1b, 0x23, 0xb3, 0x7c, 0x36, 0xdb, 0x94, 0xce, 0x95, 0x6f, 0xd3, 0xef, 0x41, + }, + { + 0x8f, 0xde, 0x31, 0x23, 0xb8, 0xe2, 0x1f, 0x73, 0x7d, 0x2f, 0x5f, 0x95, 0xb0, 0xde, 0xf9, 0x2e, + 0x64, 0xbf, 0xb3, 0x09, 0x1d, 0x0c, 0xfa, 0xe5, 0xdc, 0x76, 0x7b, 0xd4, 0x65, 0x84, 0x45, 0x6a, + 0x1f, 0xcb, 0x80, 0x92, 0x7d, 0x1c, 0xab, 0x40, 0x8e, 0xa0, 0xfd, 0x5f, 0x16, 0x4d, 0x7f, 0xcd, + 0x9e, 0xab, 0x8f, 0x80, 0x5b, 0xc8, 0x00, 0xa3, 0x03, 0x2d, 0x37, 0xd1, 0xd7, 0x2f, 0x69, 0xdf, + }, + { + 0xbb, 0x98, 0xa8, 0x3a, 0xec, 0xe8, 0xa8, 0x8e, 0x49, 0x3f, 0x49, 0x2c, 0xa4, 0xa0, 0xf5, 0xcc, + 0xf0, 0x85, 0x88, 0x40, 0xa9, 0x14, 0xb2, 0x67, 0xc8, 0x61, 0x63, 0x03, 0xf1, 0x1e, 0xa5, 0x24, + 0xcb, 0xaa, 0xe3, 0x41, 0x69, 0x49, 0xf6, 0x89, 0x1a, 0xc7, 0x67, 0x87, 0x82, 0x3c, 0xdd, 0x5b, + 0x0a, 0xed, 0x00, 0x57, 0xef, 0xd7, 0xbf, 0x21, 0x17, 0x51, 0xc4, 0xf9, 0xc3, 0xc0, 0xf2, 0xed, + }, + { + 0x6b, 0x24, 0x12, 0x69, 0xbc, 0x79, 0x12, 0xa5, 0xd9, 0x98, 0xa2, 0x24, 0xd4, 0x93, 0xbc, 0xd5, + 0xa0, 0x47, 0xc6, 0x5d, 0x19, 0x1e, 0x48, 0x1c, 0x18, 0x64, 0x24, 0x23, 0xa1, 0xa5, 0x82, 0x50, + 0xdb, 0xa1, 0x9f, 0xd5, 0x79, 0xfa, 0x64, 0xdf, 0x0a, 0xbf, 0x52, 0x79, 0x52, 0x0c, 0x05, 0x21, + 0xfa, 0x46, 0x5d, 0x09, 0x7f, 0x8b, 0x84, 0xc3, 0x67, 0x93, 0x7e, 0x2d, 0x33, 0x70, 0x91, 0xe3, + }, + { + 0xaf, 0x04, 0xbd, 0x63, 0xd8, 0xd5, 0x3f, 0x8b, 0x1d, 0xaa, 0xee, 0x4f, 0xd0, 0x82, 0x49, 0xa6, + 0x04, 0xef, 0xa0, 0xbd, 0xbd, 0xc4, 0xe0, 0xcc, 0x7c, 0xf7, 0x20, 0xe5, 0x85, 0xc5, 0x4b, 0x67, + 0x3f, 0xdd, 0x12, 0xba, 0x1d, 0xa4, 0x58, 0xfb, 0xae, 0x6e, 0x4f, 0xb5, 0xb6, 0xb1, 0x83, 0x9f, + 0x3e, 0xf9, 0x4f, 0x6f, 0x7b, 0x6a, 0xf8, 0x92, 0x23, 0x44, 0x73, 0x13, 0x77, 0x61, 0x88, 0x8f, + }, + { + 0xf6, 0xea, 0xf9, 0x87, 0xe9, 0xf2, 0xa7, 0xd6, 0xe4, 0x3e, 0xb3, 0xed, 0xd9, 0x07, 0x32, 0x0d, + 0x65, 0x7d, 0x34, 0x37, 0x6c, 0x7b, 0xc8, 0xce, 0xfd, 0xab, 0x14, 0xca, 0xa4, 0x3a, 0x46, 0xc1, + 0x4e, 0xfd, 0x18, 0x37, 0x8c, 0x1b, 0x51, 0x9f, 0x1f, 0x2c, 0x3f, 0xd5, 0x17, 0x4a, 0xb5, 0x3b, + 0x97, 0x54, 0x3f, 0x4f, 0x62, 0x61, 0xef, 0x77, 0x1a, 0x6b, 0xb4, 0x01, 0x6e, 0x69, 0xde, 0x75, + }, + { + 0x55, 0xa5, 0xcf, 0x5f, 0x52, 0xd0, 0xe8, 0xab, 0x87, 0x39, 0x1a, 0x96, 0x5a, 0x93, 0x1d, 0x10, + 0x7e, 0x7b, 0xb4, 0x7d, 0x47, 0xa2, 0x9d, 0x40, 0x46, 0x4c, 0x4f, 0xed, 0xaf, 0x16, 0x24, 0x7b, + 0x95, 0x32, 0xb3, 0xed, 0xb7, 0x9a, 0x58, 0x0f, 0x74, 0xbd, 0x79, 0x7a, 0xbc, 0xf6, 0xd5, 0xeb, + 0xe4, 0xba, 0x6c, 0x8e, 0xb1, 0xa9, 0x38, 0x5f, 0xc9, 0xdb, 0x29, 0xe0, 0xdd, 0xf9, 0xf7, 0x3d, + }, + { + 0xc4, 0x3a, 0x56, 0x30, 0x2b, 0xda, 0x42, 0x6e, 0x76, 0x9d, 0xf1, 0x53, 0x6b, 0xa6, 0xa2, 0x0f, + 0xc7, 0xbf, 0x29, 0x27, 0xee, 0x2a, 0x74, 0x67, 0xdf, 0x9c, 0xfb, 0xce, 0x86, 0x9b, 0x54, 0x0b, + 0xec, 0x74, 0xc9, 0x48, 0x0e, 0x71, 0x03, 0xa6, 0xbd, 0x46, 0xa3, 0x6b, 0x95, 0x05, 0xfb, 0x74, + 0x85, 0x48, 0x42, 0xce, 0xd0, 0x3a, 0x70, 0x63, 0x68, 0x3a, 0x8f, 0xd2, 0xbc, 0x2b, 0xd2, 0x19, + }, + { + 0x97, 0x63, 0xfb, 0xed, 0x00, 0x3d, 0x1f, 0xdd, 0x65, 0x4a, 0x54, 0x3a, 0x58, 0x77, 0xb7, 0x3c, + 0xec, 0xdc, 0xc1, 0x73, 0xd5, 0x70, 0xd1, 0xca, 0x54, 0x9d, 0xe0, 0x88, 0xdd, 0x81, 0x85, 0x89, + 0x67, 0x14, 0x93, 0x53, 0xa5, 0xb5, 0x60, 0xb9, 0x66, 0xc9, 0xda, 0x92, 0x2e, 0xe8, 0x26, 0xfc, + 0x06, 0xa6, 0x1d, 0x13, 0x33, 0x75, 0xa7, 0xf4, 0xeb, 0x38, 0xc3, 0x58, 0x9f, 0xb9, 0x17, 0x1d, + }, + { + 0xe8, 0xa7, 0x16, 0x2f, 0xb7, 0xde, 0x57, 0xe9, 0x5a, 0xc2, 0x4e, 0xc9, 0x17, 0x64, 0x79, 0x2c, + 0x0b, 0xd3, 0xf5, 0x12, 0x82, 0x23, 0x79, 0x26, 0xd3, 0xd5, 0xf1, 0x21, 0xda, 0xf4, 0xb2, 0x9c, + 0xd0, 0x5a, 0x08, 0xf2, 0x12, 0xc1, 0xd7, 0x6c, 0x91, 0xd2, 0x13, 0xd2, 0x89, 0xff, 0x2a, 0xc4, + 0x49, 0x39, 0x41, 0xe7, 0x6c, 0x5b, 0x4d, 0x01, 0xb4, 0xad, 0xb7, 0xbf, 0x80, 0x56, 0xd3, 0xda, + }, + { + 0xdb, 0x2e, 0x31, 0x13, 0x0c, 0x30, 0x56, 0x77, 0xe9, 0xfa, 0x28, 0x4b, 0xc4, 0x55, 0xbc, 0xfa, + 0x10, 0xe0, 0x3c, 0xcf, 0xc9, 0xe4, 0x9e, 0x5e, 0xe8, 0xb6, 0x6b, 0x3b, 0x11, 0x74, 0xad, 0x5c, + 0x6b, 0xac, 0x29, 0xf6, 0x89, 0x19, 0xe3, 0x80, 0xba, 0xc5, 0x48, 0xd8, 0x22, 0xcd, 0x2a, 0x3f, + 0xaa, 0xc1, 0xa0, 0x52, 0x8f, 0x79, 0xdc, 0x69, 0x37, 0x5c, 0xe7, 0x80, 0xe3, 0xc9, 0xcf, 0xea, + }, + { + 0x81, 0x2f, 0x56, 0xbe, 0x86, 0x06, 0xf2, 0xb8, 0x93, 0xa4, 0x72, 0xcc, 0x4e, 0x26, 0x34, 0xc2, + 0x8a, 0xde, 0x94, 0xe1, 0x93, 0xc2, 0x24, 0xa5, 0xb2, 0x74, 0x44, 0xea, 0xbb, 0x17, 0xaf, 0x6d, + 0x81, 0xfa, 0xab, 0xa7, 0xa3, 0x3f, 0x63, 0xa9, 0x80, 0x0d, 0x9b, 0xaa, 0xa8, 0xf6, 0x4f, 0x69, + 0x50, 0xf7, 0xa7, 0x2d, 0x45, 0x09, 0x1a, 0x91, 0xdd, 0xf4, 0x4d, 0x6a, 0x09, 0x6d, 0x04, 0x09, + }, + { + 0xdf, 0xb7, 0x85, 0x5c, 0xe8, 0x88, 0x20, 0xec, 0x6d, 0x4c, 0x94, 0xb5, 0x00, 0xab, 0xd6, 0xf4, + 0xb4, 0x33, 0x6a, 0x10, 0xad, 0x67, 0x16, 0x65, 0x0c, 0x07, 0xa2, 0x3f, 0x35, 0xc8, 0x90, 0x9f, + 0x8f, 0x13, 0x60, 0x40, 0x6d, 0x01, 0x28, 0x4b, 0x1e, 0xf3, 0x5a, 0x9d, 0xc6, 0x36, 0x41, 0x3d, + 0xae, 0xd7, 0x4f, 0x97, 0x4b, 0x12, 0x39, 0xb4, 0xb3, 0x10, 0x3d, 0xd9, 0xe7, 0x95, 0x0e, 0x73, + }, + { + 0x3f, 0x3c, 0xdb, 0xd3, 0x48, 0x0f, 0xee, 0xa6, 0xcd, 0x5e, 0xb5, 0xf4, 0x60, 0x97, 0x8a, 0x45, + 0x14, 0xa7, 0x30, 0x25, 0x8d, 0x7c, 0xeb, 0x26, 0xec, 0x96, 0x5b, 0xc0, 0x15, 0x62, 0x81, 0xa2, + 0x6f, 0xf0, 0xd3, 0x5b, 0x4d, 0x16, 0xfd, 0x0c, 0xfe, 0xc1, 0xf4, 0xef, 0x26, 0x9c, 0xf4, 0x3e, + 0x8e, 0xbb, 0x1b, 0x93, 0x2b, 0x9b, 0x1a, 0xf1, 0x93, 0x22, 0x5e, 0x37, 0x47, 0x3e, 0x95, 0xc3, + }, + { + 0xab, 0x5a, 0xde, 0x78, 0x7c, 0x7c, 0x33, 0xd5, 0x19, 0xa4, 0x58, 0x9b, 0x14, 0x97, 0x4e, 0x53, + 0x60, 0x0a, 0x82, 0x8a, 0xd9, 0x48, 0xfe, 0xa4, 0xd8, 0x36, 0x9f, 0xd5, 0x61, 0x78, 0xfd, 0x02, + 0x9b, 0x64, 0x5b, 0x02, 0x39, 0x3d, 0x62, 0x3e, 0xca, 0x40, 0xfb, 0xae, 0x12, 0x4f, 0x02, 0x80, + 0x3a, 0xfa, 0x57, 0x5f, 0xbf, 0xc1, 0x50, 0xd3, 0xa7, 0x7e, 0x63, 0xcb, 0x73, 0x74, 0xbf, 0x65, + }, + { + 0xfc, 0xad, 0x02, 0x5e, 0x83, 0x51, 0xa7, 0xa0, 0x0e, 0xed, 0x3a, 0xf2, 0x63, 0x63, 0xd4, 0xc7, + 0x7f, 0xa3, 0x55, 0x03, 0xb6, 0x0e, 0xe7, 0x19, 0x67, 0xa6, 0x32, 0xd4, 0x0e, 0x2e, 0x7f, 0x57, + 0xa4, 0xe4, 0xa4, 0x12, 0x66, 0x87, 0x5d, 0xac, 0x45, 0x17, 0x47, 0xa9, 0x1d, 0xeb, 0xab, 0x9e, + 0x5d, 0x04, 0xc0, 0x90, 0x18, 0xc9, 0xef, 0x70, 0xa0, 0x3c, 0xe6, 0xda, 0x54, 0x46, 0xaf, 0x8f, + }, + { + 0x9d, 0x2d, 0x60, 0xb1, 0x7a, 0xdf, 0x0b, 0xfa, 0xcf, 0x88, 0x13, 0x5b, 0xc2, 0x94, 0x1e, 0xd7, + 0x46, 0x60, 0xb9, 0xe4, 0x5f, 0x60, 0xfd, 0x0c, 0x7e, 0xb8, 0xd7, 0x52, 0x47, 0xf3, 0x10, 0x97, + 0xbd, 0x65, 0xfc, 0xe3, 0x3f, 0x6e, 0x9b, 0xbf, 0xac, 0xa1, 0xee, 0xbc, 0x54, 0x28, 0x01, 0x54, + 0x4c, 0x5d, 0x1e, 0xea, 0x09, 0x67, 0x6b, 0xb6, 0x91, 0x86, 0x56, 0x76, 0xe5, 0xba, 0x4a, 0x80, + }, + { + 0xb1, 0xf8, 0x5b, 0x63, 0xd6, 0x28, 0x1d, 0x99, 0xe3, 0x7f, 0xfd, 0x50, 0xfe, 0xc4, 0x0e, 0x97, + 0x3a, 0x94, 0xcf, 0x60, 0x43, 0xa9, 0x52, 0x1f, 0x02, 0xc2, 0xe0, 0x0c, 0xeb, 0x8b, 0x0c, 0x31, + 0xd1, 0x92, 0xd2, 0x15, 0x33, 0x6a, 0x75, 0x81, 0xf0, 0x89, 0x32, 0xaf, 0x78, 0x56, 0x8b, 0xe6, + 0x40, 0xba, 0x67, 0x5d, 0xd5, 0x02, 0x88, 0x53, 0xad, 0x85, 0x75, 0x96, 0xb9, 0x0e, 0x26, 0xc8, + }, + { + 0x50, 0xe5, 0x5b, 0x48, 0xff, 0xfd, 0x2a, 0x28, 0xa2, 0x6d, 0xe8, 0x50, 0x3f, 0xbe, 0x02, 0x6f, + 0xf3, 0x30, 0x1e, 0xd1, 0x1a, 0xc6, 0x8e, 0x38, 0xeb, 0x6e, 0x7d, 0x4e, 0x72, 0xc3, 0x90, 0x55, + 0xf8, 0x9f, 0x40, 0x4e, 0x5a, 0x8d, 0x9d, 0xd7, 0x29, 0x63, 0x1f, 0xbd, 0xa1, 0xb8, 0xf4, 0x7e, + 0x11, 0xba, 0x7a, 0xe7, 0xc4, 0x5a, 0xa7, 0x6e, 0x9c, 0x2d, 0xb7, 0xba, 0xc8, 0x58, 0x5e, 0x71, + }, + { + 0x97, 0x05, 0x79, 0xc5, 0x00, 0xaf, 0xda, 0x62, 0x65, 0x0c, 0x8a, 0x4c, 0x58, 0x59, 0x07, 0x05, + 0xec, 0x4e, 0x7d, 0xf9, 0xd5, 0xc2, 0xd9, 0x1b, 0x54, 0xef, 0xe8, 0xd9, 0xdd, 0xd3, 0x8d, 0xda, + 0x67, 0x86, 0x4e, 0xd9, 0xa5, 0x07, 0x69, 0x0a, 0x66, 0x3b, 0x96, 0x18, 0x2e, 0x3a, 0x2f, 0x4d, + 0x06, 0x48, 0x9b, 0xea, 0x33, 0x17, 0x25, 0xcc, 0xeb, 0xba, 0xca, 0x9e, 0x9f, 0x5b, 0x95, 0xf4, + }, + { + 0x70, 0xcb, 0xaf, 0xed, 0x1f, 0xbc, 0x4e, 0x48, 0x42, 0x10, 0xe2, 0xcb, 0xdf, 0x8e, 0x71, 0xc4, + 0x93, 0x16, 0x77, 0x9f, 0x3a, 0x66, 0x62, 0xa7, 0x0b, 0x58, 0xd1, 0xbf, 0x92, 0x20, 0xc1, 0xdb, + 0x18, 0x12, 0x94, 0x01, 0xfa, 0x30, 0x75, 0x1b, 0xc9, 0x1b, 0x1a, 0x2e, 0xc1, 0xac, 0xaa, 0x02, + 0x31, 0x6f, 0x95, 0x60, 0xe4, 0x78, 0x3c, 0xea, 0xbc, 0xf1, 0x0a, 0x38, 0x68, 0x42, 0xb6, 0xeb, + }, + { + 0x43, 0x55, 0x71, 0x1d, 0x74, 0x7e, 0x1e, 0xf0, 0xb1, 0xdd, 0x39, 0xc9, 0x4c, 0xda, 0xfe, 0x42, + 0x78, 0x1e, 0xeb, 0xf9, 0xe1, 0xd3, 0xe3, 0x74, 0x40, 0x79, 0xd2, 0x39, 0x29, 0xfa, 0xd8, 0xc2, + 0xd3, 0xdb, 0x33, 0x91, 0xd1, 0x68, 0xb9, 0x97, 0x32, 0xf1, 0xd5, 0x69, 0x1a, 0xb7, 0xfa, 0xf3, + 0xb2, 0x17, 0xdb, 0x0d, 0x07, 0x3e, 0x16, 0x26, 0xff, 0xf8, 0x04, 0x82, 0x0b, 0x5b, 0x9e, 0x99, + }, + { + 0xec, 0xa3, 0x06, 0xff, 0x93, 0x51, 0x73, 0x62, 0xde, 0x1a, 0x03, 0xb6, 0x53, 0x6b, 0x82, 0x5b, + 0x2f, 0x8f, 0x65, 0x46, 0x66, 0x68, 0x00, 0x17, 0x77, 0x18, 0x1c, 0x50, 0x7e, 0x3b, 0x8a, 0x09, + 0xf4, 0xcb, 0x6f, 0x0b, 0x76, 0x21, 0x57, 0x32, 0x75, 0x20, 0x4d, 0xe8, 0xad, 0x5b, 0x35, 0xec, + 0x4d, 0x91, 0x52, 0x86, 0x28, 0x8e, 0x47, 0x7c, 0x30, 0x3c, 0x0d, 0xba, 0x84, 0xcd, 0xee, 0xbf, + }, + { + 0xcf, 0x79, 0x05, 0xc4, 0x78, 0xdb, 0x29, 0xf7, 0xbd, 0x20, 0xde, 0x67, 0xf0, 0xf2, 0xea, 0xfd, + 0x24, 0xb8, 0xbd, 0x8d, 0xdd, 0xcc, 0x55, 0x20, 0x9c, 0xdf, 0x9b, 0x38, 0x25, 0x56, 0xe0, 0xd0, + 0xdf, 0x98, 0xf4, 0x32, 0x3d, 0x8c, 0xd3, 0x4e, 0x4e, 0xf7, 0x2f, 0x88, 0xd6, 0x0d, 0xdb, 0x07, + 0xde, 0x05, 0x50, 0x2a, 0x9b, 0x73, 0xf4, 0x78, 0x43, 0xa7, 0x00, 0x76, 0x17, 0xe2, 0x64, 0x5f, + }, + { + 0x0a, 0xde, 0x94, 0x4d, 0x05, 0xa2, 0xa5, 0x41, 0x58, 0x91, 0xa0, 0xac, 0xb5, 0xb1, 0x26, 0x8d, + 0x59, 0x7f, 0x04, 0x36, 0x30, 0x23, 0xba, 0x2e, 0xc1, 0x1c, 0xe4, 0xbe, 0x28, 0x1d, 0x45, 0x14, + 0x02, 0x6d, 0xe0, 0xab, 0x20, 0xab, 0x7a, 0x3c, 0x23, 0xc5, 0xa2, 0x16, 0xdb, 0xe9, 0x9c, 0x32, + 0x8b, 0x2e, 0x92, 0xdb, 0x0e, 0xa5, 0x38, 0x1b, 0xb6, 0x2d, 0x54, 0x3a, 0xe2, 0xfc, 0x94, 0x54, + }, + { + 0x84, 0xd1, 0x0e, 0xa8, 0x6b, 0x79, 0x9a, 0x32, 0x36, 0xa4, 0xb1, 0x5e, 0x2b, 0x85, 0xd0, 0x18, + 0x07, 0xfa, 0x99, 0x7b, 0x2e, 0xb3, 0x01, 0xb9, 0x1f, 0x25, 0x89, 0x20, 0xc6, 0x23, 0xe2, 0x5c, + 0x2c, 0xa8, 0x31, 0xf3, 0x4e, 0x9a, 0x4d, 0x77, 0xfd, 0xe6, 0x15, 0x0c, 0xd5, 0x1d, 0x06, 0x1a, + 0x45, 0xef, 0x1a, 0x7b, 0x90, 0x57, 0x6f, 0xac, 0x28, 0x72, 0x16, 0xd6, 0x7c, 0x69, 0x30, 0xc4, + }, + { + 0xe8, 0x00, 0xff, 0x78, 0xb7, 0x5f, 0x0e, 0xa6, 0x5a, 0xab, 0xa3, 0x2b, 0x17, 0xdd, 0x73, 0xa5, + 0x0b, 0x54, 0xac, 0xcf, 0x82, 0x94, 0x59, 0xcd, 0xd3, 0x46, 0xd2, 0xc8, 0xda, 0x65, 0x93, 0x43, + 0xd0, 0xdb, 0xbe, 0xae, 0x12, 0x32, 0xb8, 0x13, 0x91, 0x53, 0xca, 0x8e, 0x89, 0x70, 0x0b, 0x6b, + 0x49, 0x92, 0x29, 0x31, 0x6c, 0xb4, 0x35, 0x4b, 0xb4, 0x76, 0xdc, 0x8d, 0x80, 0xaf, 0xbb, 0x24, + }, + { + 0xc2, 0x06, 0x88, 0xed, 0xfd, 0x0b, 0x40, 0xe4, 0x50, 0x4f, 0xab, 0x73, 0x6d, 0x98, 0xce, 0xcc, + 0xd1, 0x52, 0xfe, 0x97, 0x18, 0xd4, 0x1a, 0x0f, 0x89, 0x68, 0xae, 0x23, 0x10, 0x10, 0xbd, 0xfa, + 0x5a, 0x58, 0xef, 0xe7, 0x98, 0xfa, 0xa8, 0xff, 0x8b, 0xcd, 0x45, 0xde, 0x23, 0xda, 0x8b, 0xc8, + 0xa3, 0x0b, 0xd9, 0x17, 0x96, 0x92, 0xf4, 0xd3, 0x4e, 0x3c, 0x74, 0xf7, 0x7a, 0xb5, 0x0c, 0xa4, + }, + { + 0xe1, 0x7b, 0xee, 0xbf, 0x66, 0x4e, 0xcc, 0xce, 0x73, 0x2b, 0x9c, 0x16, 0xae, 0x2c, 0xde, 0x81, + 0x6a, 0x39, 0x76, 0x9d, 0xf3, 0x94, 0x3a, 0xa2, 0x12, 0x8a, 0xfd, 0xcf, 0x1b, 0x65, 0xa9, 0x29, + 0xe1, 0x94, 0x2c, 0x77, 0x03, 0x66, 0x5b, 0xbb, 0x60, 0xda, 0x90, 0x01, 0x88, 0x94, 0x28, 0x65, + 0x30, 0x47, 0x44, 0x04, 0x25, 0xfd, 0x43, 0xb8, 0x3d, 0xf3, 0x0d, 0x0e, 0x69, 0x65, 0xba, 0xf5, + }, + { + 0x48, 0x4a, 0x53, 0x87, 0x97, 0x69, 0x30, 0x22, 0x3a, 0xfd, 0xe7, 0xa0, 0x77, 0xad, 0xe6, 0x81, + 0xeb, 0xab, 0xe8, 0x3f, 0xe2, 0x95, 0x2d, 0x74, 0x33, 0x21, 0xa4, 0xc5, 0xba, 0x43, 0x69, 0x15, + 0x30, 0x37, 0xff, 0xf3, 0xf2, 0x83, 0x6a, 0xfa, 0x71, 0xc3, 0x70, 0x64, 0x69, 0x6e, 0xdb, 0x3c, + 0xa9, 0xe3, 0x0d, 0xda, 0x4c, 0x32, 0xc7, 0x5a, 0x14, 0xea, 0xc4, 0x24, 0x60, 0x4d, 0x24, 0xa5, + }, + { + 0x16, 0xee, 0xc9, 0x45, 0x89, 0x4b, 0xb9, 0xc7, 0x84, 0x07, 0x59, 0x64, 0xf9, 0xe1, 0xb7, 0xcc, + 0x85, 0x5f, 0xed, 0x2e, 0x0c, 0x39, 0x71, 0x37, 0x9d, 0xbd, 0x9f, 0x47, 0x44, 0x84, 0x12, 0x15, + 0xee, 0xb0, 0x37, 0x76, 0x2c, 0x96, 0x56, 0x1f, 0x3f, 0xac, 0xbd, 0xfc, 0xb7, 0xe0, 0x5b, 0xfa, + 0x37, 0xb0, 0x7d, 0xe7, 0x82, 0x4b, 0xf0, 0x6e, 0x3a, 0x7c, 0x4c, 0xf8, 0x8e, 0xb6, 0xb6, 0x26, + }, + { + 0x8b, 0xb4, 0x86, 0xbd, 0x5c, 0x92, 0xf1, 0x71, 0xf9, 0xa5, 0xe7, 0xf0, 0xf4, 0x3f, 0xeb, 0x57, + 0xc0, 0x04, 0xd2, 0xec, 0xb9, 0x19, 0x76, 0x92, 0xb8, 0x2e, 0x19, 0x6d, 0xc1, 0xc0, 0x55, 0xda, + 0x7b, 0x5b, 0xa7, 0x8f, 0x19, 0xc5, 0x59, 0x29, 0xaa, 0x6a, 0x48, 0xe2, 0xf2, 0x62, 0x1d, 0x56, + 0x9a, 0xdd, 0xa7, 0xaa, 0x9f, 0xa8, 0xa4, 0xf3, 0x07, 0x75, 0x81, 0xa3, 0xd3, 0xe3, 0x32, 0x9c, + }, + { + 0x78, 0x7a, 0x48, 0x97, 0x27, 0x14, 0xd6, 0x69, 0x8a, 0x96, 0x35, 0x9f, 0x27, 0x57, 0x9b, 0xdf, + 0x5b, 0x03, 0xc2, 0xd9, 0x52, 0x2d, 0x7a, 0x47, 0xc3, 0x48, 0x3a, 0x30, 0x6a, 0xd3, 0xe1, 0x1e, + 0x80, 0x8f, 0x19, 0x03, 0x82, 0x1a, 0x76, 0x58, 0x61, 0x7d, 0xf7, 0x8a, 0x79, 0xeb, 0xb3, 0xea, + 0xd9, 0x95, 0x43, 0x5c, 0xdc, 0x96, 0x6c, 0xd5, 0x24, 0xcb, 0xc4, 0x7d, 0xd0, 0x39, 0xea, 0xed, + }, + { + 0x03, 0x51, 0x69, 0x19, 0xb4, 0xa3, 0xb1, 0xc6, 0x71, 0x1b, 0xc1, 0x6f, 0x0c, 0xe6, 0x36, 0xf0, + 0xb8, 0x3f, 0xee, 0xdc, 0x21, 0x74, 0x50, 0x13, 0x80, 0x9f, 0x85, 0xa9, 0x69, 0x20, 0x8c, 0x32, + 0x13, 0xf1, 0xa6, 0x32, 0x11, 0xff, 0xee, 0xb3, 0x72, 0x8f, 0x07, 0x93, 0x5a, 0x4d, 0x30, 0x10, + 0x72, 0xf2, 0x73, 0xa8, 0xc7, 0x39, 0x0e, 0x22, 0xbf, 0xfd, 0xa6, 0xff, 0xcb, 0x35, 0x37, 0x34, + }, + { + 0x47, 0x7f, 0xfd, 0x0a, 0x50, 0xce, 0xf6, 0x74, 0x35, 0x88, 0xf2, 0x29, 0x08, 0x1b, 0xf9, 0xc0, + 0x1c, 0xf2, 0xe4, 0xd2, 0xc5, 0xb0, 0xb2, 0x79, 0xe4, 0x38, 0xce, 0xcd, 0xcd, 0xb6, 0x79, 0xeb, + 0x77, 0x2a, 0xf7, 0x27, 0xb5, 0x37, 0xa4, 0xdb, 0x96, 0x34, 0xb2, 0xd3, 0xbe, 0x18, 0xf6, 0x97, + 0x36, 0xb1, 0x66, 0x6a, 0x43, 0xa2, 0xb0, 0x93, 0xfb, 0x19, 0x06, 0x0e, 0x8f, 0x99, 0x7a, 0x0d, + }, + { + 0x68, 0x87, 0x49, 0xb9, 0x37, 0x8a, 0xb8, 0x95, 0xda, 0x19, 0xb0, 0xe5, 0x97, 0xb3, 0x78, 0x0d, + 0x8b, 0x7e, 0x56, 0xbf, 0x02, 0x17, 0x9e, 0x5e, 0x53, 0xc9, 0x16, 0x5a, 0x5a, 0xe8, 0xd7, 0xd4, + 0x50, 0x06, 0x69, 0x9e, 0x92, 0xb4, 0xfc, 0xa4, 0x11, 0x7e, 0x74, 0x7e, 0x09, 0xf3, 0x4f, 0xfc, + 0xc9, 0x18, 0x74, 0x71, 0xec, 0x3a, 0x80, 0x8b, 0x34, 0x95, 0x33, 0x5a, 0x00, 0x36, 0x06, 0x65, + }, + { + 0xc4, 0x50, 0xcb, 0x17, 0x2b, 0xe0, 0xc4, 0x55, 0x76, 0x13, 0x22, 0x4b, 0x6b, 0x7c, 0xe4, 0xae, + 0xc7, 0xc5, 0xab, 0x0e, 0xee, 0xd0, 0x41, 0xbe, 0xdf, 0x42, 0xc9, 0x25, 0x86, 0x41, 0x22, 0x62, + 0xec, 0x7a, 0x4b, 0x30, 0x0e, 0x17, 0xd1, 0xfc, 0xbd, 0x4c, 0x25, 0x53, 0x95, 0xab, 0xc8, 0xcb, + 0x85, 0x5e, 0xb7, 0xb5, 0xd0, 0x50, 0xe5, 0x4a, 0x68, 0xf0, 0x3e, 0xc9, 0xbc, 0x41, 0x47, 0x01, + }, +}; + +void BannerPattern::staticCtor() { + BASE = new BannerPattern(0, L"b", bannerKeys[0], 48); + BORDER = new BannerPattern(1, L"bo", L"###", L"#*#", L"###", bannerKeys[1], 52); + BRICKS = new BannerPattern(2, L"bri", new ItemInstance(Blocks::BRICK_BLOCK), bannerKeys[2], 52); + CIRCLE = new BannerPattern(3, L"mc", L" ", L" # ", L" * ", bannerKeys[3], 51); + CREEPER = new BannerPattern(4, L"cre", new ItemInstance(Items::SKULL, 1, 4), bannerKeys[4], 53); + CROSS = new BannerPattern(5, L"cr", L"# #", L" # ", L"#*#", bannerKeys[5], 49); + CURLY_BORDER = new BannerPattern(6, L"cbo", new ItemInstance(Blocks::VINE), bannerKeys[6], 52); + DIAGONAL_LEFT = new BannerPattern(7, L"ld", L"## ", L"#* ", L" ", bannerKeys[7], 50); + DIAGONAL_RIGHT_MIRROR = new BannerPattern(8, L"rud", L" ##", L" *#", L" ", bannerKeys[8], 50); + DIAGONAL_LEFT_MIRROR = new BannerPattern(9, L"lud", L" ", L"#* ", L"## ", bannerKeys[9], 50); + DIAGONAL_RIGHT = new BannerPattern(10, L"rd", L" ", L" *#", L" ##", bannerKeys[10], 50); + FLOWER = new BannerPattern( + 11, L"flo", new ItemInstance(Blocks::RED_FLOWER, 1, FlowerBlock::Flower::OXEYE_DAISY->getData()), + bannerKeys[11], 53); + GRADIENT = new BannerPattern(12, L"gra", L"#*#", L" # ", L" # ", bannerKeys[12], 52); + GRADIENT_UP = new BannerPattern(13, L"gru", L" # ", L" # ", L"#*#", bannerKeys[13], 52); + HALF_HORIZONTAL = new BannerPattern(14, L"hh", L"###", L"###", L" * ", bannerKeys[14], 50); + HALF_HORIZONTAL_MIRROR = new BannerPattern(15, L"hhb", L" * ", L"###", L"###", bannerKeys[15], 50); + HALF_VERTICAL = new BannerPattern(16, L"vh", L"## ", L"##*", L"## ", bannerKeys[16], 50); + HALF_VERTICAL_MIRROR = new BannerPattern(17, L"vhr", L" ##", L"*##", L" ##", bannerKeys[17], 50); + MOJANG = new BannerPattern(18, L"moj", new ItemInstance(Items::GOLDEN_APPLE, 1, 1), bannerKeys[18], 53); + RHOMBUS = new BannerPattern(19, L"mr", L" # ", L"#*#", L" # ", bannerKeys[19], 51); + SKULL = new BannerPattern(20, L"sku", new ItemInstance(Items::SKULL, 1, 1), bannerKeys[20], 53); + SMALL_STRIPES = new BannerPattern(21, L"ss", L"# #", L"#*#", L" ", bannerKeys[21], 49); + SQUARE_BOTTOM_LEFT = new BannerPattern(22, L"bl", L" ", L" * ", L"# ", bannerKeys[22], 51); + SQUARE_BOTTOM_RIGHT = new BannerPattern(23, L"br", L" ", L" * ", L" #", bannerKeys[23], 51); + SQUARE_TOP_LEFT = new BannerPattern(24, L"tl", L"# ", L" * ", L" ", bannerKeys[24], 51); + SQUARE_TOP_RIGHT = new BannerPattern(25, L"tr", L" #", L" * ", L" ", bannerKeys[25], 51); + STRAIGHT_CROSS = new BannerPattern(26, L"sc", L" # ", L"###", L"*# ", bannerKeys[26], 49); + STRIPE_BOTTOM = new BannerPattern(27, L"bs", L" ", L" * ", L"###", bannerKeys[27], 49); + STRIPE_CENTER = new BannerPattern(28, L"cs", L" # ", L" #*", L" # ", bannerKeys[28], 49); + STRIPE_DOWNLEFT = new BannerPattern(29, L"dls", L" #", L" #*", L"# ", bannerKeys[29], 49); + STRIPE_DOWNRIGHT = new BannerPattern(30, L"drs", L"# ", L" #*", L" #", bannerKeys[30], 49); + STRIPE_LEFT = new BannerPattern(31, L"ls", L"# ", L"#* ", L"# ", bannerKeys[31], 49); + STRIPE_MIDDLE = new BannerPattern(32, L"ms", L" ", L"###", L" * ", bannerKeys[32], 49); + STRIPE_RIGHT = new BannerPattern(33, L"rs", L" #", L" *#", L" #", bannerKeys[33], 49); + STRIPE_TOP = new BannerPattern(34, L"ts", L"###", L" * ", L" ", bannerKeys[34], 49); + TRIANGLE_BOTTOM = new BannerPattern(35, L"bt", L" * ", L" # ", L"# #", bannerKeys[35], 51); + TRIANGLE_TOP = new BannerPattern(36, L"tt", L"# #", L" # ", L" * ", bannerKeys[36], 51); + TRIANGLES_BOTTOM = new BannerPattern(37, L"bts", L" ", L"#*#", L" # ", bannerKeys[37], 51); + TRIANGLES_TOP = new BannerPattern(38, L"tts", L" # ", L"#*#", L" ", bannerKeys[38], 51); +} + +// name guessed +void BannerPattern::init(int id, const std::wstring& name, const unsigned char* key, int description) { + m_id = id; + m_shortName = name; + m_item = nullptr; + m_textureKey = key; + m_description = description; + VALUES.push_back(this); +} + +// name guessed +BannerPattern::BannerPattern(int id, const std::wstring& name, const unsigned char* key, int description) { + init(id, name, key, description); +} + +// name guessed +BannerPattern::BannerPattern(int id, const std::wstring& name, ItemInstance* item, const unsigned char* key, + int description) { + init(id, name, key, description); + m_item = item; +} + +// name guessed +BannerPattern::BannerPattern(int id, const std::wstring& name, const std::wstring& first, + const std::wstring& second, const std::wstring& third, const unsigned char* key, + int description) { + init(id, name, key, description); + m_rows[0] = first; + m_rows[1] = second; + m_rows[2] = third; +} + +// name guessed +BannerPattern::PatternGrid BannerPattern::getPatternGrid() { + return PatternGrid(m_rows); +} +// name guessed +BannerPattern::PatternGrid::PatternGrid(std::wstring* rows) : data(rows), length(3) {} +// name guessed +bool BannerPattern::hasPattern() { + return m_item != nullptr || !m_rows[0].empty(); +} +// name guessed +bool BannerPattern::hasItem() { + return m_item != nullptr; +} +// name guessed +ItemInstance* BannerPattern::getItem() { + return m_item; +} +// name guessed +int BannerPattern::getId() { + return m_id; +} +// name guessed +int BannerPattern::getDescriptionId() { + return m_description; +} diff --git a/src/Minecraft.World/net/minecraft/world/level/block/entity/BannerPattern.h b/src/Minecraft.World/net/minecraft/world/level/block/entity/BannerPattern.h index 3cc2cb58..e47a8937 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/entity/BannerPattern.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/entity/BannerPattern.h @@ -1,6 +1,77 @@ #pragma once +#include +#include + +class ItemInstance; + class BannerPattern { public: + struct PatternGrid { + explicit PatternGrid(std::wstring*); + std::wstring* data; + unsigned int length; + }; + static void staticCtor(); + static std::vector VALUES; + static BannerPattern* BASE; + static BannerPattern* BORDER; + static BannerPattern* BRICKS; + static BannerPattern* CIRCLE; + static BannerPattern* CREEPER; + static BannerPattern* CROSS; + static BannerPattern* CURLY_BORDER; + static BannerPattern* DIAGONAL_LEFT; + static BannerPattern* DIAGONAL_RIGHT_MIRROR; + static BannerPattern* DIAGONAL_LEFT_MIRROR; + static BannerPattern* DIAGONAL_RIGHT; + static BannerPattern* FLOWER; + static BannerPattern* GRADIENT; + static BannerPattern* GRADIENT_UP; + static BannerPattern* HALF_HORIZONTAL; + static BannerPattern* HALF_HORIZONTAL_MIRROR; + static BannerPattern* HALF_VERTICAL; + static BannerPattern* HALF_VERTICAL_MIRROR; + static BannerPattern* MOJANG; + static BannerPattern* RHOMBUS; + static BannerPattern* SKULL; + static BannerPattern* SMALL_STRIPES; + static BannerPattern* SQUARE_BOTTOM_LEFT; + static BannerPattern* SQUARE_BOTTOM_RIGHT; + static BannerPattern* SQUARE_TOP_LEFT; + static BannerPattern* SQUARE_TOP_RIGHT; + static BannerPattern* STRAIGHT_CROSS; + static BannerPattern* STRIPE_BOTTOM; + static BannerPattern* STRIPE_CENTER; + static BannerPattern* STRIPE_DOWNLEFT; + static BannerPattern* STRIPE_DOWNRIGHT; + static BannerPattern* STRIPE_LEFT; + static BannerPattern* STRIPE_MIDDLE; + static BannerPattern* STRIPE_RIGHT; + static BannerPattern* STRIPE_TOP; + static BannerPattern* TRIANGLE_BOTTOM; + static BannerPattern* TRIANGLE_TOP; + static BannerPattern* TRIANGLES_BOTTOM; + static BannerPattern* TRIANGLES_TOP; + + BannerPattern(int, const std::wstring&, const unsigned char*, int); + BannerPattern(int, const std::wstring&, ItemInstance*, const unsigned char*, int); + BannerPattern(int, const std::wstring&, const std::wstring&, const std::wstring&, const std::wstring&, + const unsigned char*, int); + void init(int, const std::wstring&, const unsigned char*, int); + PatternGrid getPatternGrid(); + bool hasPattern(); + bool hasItem(); + ItemInstance* getItem(); + int getId(); + int getDescriptionId(); + +private: + std::wstring m_shortName; + std::wstring m_rows[3]; + ItemInstance* m_item; + int m_id; + int m_description; + const unsigned char* m_textureKey; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/block/entity/BlockEntity.h b/src/Minecraft.World/net/minecraft/world/level/block/entity/BlockEntity.h index 83ceb7e6..1e8da66c 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/entity/BlockEntity.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/entity/BlockEntity.h @@ -57,6 +57,7 @@ class BlockEntity : public std::enable_shared_from_this { virtual void mirror(Mirror*); CompoundTag* saveMetadata(CompoundTag*); + bool isType(eINSTANCEOF); void setRenderRemoveStage(unsigned char); bool shouldRemoveForRender() const { return m_renderFlag == 2; } diff --git a/src/Minecraft.World/net/minecraft/world/level/block/entity/ChestBlockEntity.h b/src/Minecraft.World/net/minecraft/world/level/block/entity/ChestBlockEntity.h new file mode 100644 index 00000000..9e59420d --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/level/block/entity/ChestBlockEntity.h @@ -0,0 +1,11 @@ +#pragma once + +#include "net/minecraft/world/level/block/entity/RandomizableLockableContainerBlockEntity.h" + +class ChestBlockEntity : public RandomizableLockableContainerBlockEntity { +public: + char m_unknown68[0x30]; + bool m_isBonusChest; +}; + +ASSERT_SIZEOF(ChestBlockEntity, 0xA0) diff --git a/src/Minecraft.World/net/minecraft/world/level/block/entity/MobSpawnerBlockEntity.h b/src/Minecraft.World/net/minecraft/world/level/block/entity/MobSpawnerBlockEntity.h new file mode 100644 index 00000000..2819d0da --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/level/block/entity/MobSpawnerBlockEntity.h @@ -0,0 +1,13 @@ +#pragma once + +#include "net/minecraft/world/level/block/entity/BlockEntity.h" + +class BaseMobSpawner; + +class MobSpawnerBlockEntity : public BlockEntity { +public: + BaseMobSpawner* getSpawner(); + +private: + BaseMobSpawner* m_spawner; +}; diff --git a/src/Minecraft.World/net/minecraft/world/level/block/entity/RandomizableLockableContainerBlockEntity.cpp b/src/Minecraft.World/net/minecraft/world/level/block/entity/RandomizableLockableContainerBlockEntity.cpp new file mode 100644 index 00000000..822d52fb --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/level/block/entity/RandomizableLockableContainerBlockEntity.cpp @@ -0,0 +1,6 @@ +#include "net/minecraft/world/level/block/entity/RandomizableLockableContainerBlockEntity.h" + +void RandomizableLockableContainerBlockEntity::setLootTable(ResourceLocation* table, long long seed) { + m_lootTable = table; + m_lootTableSeed = seed; +} diff --git a/src/Minecraft.World/net/minecraft/world/level/block/entity/RandomizableLockableContainerBlockEntity.h b/src/Minecraft.World/net/minecraft/world/level/block/entity/RandomizableLockableContainerBlockEntity.h new file mode 100644 index 00000000..e279cd6f --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/level/block/entity/RandomizableLockableContainerBlockEntity.h @@ -0,0 +1,17 @@ +#pragma once + +#include "net/minecraft/world/level/block/entity/LockableContainerBlockEntity.h" + +class ResourceLocation; + +class RandomizableLockableContainerBlockEntity : public LockableContainerBlockEntity { +public: + void setLootTable(ResourceLocation*, long long seed); + +private: + char m_unknown50[8]; + ResourceLocation* m_lootTable; + long long m_lootTableSeed; +}; + +ASSERT_SIZEOF(RandomizableLockableContainerBlockEntity, 0x68) diff --git a/src/Minecraft.World/net/minecraft/world/level/block/state/BlockStateDefinition.cpp b/src/Minecraft.World/net/minecraft/world/level/block/state/BlockStateDefinition.cpp new file mode 100644 index 00000000..7dfee064 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/level/block/state/BlockStateDefinition.cpp @@ -0,0 +1,54 @@ +#include "net/minecraft/world/level/block/state/BlockStateDefinition.h" +#include + +Block* BlockStateDefinition::getBlock() const { + return m_block; +} + +const arrayWithLength* BlockStateDefinition::getPossibleBlockStates() const { + return &m_states; +} + +const BlockState* BlockStateDefinition::any() { + return m_states[0]; +} + +// name guessed +bool BlockStateDefinition::hasProperty(const Property* property) const { + return std::find(m_properties.begin(), m_properties.end(), property) != m_properties.end(); +} + +// name guessed +// NON_MATCHING | score: 840 (lower is better) +Boxed* BlockStateDefinition::getPropertyValue(const Property* property, unsigned short state) const { + unsigned int index = 0; + for (auto it = m_properties.begin(); it != m_properties.end(); ++it, ++index) { + if (*it == property) { + unsigned int valueIndex = m_propertyBitMasks[index] & (state >> m_propertyBitOffsets[index]); + return property->getValueAtIndex(valueIndex); + } + } + return nullptr; +} + +// name guessed +const BlockState* BlockStateDefinition::getNeighbour(const Property* property, Boxed* value, + unsigned short state) const { + unsigned int index = 0; + unsigned short valueIndex = 0; + for (auto it = m_properties.begin(); it != m_properties.end(); ++it, ++index) { + if (*it == property) { + valueIndex = property->getIndexForValue(value); + break; + } + } + unsigned short mask = m_propertyBitMasks[index]; + unsigned char shift = m_propertyBitOffsets[index]; + unsigned int neighbour = (state & ~(mask << shift)) | ((valueIndex & mask) << shift); + return m_states[neighbour]; +} + +// name guessed +const std::vector& BlockStateDefinition::getProperties() const { + return m_properties; +} diff --git a/src/Minecraft.World/net/minecraft/world/level/block/state/BlockStateDefinition.h b/src/Minecraft.World/net/minecraft/world/level/block/state/BlockStateDefinition.h index 7faacad3..cdbde1ca 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/state/BlockStateDefinition.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/state/BlockStateDefinition.h @@ -3,6 +3,7 @@ #include "net/minecraft/world/ArrayWithLength.h" #include "net/minecraft/world/level/block/state/BlockState.h" #include "net/minecraft/world/level/block/state/properties/AbstractProperty.h" +#include #include class Block; @@ -72,14 +73,20 @@ class BlockStateDefinition { void _init(Block* block, const Property** properties, unsigned int propertiesCount); - Block* getBlock(); + Block* getBlock() const; + const std::vector& getProperties() const; + bool hasProperty(const Property*) const; + Boxed* getPropertyValue(const Property*, unsigned short state) const; + /** Property must belong to this definition's encoded state table. + */ + const BlockState* getNeighbour(const Property*, Boxed*, unsigned short state) const; const BlockState* any(); - arrayWithLength* getPossibleBlockStates() { return &this->m_states; } + const arrayWithLength* getPossibleBlockStates() const; private: Block* m_block; std::vector m_properties; arrayWithLength m_states; - void** m_propertiesArr; // this is array - void** m_anotherProperties; // this is also array + std::uint8_t* m_propertyBitOffsets; + std::uint16_t* m_propertyBitMasks; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/block/state/BlockStatePredicate.cpp b/src/Minecraft.World/net/minecraft/world/level/block/state/BlockStatePredicate.cpp new file mode 100644 index 00000000..428551a1 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/level/block/state/BlockStatePredicate.cpp @@ -0,0 +1,39 @@ +#include "net/minecraft/world/level/block/state/BlockStatePredicate.h" + +#include "net/minecraft/world/level/block/Block.h" +#include "net/minecraft/world/level/block/state/BlockStateDefinition.h" +#include + +// name guessed +BlockStatePredicate::BlockStatePredicate(BlockStateDefinition* definition) : m_definition(definition) {} + +BlockStatePredicate::~BlockStatePredicate() = default; + +// name guessed +BlockStatePredicate* BlockStatePredicate::forBlock(Block* block) { + return new BlockStatePredicate(block->getBlockStateDefinition()); +} + +// name guessed +bool BlockStatePredicate::apply(const BlockState* state) const { + if (!state || state->getBlock() != m_definition->getBlock()) + return false; + + if (!m_predicates.empty()) { + for (const auto& entry : m_predicates) { + Boxed* value = state->getBoxedValue(entry.first); + if (!entry.second->apply(value)) + return false; + } + } + return true; +} + +// name guessed +BlockStatePredicate* BlockStatePredicate::where(Property* property, const Predicate* predicate) { + const auto& properties = m_definition->getProperties(); + // The original performs this scan but still registers an absent property. + std::find(properties.begin(), properties.end(), property); + m_predicates[property] = predicate; + return this; +} diff --git a/src/Minecraft.World/net/minecraft/world/level/block/state/BlockStatePredicate.h b/src/Minecraft.World/net/minecraft/world/level/block/state/BlockStatePredicate.h new file mode 100644 index 00000000..d1df6b47 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/level/block/state/BlockStatePredicate.h @@ -0,0 +1,46 @@ +#pragma once + +#include "net/minecraft/world/level/block/state/properties/AbstractProperty.h" +#include "types.h" +#include + +class Block; +class BlockState; +class BlockStateDefinition; + +/** Property predicates are borrowed; destroying this object releases only the map storage. + */ +class BlockStatePredicate : public Predicate { +public: + BlockStatePredicate(BlockStateDefinition*); + ~BlockStatePredicate() override; + + static BlockStatePredicate* forBlock(Block*); + bool apply(const BlockState*) const override; + BlockStatePredicate* where(Property*, const Predicate*); + + template + class PredicateConversion : public Predicate { + public: + PredicateConversion(const Predicate* predicate) : m_predicate(predicate) {} + + bool apply(Boxed* value) const override { + return m_predicate->apply(*const_cast*>(value->tryGetType())->getValue()); + } + + private: + const Predicate* m_predicate; + }; + + template + BlockStatePredicate* where(Property* property, Predicate* predicate) { + const Predicate* conversion = new PredicateConversion(predicate); + return where(property, conversion); + } + +private: + BlockStateDefinition* m_definition; + std::unordered_map*> m_predicates; +}; + +ASSERT_SIZEOF(BlockStatePredicate, 0x38); diff --git a/src/Minecraft.World/net/minecraft/world/level/block/state/BooleanProperty.cpp b/src/Minecraft.World/net/minecraft/world/level/block/state/BooleanProperty.cpp new file mode 100644 index 00000000..66dfa131 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/level/block/state/BooleanProperty.cpp @@ -0,0 +1,34 @@ +#include "net/minecraft/world/level/block/state/BooleanProperty.h" + +// name guessed +const std::vector& BooleanProperty::getPossibleValues() const { + return m_allowedValues; +} + +// name guessed +bool BooleanProperty::getUnboxedValue(const std::wstring& name) const { + auto it = m_values.find(name); + return it == m_values.end() ? false : it->second; +} + +// name guessed +int BooleanProperty::getValueCount() const { + return 2; +} + +// name guessed +Boxed* BooleanProperty::getValueAtIndex(unsigned int index) const { + return getPossibleValues().at(index); +} + +// name guessed +unsigned int BooleanProperty::getIndexForValue(Boxed* value) const { + const auto& values = getPossibleValues(); + unsigned int index = 0; + for (auto it = values.begin(); it != values.end(); ++it, ++index) { + // The original Boxed comparator in this slot delegates to equality. + if (*value != static_cast(*it)) + return index; + } + return 0; +} diff --git a/src/Minecraft.World/net/minecraft/world/level/block/state/BooleanProperty.h b/src/Minecraft.World/net/minecraft/world/level/block/state/BooleanProperty.h index cfbbc354..4ae8a105 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/state/BooleanProperty.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/state/BooleanProperty.h @@ -1,6 +1,7 @@ #pragma once #include "net/minecraft/world/level/block/state/properties/AbstractProperty.h" +#include class BooleanProperty : public AbstractProperty { public: @@ -15,4 +16,7 @@ class BooleanProperty : public AbstractProperty { bool getUnboxedValue(const std::wstring&) const override; std::wstring getName(const bool&) const override; ~BooleanProperty(); + + std::vector m_allowedValues; + std::unordered_map m_values; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/block/state/IntegerProperty.cpp b/src/Minecraft.World/net/minecraft/world/level/block/state/IntegerProperty.cpp new file mode 100644 index 00000000..bda06fca --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/level/block/state/IntegerProperty.cpp @@ -0,0 +1,26 @@ +#include "net/minecraft/world/level/block/state/IntegerProperty.h" + +// name guessed +const std::vector& IntegerProperty::getPossibleValues() const { + return m_allowedValues; +} + +// name guessed +int IntegerProperty::getValueCount() const { + return m_allowedValues.size(); +} + +// name guessed +Boxed* IntegerProperty::getValueAtIndex(unsigned int index) const { + return m_allowedValues.at(index); +} + +// name guessed +unsigned int IntegerProperty::getIndexForValue(Boxed* value) const { + unsigned int index = 0; + for (auto it = m_allowedValues.begin(); it != m_allowedValues.end(); ++it, ++index) { + if (*value != static_cast(*it)) + return index; + } + return 0; +} diff --git a/src/Minecraft.World/net/minecraft/world/level/block/state/properties/AbstractProperty.h b/src/Minecraft.World/net/minecraft/world/level/block/state/properties/AbstractProperty.h index 29adffb1..11a02b96 100644 --- a/src/Minecraft.World/net/minecraft/world/level/block/state/properties/AbstractProperty.h +++ b/src/Minecraft.World/net/minecraft/world/level/block/state/properties/AbstractProperty.h @@ -14,12 +14,14 @@ class Predicate { virtual bool apply(T) const = 0; virtual Predicate* copy() const { return nullptr; } + // name guessed virtual ~Predicate() {} }; template class Predicates { public: + static Predicate* equalTo(T value) { return new EqualToValuePredicate(value); } // TODO: impl those, and check if those below are correctly declared class ConnectivePredicate : public Predicate { bool apply(T) const override; @@ -46,7 +48,13 @@ class Predicates { bool m_constValue; // I guess it's bool, could be union; if you find possiblity of it, do it }; class EqualToValuePredicate : public Predicate { - bool apply(T) const override; + public: + EqualToValuePredicate(T value) : m_value(value) {} + + bool apply(T value) const override { return m_value == value; } + + private: + T m_value; }; }; @@ -110,7 +118,10 @@ class AbstractProperty : public Property { return this->m_name == otherCasted->m_name; } // TODO: this is wrong as hell btw !!!!! - int hashCode() const override { return 31 * (size_t)this->m_typeInfo + javaStringHashCode(this->m_name); } + int hashCode() const override { + return 31 * static_cast(reinterpret_cast(this->m_typeInfo)) + + static_cast(javaStringHashCode(this->m_name)); + } virtual T getUnboxedValue(const std::wstring&) const = 0; virtual std::wstring getName(const T&) const = 0; diff --git a/src/Minecraft.World/net/minecraft/world/level/chunk/ChunkGenerator.h b/src/Minecraft.World/net/minecraft/world/level/chunk/ChunkGenerator.h index f259aed9..3d27b537 100644 --- a/src/Minecraft.World/net/minecraft/world/level/chunk/ChunkGenerator.h +++ b/src/Minecraft.World/net/minecraft/world/level/chunk/ChunkGenerator.h @@ -17,13 +17,14 @@ class ChunkGenerator { static const std::wstring VILLAGE_NAME; static const std::wstring MINESHAFT_NAME; static const std::wstring TEMPLE_NAME; + static const std::wstring END_CITY_NAME; ChunkGenerator() {} virtual ~ChunkGenerator(); virtual LevelChunk* createChunk(int, int) = 0; virtual void postProcess(int, int) = 0; virtual bool postProcessLoadedChunk(LevelChunk*, int, int) = 0; - virtual std::vector* getMobsAt(MobCategory*, const BlockPos&) = 0; + virtual std::vector* getMobsAt(MobCategory*, const BlockPos&) = 0; virtual BlockPos* findNearestMapFeature(Level*, const std::wstring&, const BlockPos&, bool) = 0; virtual void recreateLogicStructuresForChunk(LevelChunk*, int, int) = 0; virtual bool isPosInFeature(Level*, const std::wstring&, const BlockPos&) = 0; diff --git a/src/Minecraft.World/net/minecraft/world/level/chunk/ChunkSource.h b/src/Minecraft.World/net/minecraft/world/level/chunk/ChunkSource.h index f6f520af..9c71b77a 100644 --- a/src/Minecraft.World/net/minecraft/world/level/chunk/ChunkSource.h +++ b/src/Minecraft.World/net/minecraft/world/level/chunk/ChunkSource.h @@ -32,7 +32,7 @@ class ChunkSource { virtual bool shouldSave() = 0; virtual ChunkSource* getCache(); virtual void dataReceived(int, int); - virtual std::vector* getMobsAt(MobCategory*, const BlockPos&) = 0; + virtual std::vector* getMobsAt(MobCategory*, const BlockPos&) = 0; virtual void findNearestMapFeature(Level*, const std::wstring&, const BlockPos&, bool) = 0; virtual int getLoadedChunks() = 0; virtual void recreateLogicStructuresForChunk(LevelChunk*, int, int) = 0; diff --git a/src/Minecraft.World/net/minecraft/world/level/chunk/LevelChunk.h b/src/Minecraft.World/net/minecraft/world/level/chunk/LevelChunk.h index af6b2f10..cfcdab2b 100644 --- a/src/Minecraft.World/net/minecraft/world/level/chunk/LevelChunk.h +++ b/src/Minecraft.World/net/minecraft/world/level/chunk/LevelChunk.h @@ -33,6 +33,7 @@ class LevelChunk { static bool touchedSky; // Name from b1.2_02 LevelChunk(Level*, ChunkPrimer*, int, int); + void setCheckAllLight(); enum EntityCreationType {}; diff --git a/src/Minecraft.World/net/minecraft/world/level/gamemode/minigames/glide/GlideRingGenerator.cpp b/src/Minecraft.World/net/minecraft/world/level/gamemode/minigames/glide/GlideRingGenerator.cpp new file mode 100644 index 00000000..1f20638c --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/level/gamemode/minigames/glide/GlideRingGenerator.cpp @@ -0,0 +1,118 @@ +#include "net/minecraft/world/level/gamemode/minigames/glide/GlideRingGenerator.h" + +#include "net/minecraft/core/BlockPos.h" +#include "net/minecraft/world/phys/AABB.h" + +TextureAtlasSprite* GlideRingGenerator::sIcons[3]; // name guessed +const int GlideRingGenerator::sCornerCounts[3] = {0, 1, 3}; +const int GlideRingGenerator::sRadii[3] = {2, 3, 4}; +const int GlideRingGenerator::sStraightOffsets[3] = {-1, 0, 1}; // name guessed +const int GlideRingGenerator::sCornerRadii[3] = {0, 2, 3}; +const int GlideRingGenerator::sCornerOffsets[3] = {-2, -3, 2}; + +void GlideRingGenerator::BuildRing(std::vector& blocks, const AABB* bounds, eGlideRingSize size) { + BlockPos center(bounds->getCenter()->m_x, bounds->getCenter()->m_y, bounds->getCenter()->m_z); + double width = bounds->m_axX - bounds->m_inX; + double depth = bounds->m_axZ - bounds->m_inZ; + double height = bounds->m_axY - bounds->m_inY; + int plane; + if (width < depth && width < height) + plane = 1; + else if (height < width && height < depth) + plane = 2; + else if (depth < width && depth < height) + plane = 0; + else + return; + + appendSegment(blocks, center, size, 0, plane); + appendSegment(blocks, center, size, 1, plane); + appendSegment(blocks, center, size, 2, plane); + appendSegment(blocks, center, size, 3, plane); + appendSegment(blocks, center, size, 4, plane); + appendSegment(blocks, center, size, 5, plane); + appendSegment(blocks, center, size, 6, plane); + appendSegment(blocks, center, size, 7, plane); +} + +// name guessed +void GlideRingGenerator::appendSegment(std::vector& blocks, const BlockPos& center, + eGlideRingSize size, unsigned int segment, int plane) { + int count = 3; + if ((segment & ~3u) == 4) { + if (static_cast(static_cast(size)) - 1 > 1) + return; + count = sCornerCounts[size]; + } + int index = 0; + do { + int horizontal = horizontalOffset(size, segment, index); + int vertical = verticalOffset(size, segment, index); + BlockPos position = orientOffset(center, plane, horizontal, vertical); + blocks.push_back(position); + index++; + } while (index != count); +} + +TextureAtlasSprite* GlideRingGenerator::getIcon(eGlideRingSize size) { + return sIcons[static_cast(size)]; +} + +// name guessed +BlockPos GlideRingGenerator::orientOffset(const BlockPos& center, int plane, int horizontal, int vertical) { + if (plane == 2) { + return BlockPos(center.getX() + horizontal, center.getY(), center.getZ() + vertical); + } else if (plane == 1) { + return BlockPos(center.getX(), center.getY() + horizontal, center.getZ() + vertical); + } else if (plane == 0) { + return BlockPos(center.getX() + horizontal, center.getY() + vertical, center.getZ()); + } else { + return BlockPos(); + } +} + +// name guessed +int GlideRingGenerator::horizontalOffset(eGlideRingSize size, unsigned int segment, int index) { + switch (segment) { + case 0: + return sRadii[static_cast(size)]; + case 1: + return -sRadii[static_cast(size)]; + case 2: + case 3: + return sStraightOffsets[index]; + case 4: + return -sCornerRadii[static_cast(size)]; + case 5: + return sCornerRadii[static_cast(size)]; + case 6: + return sCornerOffsets[index]; + case 7: + return -sCornerOffsets[index]; + default: + return 0; + } +} + +// name guessed +int GlideRingGenerator::verticalOffset(eGlideRingSize size, unsigned int segment, int index) { + switch (segment) { + case 0: + case 1: + return sStraightOffsets[index]; + case 2: + return -sRadii[static_cast(size)]; + case 3: + return sRadii[static_cast(size)]; + case 4: + return -sCornerOffsets[index]; + case 5: + return sCornerOffsets[index]; + case 6: + return -sCornerRadii[static_cast(size)]; + case 7: + return sCornerRadii[static_cast(size)]; + default: + return 0; + } +} diff --git a/src/Minecraft.World/net/minecraft/world/level/gamemode/minigames/glide/GlideRingGenerator.h b/src/Minecraft.World/net/minecraft/world/level/gamemode/minigames/glide/GlideRingGenerator.h index b7b23557..913ef11f 100644 --- a/src/Minecraft.World/net/minecraft/world/level/gamemode/minigames/glide/GlideRingGenerator.h +++ b/src/Minecraft.World/net/minecraft/world/level/gamemode/minigames/glide/GlideRingGenerator.h @@ -8,8 +8,24 @@ class TextureAtlasSprite; class GlideRingGenerator { public: - enum eGlideRingSize {}; + // name guessed: ordinal labels for the three entries in the executable tables. + enum eGlideRingSize { Size0 = 0, Size1 = 1, Size2 = 2 }; static void BuildRing(std::vector&, const AABB*, eGlideRingSize); static TextureAtlasSprite* getIcon(eGlideRingSize); + + // name guessed: data tables and internal helpers identified by their uses. + static TextureAtlasSprite* sIcons[3]; + static const int sCornerCounts[3]; + static const int sRadii[3]; + static const int sStraightOffsets[3]; + static const int sCornerRadii[3]; + static const int sCornerOffsets[3]; + +private: + static void appendSegment(std::vector&, const BlockPos&, eGlideRingSize, unsigned int segment, + int plane); + static BlockPos orientOffset(const BlockPos&, int plane, int horizontal, int vertical); + static int horizontalOffset(eGlideRingSize, unsigned int segment, int index); + static int verticalOffset(eGlideRingSize, unsigned int segment, int index); }; diff --git a/src/Minecraft.World/net/minecraft/world/level/gamemode/rules/CompoundGameRuleDefinition.h b/src/Minecraft.World/net/minecraft/world/level/gamemode/rules/CompoundGameRuleDefinition.h index 19d90242..4115b24f 100644 --- a/src/Minecraft.World/net/minecraft/world/level/gamemode/rules/CompoundGameRuleDefinition.h +++ b/src/Minecraft.World/net/minecraft/world/level/gamemode/rules/CompoundGameRuleDefinition.h @@ -11,5 +11,5 @@ class CompoundGameRuleDefinition : public GameRuleDefinition { void populateGameRule(GameRulesInstance::EGameRulesInstanceType, GameRule*) override; bool onUseBlock(GameRule*, int, int, int, int) override; bool onCollectItem(GameRule*, not_null_ptr) override; - void postProcessPlayer(std::__1::shared_ptr) override; + void postProcessPlayer(std::shared_ptr) override; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/levelgen/GenericOverworldLevelSource.h b/src/Minecraft.World/net/minecraft/world/level/levelgen/GenericOverworldLevelSource.h index a6380507..dc371f2f 100644 --- a/src/Minecraft.World/net/minecraft/world/level/levelgen/GenericOverworldLevelSource.h +++ b/src/Minecraft.World/net/minecraft/world/level/levelgen/GenericOverworldLevelSource.h @@ -7,5 +7,5 @@ class GenericOverworldLevelSource { GenericOverworldLevelSource() {} virtual void prepareHeights(int, int, ChunkPrimer*); - // missing a second unknown virtual function + virtual bool isFlat(); }; diff --git a/src/Minecraft.World/net/minecraft/world/level/levelgen/LevelGenerationOptions.h b/src/Minecraft.World/net/minecraft/world/level/levelgen/LevelGenerationOptions.h index da54064e..850011b3 100644 --- a/src/Minecraft.World/net/minecraft/world/level/levelgen/LevelGenerationOptions.h +++ b/src/Minecraft.World/net/minecraft/world/level/levelgen/LevelGenerationOptions.h @@ -1,9 +1,16 @@ #pragma once #include "net/minecraft/world/level/LevelRuleset.h" +#include "net/minecraft/world/level/biome/Biome.h" + +class BlockPos; class LevelGenerationOptions { public: LevelRuleset* getRequiredGameRules(); void loadBaseSaveData(); + bool intersects(const BlockPos& lower, const BlockPos& upper); + /** LegacyBlockData is the reconstruction's existing name for original BlockPair. + */ + void getBiomeOverride(int biomeId, Biome::LegacyBlockData* filler, Biome::LegacyBlockData* surface); }; diff --git a/src/Minecraft.World/net/minecraft/world/level/levelgen/NetherFlatLevelSource.cpp b/src/Minecraft.World/net/minecraft/world/level/levelgen/NetherFlatLevelSource.cpp index a9162366..184297bd 100644 --- a/src/Minecraft.World/net/minecraft/world/level/levelgen/NetherFlatLevelSource.cpp +++ b/src/Minecraft.World/net/minecraft/world/level/levelgen/NetherFlatLevelSource.cpp @@ -41,7 +41,7 @@ void NetherFlatLevelSource::prepareHeights(int x, int z, ChunkPrimer* primer) { } } -// NON_MATCHING +// NON_MATCHING | score: 8474 (lower is better) void NetherFlatLevelSource::buildSurfaces(int x, int z, ChunkPrimer* primer) { const BlockState* bedrock = Blocks::BEDROCK->defaultBlockState(); @@ -115,7 +115,7 @@ LevelChunk* NetherFlatLevelSource::createChunk(int x, int z) { return chunk; } -// NON_MATCHING +// NON_MATCHING | score: 3523 (lower is better) void NetherFlatLevelSource::postProcess(int x, int z) { inPostProcessStep = true; @@ -172,8 +172,8 @@ bool NetherFlatLevelSource::postProcessLoadedChunk(LevelChunk* chunk, int x, int return false; } -std::vector* NetherFlatLevelSource::getMobsAt(MobCategory* category, - const BlockPos& pos) { +std::vector* NetherFlatLevelSource::getMobsAt(MobCategory* category, + const BlockPos& pos) { Biome* biome = m_level->getBiome(pos); if (biome) return biome->getMobs(category); diff --git a/src/Minecraft.World/net/minecraft/world/level/levelgen/NetherFlatLevelSource.h b/src/Minecraft.World/net/minecraft/world/level/levelgen/NetherFlatLevelSource.h index a3ee492a..4d89392b 100644 --- a/src/Minecraft.World/net/minecraft/world/level/levelgen/NetherFlatLevelSource.h +++ b/src/Minecraft.World/net/minecraft/world/level/levelgen/NetherFlatLevelSource.h @@ -12,7 +12,7 @@ class NetherFlatLevelSource : public ChunkGenerator { LevelChunk* createChunk(int, int) override; void postProcess(int, int) override; bool postProcessLoadedChunk(LevelChunk*, int, int) override; - std::vector* getMobsAt(MobCategory*, const BlockPos&) override; + std::vector* getMobsAt(MobCategory*, const BlockPos&) override; BlockPos* findNearestMapFeature(Level*, const std::wstring&, const BlockPos&, bool) override; void recreateLogicStructuresForChunk(LevelChunk*, int, int) override; bool isPosInFeature(Level*, const std::wstring&, const BlockPos&) override; diff --git a/src/Minecraft.World/net/minecraft/world/level/levelgen/OverworldLevelSource.cpp b/src/Minecraft.World/net/minecraft/world/level/levelgen/OverworldLevelSource.cpp index f2e63c38..fa86292c 100644 --- a/src/Minecraft.World/net/minecraft/world/level/levelgen/OverworldLevelSource.cpp +++ b/src/Minecraft.World/net/minecraft/world/level/levelgen/OverworldLevelSource.cpp @@ -1,5 +1,7 @@ #include "net/minecraft/world/level/levelgen/OverworldLevelSource.h" +#include + #include "NX/Platform.h" #include "net/minecraft/util/Mth.h" #include "net/minecraft/world/entity/MobCategory.h" @@ -128,7 +130,7 @@ float OverworldLevelSource::getHeightFalloff(int chunkX, int chunkZ, int* distan return result; } -// NON_MATCHING | Score: 1630 (lower is better) +// NON_MATCHING | score: 0 (lower is better) int OverworldLevelSource::distanceToEdge(float a, int, int x, int z, int size) { int halfSize = size / 2; @@ -150,18 +152,19 @@ int OverworldLevelSource::distanceToEdge(float a, int, int x, int z, int size) { if (inLeftBand || inRightBand) { Vec3* p = Vec3::newTemp(x, 0.0f, z); - Vec3* edgeStart = (x < 1) ? topLeft : topRight; - Vec3* edgeEnd = (x < 1) ? bottomLeft : bottomRight; - - distance = p->distanceToSegment(edgeStart, edgeEnd); + if (x >= 1) + distance = p->distanceToSegment(topRight, bottomRight); + else + distance = p->distanceToSegment(topLeft, bottomLeft); } if (((z > leftBound) && (z < rightBound)) || ((z > (maxCoord - a)) && (z < (maxCoord + a)))) { Vec3* p = Vec3::newTemp(x, 0.0f, z); - Vec3* edgeStart = (z < 1) ? topLeft : topRight; - Vec3* edgeEnd = (z < 1) ? bottomLeft : bottomRight; - - float verticalDistance = p->distanceToSegment(edgeStart, edgeEnd); + float verticalDistance; + if (z >= 1) + verticalDistance = p->distanceToSegment(bottomLeft, bottomRight); + else + verticalDistance = p->distanceToSegment(topLeft, topRight); if (verticalDistance < distance) { distance = verticalDistance; @@ -184,7 +187,7 @@ void OverworldLevelSource::buildSurfaces(int chunkX, int chunkZ, ChunkPrimer* pr for (int x = 0; x < 16; x++) { for (int z = 0; z < 16; z++) { - Biome* biome = biomes[z + x * 16]; + Biome* biome = biomes.get(z + x * 16); { std::wstring biomeName = biome->getName(false); PIXBeginNamedEvent(0.0, "Building surface for biome %ls", biomeName.c_str()); @@ -322,11 +325,11 @@ void OverworldLevelSource::getHeights(int posX, int posY, int posZ, arrayWithLen float weightedScale = 0.0f; float weightedDepth = 0.0f; float totalWeight = 0.0f; - Biome* b = biomes[x + 2 + (z + 2) * 10]; + Biome* b = biomes.get(x + 2 + (z + 2) * 10); for (int xo = -2; xo <= 2; ++xo) { for (int zo = -2; zo <= 2; ++zo) { - Biome* b2 = biomes[x + xo + 2 + (z + zo + 2) * 10]; + Biome* b2 = biomes.get(x + xo + 2 + (z + zo + 2) * 10); float depth = m_sourceSettings->m_biomeDepthOffset + (b2->getDepth() * m_sourceSettings->m_biomeDepthWeight); @@ -540,7 +543,7 @@ bool OverworldLevelSource::postProcessLoadedChunk(LevelChunk*, int, int) { return false; } -// NON_MATCHING | Score: 5336 (lower is better) +// NON_MATCHING | score: 346 (lower is better) void OverworldLevelSource::prepareHeights(int chunkX, int chunkZ, ChunkPrimer* primer) { // These variables are made into constants by the compiler int width = 4; // every 4th block is sampled in the chunk @@ -563,19 +566,25 @@ void OverworldLevelSource::prepareHeights(int chunkX, int chunkZ, ChunkPrimer* p PIXBeginNamedEvent(0.0, "Generating"); for (int subX = 0; subX < width; subX++) { + int leftColumn = subX * xSize; + int rightColumn = (subX + 1) * xSize; for (int subZ = 0; subZ < width; subZ++) { + int n00 = (subZ + leftColumn) * ySize; + int n10 = n00 + ySize; + int n01 = (subZ + rightColumn) * ySize; + int n11 = n01 + ySize; for (int subY = 0; subY < 16; subY++) { // + 0 is for padding so these look nicer - double h00 = heights[((subX + 0) * xSize + (subZ + 0)) * ySize + subY]; - double h10 = heights[((subX + 0) * xSize + (subZ + 1)) * ySize + subY]; - double h01 = heights[((subX + 1) * xSize + (subZ + 0)) * ySize + subY]; - double h11 = heights[((subX + 1) * xSize + (subZ + 1)) * ySize + subY]; + double h00 = heights[n00 + subY]; + double h10 = heights[n10 + subY]; + double h01 = heights[n01 + subY]; + double h11 = heights[n11 + subY]; // interpolation steps - double iy00 = (heights[((subX + 0) * xSize + (subZ + 0)) * ySize + subY + 1] - h00) * 0.125; - double iy10 = (heights[((subX + 0) * xSize + (subZ + 1)) * ySize + subY + 1] - h10) * 0.125; - double iy01 = (heights[((subX + 1) * xSize + (subZ + 0)) * ySize + subY + 1] - h01) * 0.125; - double iy11 = (heights[((subX + 1) * xSize + (subZ + 1)) * ySize + subY + 1] - h11) * 0.125; + double iy00 = (heights[n00 + subY + 1] - h00) * 0.125; + double iy10 = (heights[n10 + subY + 1] - h10) * 0.125; + double iy01 = (heights[n01 + subY + 1] - h01) * 0.125; + double iy11 = (heights[n11 + subY + 1] - h11) * 0.125; for (int ym = 0; ym < 8; ym++) { double heightAtXZ0 = h00; @@ -591,19 +600,20 @@ void OverworldLevelSource::prepareHeights(int chunkX, int chunkZ, ChunkPrimer* p int defaultId = (subY * height + ym < seaLevel) ? 9 : 0; - double _h = h00; + double _h = heightAtXZ0; double _hStep = (heightAtXZ1 - heightAtXZ0) * 0.25; _h -= _hStep; for (int zm = 0; zm < 4; zm++) { - int x = subX * width + xm; + int x = chunkX * 16 + subX * width + xm; int y = subY * height + ym; - int z = subZ * width + zm; + int z = chunkZ * 16 + subZ * width + zm; int blockId; int distance; // Falloff at the edge of the world, does not exist in Java Edition - if (getHeightFalloff(x, z, &distance) > (_h += _hStep)) { + float falloff = getHeightFalloff(x, z, &distance); + if ((_h += _hStep) > falloff) { blockId = 1; } else { blockId = defaultId; @@ -642,8 +652,8 @@ void OverworldLevelSource::prepareHeights(int chunkX, int chunkZ, ChunkPrimer* p delete[] biomes.m_data; } -std::vector* OverworldLevelSource::getMobsAt(MobCategory* category, - const BlockPos& pos) { +std::vector* OverworldLevelSource::getMobsAt(MobCategory* category, + const BlockPos& pos) { Biome* biome = m_level->getBiome(pos); if (m_shouldGenerateStructures) { @@ -687,30 +697,30 @@ void OverworldLevelSource::recreateLogicStructuresForChunk(LevelChunk* chunk, in } } -// NON_MATCHING | Score: 860- (lower is better) +// NON_MATCHING | score: 0 (lower is better) bool OverworldLevelSource::isPosInFeature(Level* level, const std::wstring& featureName, const BlockPos& pos) { if (!m_shouldGenerateStructures) { return false; } - if (ChunkGenerator::STRONGHOLD_NAME.compare(featureName) == 0) { - return m_strongholdFeature && m_strongholdFeature->isInsideFeature(pos); + if (ChunkGenerator::STRONGHOLD_NAME.compare(featureName) == 0 && m_strongholdFeature) { + return m_strongholdFeature->isInsideFeature(pos); } - if (ChunkGenerator::MANSION_NAME.compare(featureName) == 0) { - return m_woodlandMansionFeature && m_woodlandMansionFeature->isInsideFeature(pos); + if (ChunkGenerator::MANSION_NAME.compare(featureName) == 0 && m_woodlandMansionFeature) { + return m_woodlandMansionFeature->isInsideFeature(pos); } - if (ChunkGenerator::MONUMENT_NAME.compare(featureName) == 0) { - return m_oceanMonumentFeature && m_oceanMonumentFeature->isInsideFeature(pos); + if (ChunkGenerator::MONUMENT_NAME.compare(featureName) == 0 && m_oceanMonumentFeature) { + return m_oceanMonumentFeature->isInsideFeature(pos); } - if (ChunkGenerator::VILLAGE_NAME.compare(featureName) == 0) { - return m_villageFeature && m_villageFeature->isInsideFeature(pos); + if (ChunkGenerator::VILLAGE_NAME.compare(featureName) == 0 && m_villageFeature) { + return m_villageFeature->isInsideFeature(pos); } - if (ChunkGenerator::MINESHAFT_NAME.compare(featureName) == 0) { - return m_mineshaftFeature && m_mineshaftFeature->isInsideFeature(pos); + if (ChunkGenerator::MINESHAFT_NAME.compare(featureName) == 0 && m_mineshaftFeature) { + return m_mineshaftFeature->isInsideFeature(pos); } - if (ChunkGenerator::TEMPLE_NAME.compare(featureName) == 0) { - return m_randomScatteredLargeFeature && m_randomScatteredLargeFeature->isInsideFeature(pos); + if (ChunkGenerator::TEMPLE_NAME.compare(featureName) == 0 && m_randomScatteredLargeFeature) { + return m_randomScatteredLargeFeature->isInsideFeature(pos); } return false; diff --git a/src/Minecraft.World/net/minecraft/world/level/levelgen/OverworldLevelSource.h b/src/Minecraft.World/net/minecraft/world/level/levelgen/OverworldLevelSource.h index 200aa253..0f46b7f5 100644 --- a/src/Minecraft.World/net/minecraft/world/level/levelgen/OverworldLevelSource.h +++ b/src/Minecraft.World/net/minecraft/world/level/levelgen/OverworldLevelSource.h @@ -38,7 +38,7 @@ class OverworldLevelSource : public ChunkGenerator, public GenericOverworldLevel LevelChunk* createChunk(int, int) override; void postProcess(int, int) override; bool postProcessLoadedChunk(LevelChunk*, int, int) override; - std::vector* getMobsAt(MobCategory*, const BlockPos&) override; + std::vector* getMobsAt(MobCategory*, const BlockPos&) override; BlockPos* findNearestMapFeature(Level*, const std::wstring&, const BlockPos&, bool) override; void recreateLogicStructuresForChunk(LevelChunk*, int, int) override; bool isPosInFeature(Level*, const std::wstring&, const BlockPos&) override; diff --git a/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/Feature.h b/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/Feature.h index 8cdbf359..832283bb 100644 --- a/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/Feature.h +++ b/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/Feature.h @@ -7,7 +7,7 @@ class BlockState; class Feature { public: - Feature(bool isUpdate); + Feature(bool isUpdate = false); virtual ~Feature(); virtual bool place(Level* level, Random& random, const BlockPos& pos) = 0; virtual void init(); diff --git a/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/FlowerFeature.h b/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/FlowerFeature.h index dc75dada..13a8daa3 100644 --- a/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/FlowerFeature.h +++ b/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/FlowerFeature.h @@ -7,9 +7,9 @@ class FlowerFeature : public Feature { public: FlowerFeature(FlowerBlock*, FlowerBlock::Flower*); - ~FlowerFeature() override; bool place(Level* level, Random& random, const BlockPos& pos) override; + void setFlower(FlowerBlock*, FlowerBlock::Flower*); - void* m_field10; - void* m_field18; + FlowerBlock* m_flower; + const BlockState* m_state; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/LargeFeature.h b/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/LargeFeature.h index 1cef066b..2c0c185b 100644 --- a/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/LargeFeature.h +++ b/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/LargeFeature.h @@ -7,11 +7,12 @@ class Level; class LargeFeature { public: + LargeFeature(); virtual ~LargeFeature(); virtual void apply(Level*, int, int, ChunkPrimer*); virtual void addFeature(Level*, int, int, int, int, ChunkPrimer*); int m_radius; Random m_random; - void* m_unused; + Level* m_level; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/MineShaftFeature.h b/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/MineShaftFeature.h index 9bffdc34..b02cd3c0 100644 --- a/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/MineShaftFeature.h +++ b/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/MineShaftFeature.h @@ -4,6 +4,11 @@ class MineShaftFeature : public StructureFeature { public: + std::wstring getFeatureName() override; + BlockPos* getNearestGeneratedFeature(Level*, const BlockPos&, bool) override; + bool isFeatureChunk(int, int, bool) override; + StructureStart* createStructureStart(int, int) override; + MineShaftFeature(); char m_filler[0x8]; diff --git a/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/MonsterRoomFeature.h b/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/MonsterRoomFeature.h index 371cd466..0b8e69e3 100644 --- a/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/MonsterRoomFeature.h +++ b/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/MonsterRoomFeature.h @@ -1,10 +1,14 @@ #pragma once #include "net/minecraft/world/level/levelgen/feature/Feature.h" +#include class MonsterRoomFeature : public Feature { public: MonsterRoomFeature(); bool place(Level* level, Random& random, const BlockPos& pos) override; + +private: + std::wstring randomEntityId(Random&); }; diff --git a/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/OceanMonumentFeature.h b/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/OceanMonumentFeature.h index bfa3f3f9..f7161500 100644 --- a/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/OceanMonumentFeature.h +++ b/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/OceanMonumentFeature.h @@ -7,11 +7,16 @@ class OceanMonumentFeature : public StructureFeature { public: - static std::vector MOB_SPAWNERS; + std::wstring getFeatureName() override; + BlockPos* getNearestGeneratedFeature(Level*, const BlockPos&, bool) override; + bool isFeatureChunk(int, int, bool) override; + StructureStart* createStructureStart(int, int) override; + + static std::vector MOB_SPAWNERS; OceanMonumentFeature(); - std::vector* getEnemies(); + std::vector* getEnemies(); static void staticCtor(); diff --git a/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/RandomScatteredLargeFeature.h b/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/RandomScatteredLargeFeature.h index 72851eb6..12eb4dcb 100644 --- a/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/RandomScatteredLargeFeature.h +++ b/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/RandomScatteredLargeFeature.h @@ -7,10 +7,15 @@ class BlockPos; class RandomScatteredLargeFeature : public StructureFeature { public: + std::wstring getFeatureName() override; + BlockPos* getNearestGeneratedFeature(Level*, const BlockPos&, bool) override; + bool isFeatureChunk(int, int, bool) override; + StructureStart* createStructureStart(int, int) override; + RandomScatteredLargeFeature(); bool isSwamphut(const BlockPos&); - std::vector* getSwamphutEnemies(); + std::vector* getSwamphutEnemies(); static void staticCtor(); diff --git a/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/StrongholdFeature.h b/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/StrongholdFeature.h index ac3cb0ea..c3dd9b6f 100644 --- a/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/StrongholdFeature.h +++ b/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/StrongholdFeature.h @@ -4,6 +4,12 @@ class StrongholdFeature : public StructureFeature { public: + std::wstring getFeatureName() override; + BlockPos* getNearestGeneratedFeature(Level*, const BlockPos&, bool) override; + bool isFeatureChunk(int, int, bool) override; + StructureStart* createStructureStart(int, int) override; + std::vector* getGuesstimatedFeaturePositions() override; + StrongholdFeature(); char m_filler[0x48]; diff --git a/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/StructureFeature.h b/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/StructureFeature.h index 9ae37554..d2edc95d 100644 --- a/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/StructureFeature.h +++ b/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/StructureFeature.h @@ -2,27 +2,40 @@ #include "net/minecraft/world/level/levelgen/feature/LargeFeature.h" #include "types.h" +#include +#include +#include +#include class BlockPos; class ChunkPos; +class StructureFeatureSavedData; class StructureStart; class StructureFeature : public LargeFeature { public: - virtual std::wstring getFeatureName(); + StructureFeature(); + ~StructureFeature() override; + void addFeature(Level*, int, int, int, int, ChunkPrimer*) override; + virtual std::wstring getFeatureName() = 0; virtual bool postProcess(Level*, Random&, ChunkPos*); virtual bool isIntersection(int, int); virtual bool isInsideFeature(const BlockPos&); - virtual BlockPos* getNearestGeneratedFeature(Level*, const BlockPos&, bool); - virtual void getGuesstimatedFeaturePositions(); + virtual BlockPos* getNearestGeneratedFeature(Level*, const BlockPos&, bool) = 0; + virtual std::vector* getGuesstimatedFeaturePositions(); virtual void restoreSavedData(Level*); virtual void saveFeature(int, int, StructureStart*); - virtual bool isFeatureChunk(int, int, bool); - virtual void createStructureStart(int, int); - - char m_filler[0x38]; + virtual bool isFeatureChunk(int, int, bool) = 0; + virtual StructureStart* createStructureStart(int, int) = 0; + StructureStart* getStructureAt(const BlockPos&); bool isInsideBoundingFeature(Level*, const BlockPos&); + static BlockPos* findNearestFeaturePositionBySpacing(Level*, StructureFeature*, const BlockPos&, + int spacing, int separation, int salt, bool linear, + int maxRadius, bool skipKnown); + + std::shared_ptr m_savedData; + std::unordered_map m_starts; }; ASSERT_SIZEOF(StructureFeature, 0x68) diff --git a/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/VillageFeature.h b/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/VillageFeature.h index df581bf5..569e8fa6 100644 --- a/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/VillageFeature.h +++ b/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/VillageFeature.h @@ -1,12 +1,21 @@ #pragma once #include "net/minecraft/world/level/levelgen/feature/StructureFeature.h" +#include + +class Biome; class VillageFeature : public StructureFeature { public: + std::wstring getFeatureName() override; + BlockPos* getNearestGeneratedFeature(Level*, const BlockPos&, bool) override; + bool isFeatureChunk(int, int, bool) override; + StructureStart* createStructureStart(int, int) override; + VillageFeature(int); static void staticCtor(); + static std::vector ALLOWED_BIOMES; char m_filler[0x10]; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/WoodlandMansionFeature.h b/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/WoodlandMansionFeature.h index fb911195..0c2d3c7a 100644 --- a/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/WoodlandMansionFeature.h +++ b/src/Minecraft.World/net/minecraft/world/level/levelgen/feature/WoodlandMansionFeature.h @@ -3,10 +3,17 @@ #include "net/minecraft/world/level/levelgen/feature/StructureFeature.h" class GenericOverworldLevelSource; +class SuperflatConfig; class WoodlandMansionFeature : public StructureFeature { public: + std::wstring getFeatureName() override; + BlockPos* getNearestGeneratedFeature(Level*, const BlockPos&, bool) override; + bool isFeatureChunk(int, int, bool) override; + StructureStart* createStructureStart(int, int) override; + WoodlandMansionFeature(GenericOverworldLevelSource*); + WoodlandMansionFeature(GenericOverworldLevelSource*, SuperflatConfig*); static void staticCtor(); diff --git a/src/Minecraft.World/net/minecraft/world/level/levelgen/synth/PerlinSimplexNoise.h b/src/Minecraft.World/net/minecraft/world/level/levelgen/synth/PerlinSimplexNoise.h index 4813debe..62d04637 100644 --- a/src/Minecraft.World/net/minecraft/world/level/levelgen/synth/PerlinSimplexNoise.h +++ b/src/Minecraft.World/net/minecraft/world/level/levelgen/synth/PerlinSimplexNoise.h @@ -3,7 +3,7 @@ #include "net/minecraft/world/ArrayWithLength.h" #include "net/minecraft/world/level/levelgen/synth/Synth.h" -class ImprovedNoise; +class SimplexNoise; class Random; class PerlinSimplexNoise : public Synth { @@ -14,7 +14,9 @@ class PerlinSimplexNoise : public Synth { void init(Random*, int); arrayWithLength getRegion(arrayWithLength, double, double, int, int, double, double, double); + arrayWithLength getRegion(arrayWithLength, double, double, int, int, double, double, + double, double); - ImprovedNoise** m_noiseLevels; + SimplexNoise** m_noiseLevels; int m_maxOctaves; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/newbiome/layer/BiomeInitLayer.cpp b/src/Minecraft.World/net/minecraft/world/level/newbiome/layer/BiomeInitLayer.cpp index 6ac19ccd..415211b1 100644 --- a/src/Minecraft.World/net/minecraft/world/level/newbiome/layer/BiomeInitLayer.cpp +++ b/src/Minecraft.World/net/minecraft/world/level/newbiome/layer/BiomeInitLayer.cpp @@ -12,41 +12,41 @@ BiomeInitLayer::BiomeInitLayer(long long seed, std::shared_ptr parent, Le m_parent = parent; if (levelType == LevelType::NORMAL_1_1) { m_warmBiomes = {6, true}; - m_warmBiomes[0] = Biome::DESERT; - m_warmBiomes[1] = Biome::FOREST; - m_warmBiomes[2] = Biome::EXTREME_HILLS; - m_warmBiomes[3] = Biome::SWAMP; - m_warmBiomes[4] = Biome::PLAINS; - m_warmBiomes[5] = Biome::TAIGA; + m_warmBiomes.get(0) = Biome::DESERT; + m_warmBiomes.get(1) = Biome::FOREST; + m_warmBiomes.get(2) = Biome::EXTREME_HILLS; + m_warmBiomes.get(3) = Biome::SWAMP; + m_warmBiomes.get(4) = Biome::PLAINS; + m_warmBiomes.get(5) = Biome::TAIGA; } else { m_warmBiomes = {6, true}; - m_warmBiomes[0] = Biome::DESERT; - m_warmBiomes[1] = Biome::DESERT; - m_warmBiomes[2] = Biome::DESERT; - m_warmBiomes[3] = Biome::SAVANNA; - m_warmBiomes[4] = Biome::SAVANNA; - m_warmBiomes[5] = Biome::PLAINS; + m_warmBiomes.get(0) = Biome::DESERT; + m_warmBiomes.get(1) = Biome::DESERT; + m_warmBiomes.get(2) = Biome::DESERT; + m_warmBiomes.get(3) = Biome::SAVANNA; + m_warmBiomes.get(4) = Biome::SAVANNA; + m_warmBiomes.get(5) = Biome::PLAINS; } m_mediumBiomes = {6, true}; - m_mediumBiomes[0] = Biome::FOREST; - m_mediumBiomes[1] = Biome::ROOFED_FOREST; - m_mediumBiomes[2] = Biome::EXTREME_HILLS; - m_mediumBiomes[3] = Biome::PLAINS; - m_mediumBiomes[4] = Biome::BIRCH_FOREST; - m_mediumBiomes[5] = Biome::SWAMP; + m_mediumBiomes.get(0) = Biome::FOREST; + m_mediumBiomes.get(1) = Biome::ROOFED_FOREST; + m_mediumBiomes.get(2) = Biome::EXTREME_HILLS; + m_mediumBiomes.get(3) = Biome::PLAINS; + m_mediumBiomes.get(4) = Biome::BIRCH_FOREST; + m_mediumBiomes.get(5) = Biome::SWAMP; m_coldBiomes = {4, true}; - m_coldBiomes[0] = Biome::FOREST; - m_coldBiomes[1] = Biome::EXTREME_HILLS; - m_coldBiomes[2] = Biome::TAIGA; - m_coldBiomes[3] = Biome::PLAINS; + m_coldBiomes.get(0) = Biome::FOREST; + m_coldBiomes.get(1) = Biome::EXTREME_HILLS; + m_coldBiomes.get(2) = Biome::TAIGA; + m_coldBiomes.get(3) = Biome::PLAINS; m_iceBiomes = {4, true}; - m_iceBiomes[0] = Biome::ICE_PLAINS; - m_iceBiomes[1] = Biome::ICE_PLAINS; - m_iceBiomes[2] = Biome::ICE_PLAINS; - m_iceBiomes[3] = Biome::COLD_TAIGA; + m_iceBiomes.get(0) = Biome::ICE_PLAINS; + m_iceBiomes.get(1) = Biome::ICE_PLAINS; + m_iceBiomes.get(2) = Biome::ICE_PLAINS; + m_iceBiomes.get(3) = Biome::COLD_TAIGA; CustomizableSourceSettings* settings = nullptr; if (levelType != LevelType::NORMAL_1_1 && levelType == LevelType::CUSTOMIZED) { @@ -83,22 +83,22 @@ arrayWithLength BiomeInitLayer::getArea(int x, int y, int width, int height area[n + m * width] = Biome::MESA_PLATEAU->m_biomeId; } } else { - area[n + m * width] = m_warmBiomes[nextRandom(m_warmBiomes.m_length)]->m_biomeId; + area[n + m * width] = m_warmBiomes.get(nextRandom(m_warmBiomes.m_length))->m_biomeId; } } else if (o == 2) { if (p > 0) { area[n + m * width] = Biome::JUNGLE->m_biomeId; } else { - area[n + m * width] = m_mediumBiomes[nextRandom(m_mediumBiomes.m_length)]->m_biomeId; + area[n + m * width] = m_mediumBiomes.get(nextRandom(m_mediumBiomes.m_length))->m_biomeId; } } else if (o == 3) { if (p > 0) { area[n + m * width] = Biome::MEGA_TAIGA->m_biomeId; } else { - area[n + m * width] = m_coldBiomes[nextRandom(m_coldBiomes.m_length)]->m_biomeId; + area[n + m * width] = m_coldBiomes.get(nextRandom(m_coldBiomes.m_length))->m_biomeId; } } else if (o == 4) { - area[n + m * width] = m_iceBiomes[nextRandom(m_iceBiomes.m_length)]->m_biomeId; + area[n + m * width] = m_iceBiomes.get(nextRandom(m_iceBiomes.m_length))->m_biomeId; } else { area[n + m * width] = Biome::MUSHROOM_ISLAND->m_biomeId; } diff --git a/src/Minecraft.World/net/minecraft/world/level/newbiome/layer/IntCache.h b/src/Minecraft.World/net/minecraft/world/level/newbiome/layer/IntCache.h index deee731a..48c15e78 100644 --- a/src/Minecraft.World/net/minecraft/world/level/newbiome/layer/IntCache.h +++ b/src/Minecraft.World/net/minecraft/world/level/newbiome/layer/IntCache.h @@ -1,6 +1,7 @@ #pragma once #include "net/minecraft/world/ArrayWithLength.h" +#include class IntCache { public: @@ -14,5 +15,20 @@ class IntCache { static void Reset(); - class ThreadStorage {}; + class ThreadStorage { + public: + ThreadStorage(); + ~ThreadStorage(); + + /** Arrays remain owned here; returned arrayWithLength values are views. + */ + int m_maxSize; + std::vector> m_freeSmall; + std::vector> m_activeSmall; + std::vector> m_freeLarge; + std::vector> m_activeLarge; + std::vector> m_retiredLarge; + }; + + static unsigned int sThreadStorageIndex; }; diff --git a/src/Minecraft.World/net/minecraft/world/level/saveddata/MapItemSavedData.h b/src/Minecraft.World/net/minecraft/world/level/saveddata/MapItemSavedData.h index ef5deedf..3d19ae92 100644 --- a/src/Minecraft.World/net/minecraft/world/level/saveddata/MapItemSavedData.h +++ b/src/Minecraft.World/net/minecraft/world/level/saveddata/MapItemSavedData.h @@ -37,7 +37,7 @@ class MapItemSavedData : public SavedData { ~MapItemSavedData() override; void load(CompoundTag*) override; - void save(CompoundTag*) override; + CompoundTag* save(CompoundTag*) override; void tickCarriedBy(std::shared_ptr player, not_null_ptr item); void mergeInMapData(std::shared_ptr mapData); diff --git a/src/Minecraft.World/net/minecraft/world/level/saveddata/SavedData.h b/src/Minecraft.World/net/minecraft/world/level/saveddata/SavedData.h index 9315bdc7..981316a2 100644 --- a/src/Minecraft.World/net/minecraft/world/level/saveddata/SavedData.h +++ b/src/Minecraft.World/net/minecraft/world/level/saveddata/SavedData.h @@ -10,7 +10,7 @@ class SavedData : public std::enable_shared_from_this { SavedData(const std::wstring&); virtual ~SavedData(); virtual void load(CompoundTag*) = 0; - virtual void save(CompoundTag*) = 0; + virtual CompoundTag* save(CompoundTag*) = 0; void setDirty(bool); void setDirty(); diff --git a/src/Minecraft.World/net/minecraft/world/level/storage/LevelData.cpp b/src/Minecraft.World/net/minecraft/world/level/storage/LevelData.cpp index 4ce690d3..a919fd94 100644 --- a/src/Minecraft.World/net/minecraft/world/level/storage/LevelData.cpp +++ b/src/Minecraft.World/net/minecraft/world/level/storage/LevelData.cpp @@ -4,6 +4,7 @@ #include "net/minecraft/core/BlockPos.h" #include "net/minecraft/core/System.h" +#include "net/minecraft/util/datafix/DataFixerUpper.h" #include "net/minecraft/world/Difficulty.h" #include "net/minecraft/world/level/LevelType.h" @@ -68,7 +69,7 @@ CompoundTag* LevelData::createTag(std::vector>*) { } void LevelData::setTagData(CompoundTag* out) { - out->putInt(sLevelDataVersionString, 922); // why is DataVersion it's own static shit wtf + out->putInt(DataFixerUpper::DATA_VERSION_KEY, 922); out->putLong(L"RandomSeed", this->m_seed); out->putString(L"generatorName", this->m_levelType->getGeneratorName()); out->putInt(L"generatorVersion", this->m_levelType->getVersion()); diff --git a/src/Minecraft.World/net/minecraft/world/level/storage/light/SparseLightStorage.h b/src/Minecraft.World/net/minecraft/world/level/storage/light/SparseLightStorage.h index 19c5b031..d3c9a890 100644 --- a/src/Minecraft.World/net/minecraft/world/level/storage/light/SparseLightStorage.h +++ b/src/Minecraft.World/net/minecraft/world/level/storage/light/SparseLightStorage.h @@ -1,10 +1,50 @@ #pragma once #include "java/io/DataOutputStream.h" +#include + +class DataInputStream; +template +class XLockFreeStack; class SparseLightStorage { public: + SparseLightStorage(bool bright); + SparseLightStorage(bool bright, bool compact); + SparseLightStorage(const SparseLightStorage&); + ~SparseLightStorage(); + + void fromNibbles(arrayWithLength, int offset); + void toNibbles(arrayWithLength, unsigned int offset); + unsigned char getLight(int x, int y, int z); + void setLight(int x, int y, int z, int value); + void setFullBright(); + int setDataRegion(arrayWithLength, int x0, int y0, int z0, int x1, int y1, int z1, + int offset); + int getDataRegion(arrayWithLength, int x0, int y0, int z0, int x1, int y1, int z1, + int offset); + unsigned int compress(); + bool isCompressed(); void write(DataOutputStream* out); + void read(DataInputStream* in); static void staticCtor(); + static void tick(); + +private: + static unsigned char* allocate(unsigned int); + static void freeBuffer(unsigned char*, int); + int bufferSize(unsigned long long); + void getBuffers(unsigned char** indices, unsigned char** data); + void replace(unsigned long long); + void expandLayers(std::vector&); + void retire(unsigned char*); + static int sRetirementSlot; + static XLockFreeStack sRetired[3]; + + /** Low 48 bits: buffer pointer; high 16 bits: number of explicit 128-byte slabs. + */ + unsigned long long m_packed; }; + +static_assert(sizeof(SparseLightStorage) == 8, "SparseLightStorage Switch layout"); diff --git a/src/Minecraft.World/net/minecraft/world/phys/AABB.h b/src/Minecraft.World/net/minecraft/world/phys/AABB.h index 8f6d8460..1351b2ac 100644 --- a/src/Minecraft.World/net/minecraft/world/phys/AABB.h +++ b/src/Minecraft.World/net/minecraft/world/phys/AABB.h @@ -32,8 +32,13 @@ class AABB { AABB(double, double, double, double, double, double); static AABB* newPermanent(double, double, double, double, double, double); + static AABB* newPermanent(const BlockPos&); + static AABB* newPermanent(const BlockPos&, const BlockPos&); static AABB* newPermanent(const AABB*); static AABB* newTemp(double, double, double, double, double, double); + static AABB* newTemp(const BlockPos&); + static AABB* newTemp(const BlockPos&, const BlockPos&); + static AABB* newTemp(const AABB*); bool containsIncludingLowerBound(Vec3*) const; AABB* set(const AABB*); @@ -43,14 +48,26 @@ class AABB { double getSize() const; AABB* grow(double multiplier) const; AABB* grow(double x, double y, double z) const; + AABB* shrink(double multiplier) const; + AABB* shrink(double x, double y, double z) const; AABB* expand(double x, double y, double z) const; + AABB* contract(double x, double y, double z); + bool equals(const AABB* other) const; bool contains(Vec3* vec); + bool contains(const BlockPos& pos) const; bool intersects(const AABB* rhs) const; bool intersects(double, double, double, double, double, double) const; void resetPool(); AABB* move(const BlockPos&) const; AABB* move(double, double, double) const; HitResult* clip(Vec3*, Vec3*) const; + Vec3* collideWithXPlane(double, Vec3*, Vec3*) const; + Vec3* collideWithYPlane(double, Vec3*, Vec3*) const; + Vec3* collideWithZPlane(double, Vec3*, Vec3*) const; + bool isClosest(Vec3* start, Vec3* closest, Vec3* candidate) const; + bool containsYZ(Vec3*) const; + bool containsXZ(Vec3*) const; + bool containsXY(Vec3*) const; void correctMinMax(); double clipXCollide(const AABB*, double); double clipYCollide(const AABB*, double); diff --git a/src/Minecraft.World/net/minecraft/world/phys/HitResult.h b/src/Minecraft.World/net/minecraft/world/phys/HitResult.h index 92504665..73d8e1cb 100644 --- a/src/Minecraft.World/net/minecraft/world/phys/HitResult.h +++ b/src/Minecraft.World/net/minecraft/world/phys/HitResult.h @@ -10,12 +10,17 @@ class Entity; class HitResult { public: ~HitResult(); + HitResult(Vec3*, const Direction*); HitResult(Vec3*, const Direction*, const BlockPos&); + HitResult(std::shared_ptr entity); const BlockPos& getBlockPos() const; BlockPos m_blockPos; + int m_type; const Direction* m_direction; Vec3* m_hitVector; std::shared_ptr m_entity; }; + +ASSERT_SIZEOF(HitResult, 0x30) diff --git a/src/Minecraft.World/net/minecraft/world/phys/Vec3.cpp b/src/Minecraft.World/net/minecraft/world/phys/Vec3.cpp index dbf75105..f2ca8aab 100644 --- a/src/Minecraft.World/net/minecraft/world/phys/Vec3.cpp +++ b/src/Minecraft.World/net/minecraft/world/phys/Vec3.cpp @@ -1,10 +1,163 @@ #include "net/minecraft/world/phys/Vec3.h" #include "cmath" +#include "net/minecraft/core/Vec3i.h" #include "net/minecraft/world/phys/AABB.h" DEFINE_THREAD_STORAGE(Vec3, 1024) +Vec3* Vec3::ZERO; // name guessed + +void Vec3::staticCtor() { + ZERO = new Vec3(0.0, 0.0, 0.0); +} + +Vec3* Vec3::newPermanent(double x, double y, double z) { + return new Vec3(x, y, z); +} + +Vec3* Vec3::newPermanent(const Vec3* other) { + return new Vec3(other->m_x, other->m_y, other->m_z); +} + +Vec3* Vec3::newTemp(double x, double y, double z) { + ThreadStorage* ts = static_cast(TlsGetValue(sThreadStorageIndex)); + Vec3* temp = ts->m_storage[ts->m_unk].set(x, y, z); + ts->m_unk++; + ts->m_unk &= 0x3ff; + return temp; +} + +Vec3* Vec3::newTemp(const Vec3* other) { + return newTemp(other->m_x, other->m_y, other->m_z); +} + +Vec3* Vec3::newTemp(const Vec3i& other) { + return newTemp(other.getX(), other.getY(), other.getZ()); +} + +Vec3* Vec3::normalize() { + double magnitude = sqrt(m_x * m_x + m_y * m_y + m_z * m_z); + if (magnitude < 0.0001) + return newTemp(ZERO); + return newTemp(m_x / magnitude, m_y / magnitude, m_z / magnitude); +} + +Vec3* Vec3::lerp(Vec3* other, double weight) { + return newTemp(m_x + (other->m_x - m_x) * weight, m_y + (other->m_y - m_y) * weight, + m_z + (other->m_z - m_z) * weight); +} + +Vec3* Vec3::vectorTo(Vec3* other) { + return newTemp(other->m_x - m_x, other->m_y - m_y, other->m_z - m_z); +} + +Vec3* Vec3::cross(Vec3* other) { + return newTemp(m_y * other->m_z - m_z * other->m_y, m_z * other->m_x - other->m_z * m_x, + other->m_y * m_x - m_y * other->m_x); +} + +Vec3* Vec3::add(Vec3* other) { + return add(other->m_x, other->m_y, other->m_z); +} + +double Vec3::distanceTo(Vec3* other) { + double dx = other->m_x - m_x; + double dy = other->m_y - m_y; + double dz = other->m_z - m_z; + return sqrt(dx * dx + dy * dy + dz * dz); +} + +Vec3* Vec3::scale(double multiplier) { + return newTemp(m_x * multiplier, m_y * multiplier, m_z * multiplier); +} + +double Vec3::lengthSqr() { + return m_x * m_x + m_y * m_y + m_z * m_z; +} + +Vec3* Vec3::getIntermediateWithXValue(Vec3* other, double x) { + double dx = other->m_x - m_x; + double dy = other->m_y - m_y; + double dz = other->m_z - m_z; + if (dx * dx < double(1.0e-7f)) + return nullptr; + double weight = (x - m_x) / dx; + // Reject out-of-range weights; unordered comparisons fall through in the binary. + if (weight < 0.0 || weight > 1.0) + return nullptr; + return newTemp(m_x + dx * weight, m_y + weight * dy, m_z + weight * dz); +} + +Vec3* Vec3::getIntermediateWithYValue(Vec3* other, double y) { + double dx = other->m_x - m_x; + double dy = other->m_y - m_y; + double dz = other->m_z - m_z; + if (dy * dy < double(1.0e-7f)) + return nullptr; + double weight = (y - m_y) / dy; + if (weight < 0.0 || weight > 1.0) + return nullptr; + return newTemp(m_x + dx * weight, m_y + dy * weight, m_z + weight * dz); +} + +Vec3* Vec3::getIntermediateWithZValue(Vec3* other, double z) { + double dx = other->m_x - m_x; + double dy = other->m_y - m_y; + double dz = other->m_z - m_z; + if (dz * dz < double(1.0e-7f)) + return nullptr; + double weight = (z - m_z) / dz; + if (weight < 0.0 || weight > 1.0) + return nullptr; + return newTemp(m_x + dx * weight, m_y + dy * weight, m_z + dz * weight); +} + +bool Vec3::equals(Vec3* other) { + if (other->m_x != m_x) + return false; + if (other->m_y != m_y) + return false; + return other->m_z == m_z; +} + +Vec3* Vec3::xRot(float angle) { + double cosine = cosf(angle); + double sine = sinf(angle); + return newTemp(m_x, cosine * m_y + sine * m_z, cosine * m_z - sine * m_y); +} + +Vec3* Vec3::yRot(float angle) { + double cosine = cosf(angle); + double sine = sinf(angle); + return newTemp(cosine * m_x + sine * m_z, m_y, cosine * m_z - m_x * sine); +} + +Vec3* Vec3::zRot(float angle) { + double cosine = cosf(angle); + double sine = sinf(angle); + return newTemp(cosine * m_x + sine * m_y, cosine * m_y - m_x * sine, m_z); +} + +Vec3* Vec3::add(double x, double y, double z) { + return newTemp(this->m_x + x, this->m_y + y, this->m_z + z); +} + +Vec3* Vec3::subtract(double x, double y, double z) { + return add(-x, -y, -z); +} + +Vec3* Vec3::subtract(Vec3* other) { + return subtract(other->m_x, other->m_y, other->m_z); +} + +double Vec3::distanceToSqr(Vec3* other) { + double dx = other->m_x - this->m_x; + double dy = other->m_y - this->m_y; + double dz = other->m_z - this->m_z; + return dx * dx + dy * dy + dz * dz; +} + double Vec3::dot(Vec3* rhs) { return this->m_x * rhs->m_x + this->m_y * rhs->m_y + this->m_z * rhs->m_z; } @@ -13,10 +166,11 @@ double Vec3::length() { return sqrt(this->m_x * this->m_x + this->m_y * this->m_y + this->m_z * this->m_z); } -void Vec3::set(double x, double y, double z) { +Vec3* Vec3::set(double x, double y, double z) { this->m_x = x; this->m_y = y; this->m_z = z; + return this; } void Vec3::resetPool() {} diff --git a/src/Minecraft.World/net/minecraft/world/phys/Vec3.h b/src/Minecraft.World/net/minecraft/world/phys/Vec3.h index 6a37420c..6962bf60 100644 --- a/src/Minecraft.World/net/minecraft/world/phys/Vec3.h +++ b/src/Minecraft.World/net/minecraft/world/phys/Vec3.h @@ -3,12 +3,19 @@ #include "net/minecraft/util/ThreadStorage.h" class AABB; +class Vec3i; class Vec3 { public: DECLARE_THREAD_STORAGE(Vec3) Vec3(double x, double y, double z) { + if (x == -0.0) + x = 0.0; + if (y == -0.0) + y = 0.0; + if (z == -0.0) + z = 0.0; this->m_x = x; this->m_y = y; this->m_z = z; @@ -17,6 +24,9 @@ class Vec3 { static Vec3* newTemp(double x, double y, double z); static Vec3* newTemp(const Vec3* other); + static Vec3* newTemp(const Vec3i& other); + static void staticCtor(); + static Vec3* ZERO; Vec3 operator=(Vec3 o); @@ -29,15 +39,30 @@ class Vec3 { Vec3 operator/(Vec3 o) { return Vec3(m_x / o.m_x, m_y / o.m_y, m_z / o.m_z); } static Vec3* newPermanent(double, double, double); + static Vec3* newPermanent(const Vec3* other); - Vec3 yRot(float); + Vec3* xRot(float); + Vec3* yRot(float); + Vec3* zRot(float); double dot(Vec3* rhs); double length(); - void set(double x, double y, double z); + double lengthSqr(); + Vec3* set(double x, double y, double z); static void resetPool(); double distanceTo(AABB* aabb); + double distanceTo(Vec3* other); + double distanceToSqr(Vec3* other); + Vec3* subtract(Vec3* other); Vec3* subtract(double, double, double); Vec3* add(double, double, double); + Vec3* add(Vec3* other); + Vec3* vectorTo(Vec3* other); + Vec3* cross(Vec3* other); + Vec3* lerp(Vec3* other, double weight); + bool equals(Vec3* other); + Vec3* getIntermediateWithXValue(Vec3* other, double x); + Vec3* getIntermediateWithYValue(Vec3* other, double y); + Vec3* getIntermediateWithZValue(Vec3* other, double z); Vec3* normalize(); Vec3* scale(double); diff --git a/src/Minecraft.World/net/minecraft/world/stats/Achievement.cpp b/src/Minecraft.World/net/minecraft/world/stats/Achievement.cpp new file mode 100644 index 00000000..4dfaf4e5 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/stats/Achievement.cpp @@ -0,0 +1,50 @@ +#include "net/minecraft/world/stats/Achievement.h" + +#include "AchievementLocalization.h" +#include "net/minecraft/world/item/ItemInstance.h" + +// name guessed +Achievement::Achievement(int id, const std::wstring& name, int x, int y, Item* icon, Achievement* parent) + : Stat(id + 0x500000, std::wstring(L"achievement.").append(name)), m_x(x), m_y(y), m_parent(parent), + m_description(achievementDescription(std::wstring(L"achievement.").append(name).append(L".desc"))), + m_icon(new ItemInstance(icon)) {} +// name guessed +Achievement::Achievement(int id, const std::wstring& name, int x, int y, Block* icon, Achievement* parent) + : Stat(id + 0x500000, std::wstring(L"achievement.").append(name)), m_x(x), m_y(y), m_parent(parent), + m_description(achievementDescription(std::wstring(L"achievement.").append(name).append(L".desc"))), + m_icon(new ItemInstance(icon)) {} +Achievement::~Achievement() {} +// name guessed +Achievement* Achievement::setFlag() { + m_flag = true; + return this; +} +// name guessed +Achievement* Achievement::setSpecial() { + m_special = true; + return this; +} +// name guessed +Achievement* Achievement::registerStat(bool addToList) { + Stat::registerStat(addToList); + Achievements::ALL->push_back(this); + return this; +} +// name guessed +bool Achievement::isAchievement() { + return true; +} +// name guessed +Achievement* Achievement::setIndependent() { + Stat::setIndependent(); + return this; +} +// name guessed +int Achievement::getAchievementId() { + return m_id - 0x500000; +} + +// name guessed +std::wstring achievementDescription(const std::wstring&, ...) { + return L""; +} diff --git a/src/Minecraft.World/net/minecraft/world/stats/Achievement.h b/src/Minecraft.World/net/minecraft/world/stats/Achievement.h new file mode 100644 index 00000000..03a6c030 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/stats/Achievement.h @@ -0,0 +1,134 @@ +#pragma once + +#include "net/minecraft/world/stats/Stat.h" +#include "types.h" + +class Item; +class Block; +class ItemInstance; + +class Achievement : public Stat { +public: + Achievement(int, const std::wstring&, int, int, Item*, Achievement*); + Achievement(int, const std::wstring&, int, int, Block*, Achievement*); + ~Achievement() override; + Achievement* setFlag(); + Achievement* setSpecial(); + Achievement* registerStat(bool) override; + bool isAchievement() override; + Achievement* setIndependent(); + int getAchievementId(); + +private: + int m_x, m_y; + Achievement* m_parent; + std::wstring m_description; + void* m_unused96; + not_null_ptr m_icon; + bool m_special; +}; + +class Achievements { +public: + static void staticCtor(); + static std::vector* ALL; + static Achievement* OPEN_INVENTORY; + static Achievement* MINE_WOOD; + static Achievement* BUILD_WORK_BENCH; + static Achievement* BUILD_PICKAXE; + static Achievement* BUILD_FURNACE; + static Achievement* ACQUIRE_IRON; + static Achievement* BUILD_HOE; + static Achievement* MAKE_BREAD; + static Achievement* BAKE_CAKE; + static Achievement* BUILD_BETTER_PICKAXE; + static Achievement* COOK_FISH; + static Achievement* ON_ARAIL; + static Achievement* BUILD_SWORD; + static Achievement* KILL_ENEMY; + static Achievement* KILL_COW; + static Achievement* FLY_PIG; + static Achievement* LEADER_OF_THE_PACK; + static Achievement* MOARTOOLS; + static Achievement* DISPENSE_WITH_THIS; + static Achievement* IN_TO_THE_NETHER; + static Achievement* MINE100_BLOCKS; + static Achievement* KILL10_CREEPERS; + static Achievement* EAT_PORK_CHOP; + static Achievement* PLAY100_DAYS; + static Achievement* ARROW_KILL_CREEPER; + static Achievement* SOCIAL_POST; + static Achievement* SNIPE_SKELETON; + static Achievement* DIAMONDS; + static Achievement* GHAST; + static Achievement* BLAZE_ROD; + static Achievement* POTION; + static Achievement* THE_END; + static Achievement* THE_END2; + static Achievement* ENCHANTMENTS; + static Achievement* OVERKILL; + static Achievement* BOOKCASE; + static Achievement* ADVENTURING_TIME; + static Achievement* REPOPULATION; + static Achievement* DIAMONDS_TO_YOU; + static Achievement* THE_HAGGLER; + static Achievement* POT_PLANTER; + static Achievement* ITS_ASIGN; + static Achievement* IRON_BELLY; + static Achievement* HAVE_ASHEARFUL_DAY; + static Achievement* RAINBOW_COLLECTION; + static Achievement* STAYING_FROSTY; + static Achievement* CHESTFUL_OF_COBBLESTONE; + static Achievement* RENEWABLE_ENERGY; + static Achievement* MUSIC_TO_MY_EARS; + static Achievement* BODY_GUARD; + static Achievement* IRON_MAN; + static Achievement* ZOMBIE_DOCTOR; + static Achievement* LION_TAMER; + static Achievement* SPAWN_WITHER; + static Achievement* KILL_WITHER; + static Achievement* FULL_BEACON; + static Achievement* OVERPOWERED; + static Achievement* THE_DYE_OUTFIT; + static Achievement* TRAMPOLINE; + static Achievement* THE_STUDENT; + static Achievement* HAS_BECOME_THE_MASTER; + static Achievement* TIS_BUT_ASCRATCH; + static Achievement* CUPID; + static Achievement* YOU_WONT_LIKE_ME_WHEN_IM_HUNGRY; + static Achievement* MINE; + static Achievement* THE_END_AGAIN; + static Achievement* YOU_NEED_AMINT; + static Achievement* SUPER_SONIC; + static Achievement* DRY_SPELL; + static Achievement* FREE_DIVER; + static Achievement* SUPER_FUEL; + static Achievement* SADDLE_UP; + static Achievement* TASTE_OF_YOUR_OWN_MEDICINE; + static Achievement* BEAM_ME_UP; + static Achievement* MAP_ROOM; + static Achievement* CAMOUFLAGE; + static Achievement* BACK_FROM_THE_DEAD; + static Achievement* EQUIP_YOUR_FISTS; + static Achievement* TENACIOUS_BALL; + static Achievement* DEADSHOT; + static Achievement* SUCK_MY_SNOWBALLS; + static Achievement* MOUNTAIN_TOP; + static Achievement* WILL_LIKE_NO_OTHER; + static Achievement* THE_DEEP_END; + static Achievement* GREAT_VIEW_FROM_UP_HERE; + static Achievement* CHANGE_OF_SHEETS; + static Achievement* CHEATING_DEATH; + static Achievement* SO_IGOT_THAT_GOING_FOR_ME; + static Achievement* LET_IT_GO; + static Achievement* FEELING_ILL; + static Achievement* RABBIT_SEASON; + static Achievement* ORGANIZATIONAL_WIZARD; + static Achievement* GLIDER; + static Achievement* PILOT; + static Achievement* GO_GREEN; + static Achievement* GO_YELLOW; + static Achievement* GO_BLUE; + static Achievement* REPOPULATION_ALIAS; + static Achievement* ADVENTURING_TIME_ALIAS; +}; diff --git a/src/Minecraft.World/net/minecraft/world/stats/AchievementLocalization.h b/src/Minecraft.World/net/minecraft/world/stats/AchievementLocalization.h new file mode 100644 index 00000000..410cd18d --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/stats/AchievementLocalization.h @@ -0,0 +1,6 @@ +#pragma once + +#include + +// name guessed: the original helper, which returns an empty string. +std::wstring achievementDescription(const std::wstring&, ...); diff --git a/src/Minecraft.World/net/minecraft/world/stats/Achievements.cpp b/src/Minecraft.World/net/minecraft/world/stats/Achievements.cpp new file mode 100644 index 00000000..a76e9b0d --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/stats/Achievements.cpp @@ -0,0 +1,387 @@ +#include "net/minecraft/world/item/BowItem.h" +#include "net/minecraft/world/item/Items.h" +#include "net/minecraft/world/level/block/Blocks.h" +#include "net/minecraft/world/stats/Achievement.h" + +std::vector* Achievements::ALL = new std::vector; // name guessed +Achievement* Achievements::OPEN_INVENTORY; +Achievement* Achievements::MINE_WOOD; +Achievement* Achievements::BUILD_WORK_BENCH; // name guessed +Achievement* Achievements::BUILD_PICKAXE; +Achievement* Achievements::BUILD_FURNACE; +Achievement* Achievements::ACQUIRE_IRON; // name guessed +Achievement* Achievements::BUILD_HOE; +Achievement* Achievements::MAKE_BREAD; +Achievement* Achievements::BAKE_CAKE; // name guessed +Achievement* Achievements::BUILD_BETTER_PICKAXE; +Achievement* Achievements::COOK_FISH; +Achievement* Achievements::ON_ARAIL; // name guessed +Achievement* Achievements::BUILD_SWORD; +Achievement* Achievements::KILL_ENEMY; +Achievement* Achievements::KILL_COW; // name guessed +Achievement* Achievements::FLY_PIG; +Achievement* Achievements::LEADER_OF_THE_PACK; +Achievement* Achievements::MOARTOOLS; // name guessed +Achievement* Achievements::DISPENSE_WITH_THIS; +Achievement* Achievements::IN_TO_THE_NETHER; +Achievement* Achievements::MINE100_BLOCKS; // name guessed +Achievement* Achievements::KILL10_CREEPERS; +Achievement* Achievements::EAT_PORK_CHOP; +Achievement* Achievements::PLAY100_DAYS; // name guessed +Achievement* Achievements::ARROW_KILL_CREEPER; +Achievement* Achievements::SOCIAL_POST; +Achievement* Achievements::SNIPE_SKELETON; // name guessed +Achievement* Achievements::DIAMONDS; +Achievement* Achievements::GHAST; +Achievement* Achievements::BLAZE_ROD; // name guessed +Achievement* Achievements::POTION; +Achievement* Achievements::THE_END; +Achievement* Achievements::THE_END2; // name guessed +Achievement* Achievements::ENCHANTMENTS; +Achievement* Achievements::OVERKILL; +Achievement* Achievements::BOOKCASE; // name guessed +Achievement* Achievements::ADVENTURING_TIME; +Achievement* Achievements::REPOPULATION; +Achievement* Achievements::DIAMONDS_TO_YOU; // name guessed +Achievement* Achievements::THE_HAGGLER; +Achievement* Achievements::POT_PLANTER; +Achievement* Achievements::ITS_ASIGN; // name guessed +Achievement* Achievements::IRON_BELLY; +Achievement* Achievements::HAVE_ASHEARFUL_DAY; +Achievement* Achievements::RAINBOW_COLLECTION; // name guessed +Achievement* Achievements::STAYING_FROSTY; +Achievement* Achievements::CHESTFUL_OF_COBBLESTONE; +Achievement* Achievements::RENEWABLE_ENERGY; // name guessed +Achievement* Achievements::MUSIC_TO_MY_EARS; +Achievement* Achievements::BODY_GUARD; +Achievement* Achievements::IRON_MAN; // name guessed +Achievement* Achievements::ZOMBIE_DOCTOR; +Achievement* Achievements::LION_TAMER; +Achievement* Achievements::SPAWN_WITHER; // name guessed +Achievement* Achievements::KILL_WITHER; +Achievement* Achievements::FULL_BEACON; +Achievement* Achievements::OVERPOWERED; // name guessed +Achievement* Achievements::THE_DYE_OUTFIT; +Achievement* Achievements::TRAMPOLINE; +Achievement* Achievements::THE_STUDENT; // name guessed +Achievement* Achievements::HAS_BECOME_THE_MASTER; +Achievement* Achievements::TIS_BUT_ASCRATCH; +Achievement* Achievements::CUPID; // name guessed +Achievement* Achievements::YOU_WONT_LIKE_ME_WHEN_IM_HUNGRY; +Achievement* Achievements::MINE; +Achievement* Achievements::THE_END_AGAIN; // name guessed +Achievement* Achievements::YOU_NEED_AMINT; +Achievement* Achievements::SUPER_SONIC; +Achievement* Achievements::DRY_SPELL; // name guessed +Achievement* Achievements::FREE_DIVER; +Achievement* Achievements::SUPER_FUEL; +Achievement* Achievements::SADDLE_UP; // name guessed +Achievement* Achievements::TASTE_OF_YOUR_OWN_MEDICINE; +Achievement* Achievements::BEAM_ME_UP; +Achievement* Achievements::MAP_ROOM; // name guessed +Achievement* Achievements::CAMOUFLAGE; +Achievement* Achievements::BACK_FROM_THE_DEAD; +Achievement* Achievements::EQUIP_YOUR_FISTS; // name guessed +Achievement* Achievements::TENACIOUS_BALL; +Achievement* Achievements::DEADSHOT; +Achievement* Achievements::SUCK_MY_SNOWBALLS; // name guessed +Achievement* Achievements::MOUNTAIN_TOP; +Achievement* Achievements::WILL_LIKE_NO_OTHER; +Achievement* Achievements::THE_DEEP_END; // name guessed +Achievement* Achievements::GREAT_VIEW_FROM_UP_HERE; +Achievement* Achievements::CHANGE_OF_SHEETS; +Achievement* Achievements::CHEATING_DEATH; // name guessed +Achievement* Achievements::SO_IGOT_THAT_GOING_FOR_ME; +Achievement* Achievements::LET_IT_GO; +Achievement* Achievements::FEELING_ILL; // name guessed +Achievement* Achievements::RABBIT_SEASON; +Achievement* Achievements::ORGANIZATIONAL_WIZARD; +Achievement* Achievements::GLIDER; // name guessed +Achievement* Achievements::PILOT; +Achievement* Achievements::GO_GREEN; +Achievement* Achievements::GO_YELLOW; // name guessed +Achievement* Achievements::GO_BLUE; +Achievement* Achievements::REPOPULATION_ALIAS; +Achievement* Achievements::ADVENTURING_TIME_ALIAS; // name guessed + +// name guessed +void Achievements::staticCtor() { + OPEN_INVENTORY + = (new Achievement(0, L"openInventory", 0, 0, Items::BOOK, nullptr))->setFlag()->registerStat(true); + MINE_WOOD = (new Achievement(1, L"mineWood", 2, 1, Blocks::LOG, OPEN_INVENTORY))->registerStat(true); + BUILD_WORK_BENCH = (new Achievement(2, L"buildWorkBench", 4, -1, Blocks::CRAFTING_TABLE, MINE_WOOD)) + ->registerStat(true); + BUILD_PICKAXE = (new Achievement(3, L"buildPickaxe", 4, 2, Items::WOODEN_PICKAXE, BUILD_WORK_BENCH)) + ->registerStat(true); + BUILD_FURNACE + = (new Achievement(4, L"buildFurnace", 3, 4, Blocks::FURNACE, BUILD_PICKAXE))->registerStat(true); + ACQUIRE_IRON + = (new Achievement(5, L"acquireIron", 1, 4, Items::IRON_INGOT, BUILD_FURNACE))->registerStat(true); + BUILD_HOE + = (new Achievement(6, L"buildHoe", 2, -3, Items::WOODEN_HOE, BUILD_WORK_BENCH))->registerStat(true); + MAKE_BREAD = (new Achievement(7, L"makeBread", -1, -3, Items::BREAD, BUILD_HOE))->registerStat(true); + BAKE_CAKE = (new Achievement(8, L"bakeCake", 0, -5, Items::CAKE, BUILD_HOE))->registerStat(true); + BUILD_BETTER_PICKAXE + = (new Achievement(9, L"buildBetterPickaxe", 6, 2, Items::STONE_PICKAXE, BUILD_PICKAXE)) + ->registerStat(true); + COOK_FISH + = (new Achievement(10, L"cookFish", 2, 6, Items::COOKED_FISH, BUILD_FURNACE))->registerStat(true); + ON_ARAIL = (new Achievement(11, L"onARail", 2, 3, Blocks::RAIL, ACQUIRE_IRON)) + ->setSpecial() + ->registerStat(true); + BUILD_SWORD = (new Achievement(12, L"buildSword", 6, -1, Items::WOODEN_SWORD, BUILD_WORK_BENCH)) + ->registerStat(true); + KILL_ENEMY = (new Achievement(13, L"killEnemy", 8, -1, Items::BONE, BUILD_SWORD))->registerStat(true); + KILL_COW = (new Achievement(14, L"killCow", 7, -3, Items::LEATHER, BUILD_SWORD))->registerStat(true); + FLY_PIG + = (new Achievement(15, L"flyPig", 8, -4, Items::SADDLE, KILL_COW))->setSpecial()->registerStat(true); + LEADER_OF_THE_PACK = (new Achievement(16, L"leaderOfThePack", 0, 0, Blocks::LOG, BUILD_SWORD)) + ->setFlag() + ->registerStat(true); + MOARTOOLS + = (new Achievement(17, L"MOARTools", 0, 0, Blocks::LOG, BUILD_SWORD))->setFlag()->registerStat(true); + DISPENSE_WITH_THIS + = (new Achievement(18, L"dispenseWithThis", 0, 0, Blocks::LOG, BUILD_SWORD))->registerStat(true); + IN_TO_THE_NETHER + = (new Achievement(19, L"InToTheNether", 0, 0, Blocks::LOG, BUILD_SWORD))->registerStat(true); + MINE100_BLOCKS = (new Achievement(20, L"mine100Blocks", 0, 0, Blocks::LOG, BUILD_SWORD)) + ->setFlag() + ->registerStat(true); + KILL10_CREEPERS = (new Achievement(21, L"kill10Creepers", 0, 0, Blocks::LOG, BUILD_SWORD)) + ->setFlag() + ->registerStat(true); + EAT_PORK_CHOP = (new Achievement(22, L"eatPorkChop", 0, 0, Blocks::LOG, BUILD_SWORD)) + ->setFlag() + ->registerStat(true); + PLAY100_DAYS = (new Achievement(23, L"play100Days", 0, 0, Blocks::LOG, BUILD_SWORD)) + ->setFlag() + ->registerStat(true); + ARROW_KILL_CREEPER + = (new Achievement(24, L"arrowKillCreeper", 0, 0, Blocks::LOG, BUILD_SWORD))->registerStat(true); + SOCIAL_POST = (new Achievement(25, L"socialPost", 0, 0, Blocks::LOG, BUILD_SWORD))->registerStat(true); + SNIPE_SKELETON = (new Achievement(26, L"snipeSkeleton", 7, 0, Items::BOW, KILL_ENEMY)) + ->setSpecial() + ->registerStat(true) + ->setIndependent(); + DIAMONDS = (new Achievement(27, L"diamonds", -1, 5, Items::DIAMOND, ACQUIRE_IRON)) + ->registerStat(true) + ->setIndependent(); + GHAST = (new Achievement(29, L"ghast", -4, 8, Items::GHAST_TEAR, GHAST)) + ->setSpecial() + ->registerStat(true) + ->setIndependent(); + BLAZE_ROD = (new Achievement(30, L"blazeRod", 0, 9, Items::BLAZE_ROD, BLAZE_ROD)) + ->registerStat(true) + ->setIndependent(); + POTION + = (new Achievement(31, L"potion", 2, 8, Items::POTION, POTION))->registerStat(true)->setIndependent(); + THE_END = (new Achievement(32, L"theEnd", 3, 10, Items::ENDER_EYE, THE_END)) + ->setSpecial() + ->registerStat(true) + ->setIndependent(); + THE_END2 = (new Achievement(33, L"theEnd2", 4, 13, Blocks::DRAGON_EGG, THE_END2)) + ->setSpecial() + ->registerStat(true) + ->setIndependent(); + ENCHANTMENTS = (new Achievement(34, L"enchantments", -4, 4, Blocks::ENCHANTING_TABLE, ENCHANTMENTS)) + ->registerStat(true) + ->setIndependent(); + OVERKILL = (new Achievement(35, L"overkill", -4, 1, Items::DIAMOND_SWORD, ENCHANTMENTS)) + ->setSpecial() + ->registerStat(true) + ->setIndependent(); + BOOKCASE = (new Achievement(36, L"bookcase", -3, 6, Blocks::BOOKSHELF, ENCHANTMENTS)) + ->registerStat(true) + ->setIndependent(); + ADVENTURING_TIME = (new Achievement(37, L"adventuringTime", 0, 0, Blocks::BOOKSHELF, nullptr)) + ->setFlag() + ->registerStat(true) + ->setIndependent(); + REPOPULATION = (new Achievement(38, L"repopulation", 0, 0, Blocks::BOOKSHELF, nullptr)) + ->registerStat(true) + ->setIndependent(); + DIAMONDS_TO_YOU = (new Achievement(39, L"diamondsToYou", 0, 0, Blocks::BOOKSHELF, nullptr)) + ->registerStat(true) + ->setIndependent(); + THE_HAGGLER = (new Achievement(40, L"theHaggler", 0, 0, Blocks::BOOKSHELF, nullptr)) + ->setFlag() + ->registerStat(true) + ->setIndependent(); + POT_PLANTER = (new Achievement(41, L"potPlanter", 0, 0, Blocks::BOOKSHELF, nullptr)) + ->setFlag() + ->registerStat(true) + ->setIndependent(); + ITS_ASIGN = (new Achievement(42, L"itsASign", 0, 0, Blocks::BOOKSHELF, nullptr)) + ->setFlag() + ->registerStat(true) + ->setIndependent(); + IRON_BELLY = (new Achievement(43, L"ironBelly", 0, 0, Blocks::BOOKSHELF, nullptr)) + ->registerStat(true) + ->setIndependent(); + HAVE_ASHEARFUL_DAY = (new Achievement(44, L"haveAShearfulDay", 0, 0, Blocks::BOOKSHELF, nullptr)) + ->registerStat(true) + ->setIndependent(); + RAINBOW_COLLECTION = (new Achievement(45, L"rainbowCollection", 0, 0, Blocks::BOOKSHELF, nullptr)) + ->setFlag() + ->registerStat(true) + ->setIndependent(); + STAYING_FROSTY = (new Achievement(46, L"stayingFrosty", 0, 0, Blocks::BOOKSHELF, nullptr)) + ->registerStat(true) + ->setIndependent(); + CHESTFUL_OF_COBBLESTONE + = (new Achievement(47, L"chestfulOfCobblestone", 0, 0, Blocks::BOOKSHELF, nullptr)) + ->setFlag() + ->registerStat(true) + ->setIndependent(); + RENEWABLE_ENERGY = (new Achievement(48, L"renewableEnergy", 0, 0, Blocks::BOOKSHELF, nullptr)) + ->registerStat(true) + ->setIndependent(); + MUSIC_TO_MY_EARS = (new Achievement(49, L"musicToMyEars", 0, 0, Blocks::BOOKSHELF, nullptr)) + ->registerStat(true) + ->setIndependent(); + BODY_GUARD = (new Achievement(50, L"bodyGuard", 0, 0, Blocks::BOOKSHELF, nullptr)) + ->registerStat(true) + ->setIndependent(); + IRON_MAN = (new Achievement(51, L"ironMan", 0, 0, Blocks::BOOKSHELF, nullptr)) + ->setFlag() + ->registerStat(true) + ->setIndependent(); + ZOMBIE_DOCTOR = (new Achievement(52, L"zombieDoctor", 0, 0, Blocks::BOOKSHELF, nullptr)) + ->registerStat(true) + ->setIndependent(); + LION_TAMER = (new Achievement(53, L"lionTamer", 0, 0, Blocks::BOOKSHELF, nullptr)) + ->registerStat(true) + ->setIndependent(); + REPOPULATION_ALIAS = REPOPULATION; + SPAWN_WITHER = (new Achievement(54, L"spawnWither", 0, 0, Blocks::BOOKSHELF, nullptr)) + ->registerStat(true) + ->setIndependent(); + KILL_WITHER = (new Achievement(55, L"killWither", 0, 0, Blocks::BOOKSHELF, SPAWN_WITHER)) + ->registerStat(true) + ->setIndependent(); + FULL_BEACON = (new Achievement(56, L"fullBeacon", 0, 0, Blocks::BOOKSHELF, KILL_WITHER)) + ->registerStat(true) + ->setIndependent(); + ADVENTURING_TIME_ALIAS = ADVENTURING_TIME; + OVERPOWERED = (new Achievement(57, L"overpowered", 0, 0, Blocks::BOOKSHELF, BUILD_BETTER_PICKAXE)) + ->registerStat(true) + ->setIndependent(); + THE_DYE_OUTFIT = (new Achievement(58, L"theDyeOutfit", 0, 0, Blocks::BOOKSHELF, nullptr)) + ->setFlag() + ->registerStat(true) + ->setIndependent(); + TRAMPOLINE = (new Achievement(59, L"trampoline", 0, 0, Blocks::BOOKSHELF, nullptr)) + ->setFlag() + ->registerStat(true) + ->setIndependent(); + THE_STUDENT = (new Achievement(60, L"theStudent", 0, 0, Blocks::LOG, nullptr)) + ->setFlag() + ->registerStat(true) + ->setIndependent(); + HAS_BECOME_THE_MASTER = (new Achievement(61, L"hasBecomeTheMaster", 0, 0, Blocks::LOG, nullptr)) + ->setFlag() + ->registerStat(true) + ->setIndependent(); + TIS_BUT_ASCRATCH = (new Achievement(62, L"tisButAScratch", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + CUPID = (new Achievement(63, L"cupid", 0, 0, Blocks::LOG, nullptr))->registerStat(true)->setIndependent(); + YOU_WONT_LIKE_ME_WHEN_IM_HUNGRY + = (new Achievement(64, L"youWontLikeMeWhenImHungry,", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + MINE = (new Achievement(65, L"mine,", 0, 0, Blocks::LOG, nullptr))->registerStat(true)->setIndependent(); + THE_END_AGAIN = (new Achievement(66, L"theEndAgain", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + YOU_NEED_AMINT = (new Achievement(67, L"youNeedAMint", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + SUPER_SONIC = (new Achievement(68, L"superSonic", 0, 0, Blocks::LOG, nullptr)) + ->setFlag() + ->registerStat(true) + ->setIndependent(); + DRY_SPELL = (new Achievement(69, L"drySpell", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + FREE_DIVER = (new Achievement(70, L"freeDiver", 0, 0, Blocks::LOG, nullptr)) + ->setFlag() + ->registerStat(true) + ->setIndependent(); + SUPER_FUEL = (new Achievement(71, L"superFuel", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + SADDLE_UP = (new Achievement(72, L"saddleUp", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + TASTE_OF_YOUR_OWN_MEDICINE = (new Achievement(73, L"tasteOfYourOwnMedicine", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + BEAM_ME_UP = (new Achievement(74, L"beamMeUp", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + MAP_ROOM + = (new Achievement(75, L"mapRoom", 0, 0, Blocks::LOG, nullptr))->registerStat(true)->setIndependent(); + CAMOUFLAGE = (new Achievement(76, L"camouflage", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + BACK_FROM_THE_DEAD = (new Achievement(77, L"backFromTheDead", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + EQUIP_YOUR_FISTS = (new Achievement(78, L"equipYourFists", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + TENACIOUS_BALL = (new Achievement(79, L"tenaciousBall", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + DEADSHOT = (new Achievement(80, L"deadshot", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + SUCK_MY_SNOWBALLS = (new Achievement(81, L"suckMySnowballs", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + MOUNTAIN_TOP = (new Achievement(82, L"mountainTop", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + WILL_LIKE_NO_OTHER = (new Achievement(83, L"willLikeNoOther", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + THE_DEEP_END = (new Achievement(84, L"theDeepEnd", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + GREAT_VIEW_FROM_UP_HERE = (new Achievement(85, L"greatViewFromUpHere", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + CHANGE_OF_SHEETS = (new Achievement(86, L"changeOfSheets", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + CHEATING_DEATH = (new Achievement(87, L"cheatingDeath", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + SO_IGOT_THAT_GOING_FOR_ME = (new Achievement(88, L"soIGotThatGoingForMe", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + LET_IT_GO = (new Achievement(89, L"letItGo", 0, 0, Blocks::LOG, nullptr)) + ->setFlag() + ->registerStat(true) + ->setIndependent(); + FEELING_ILL = (new Achievement(90, L"feelingIll", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + RABBIT_SEASON = (new Achievement(91, L"rabbitSeason", 0, 0, Blocks::LOG, BUILD_SWORD)) + ->setFlag() + ->registerStat(true); + ORGANIZATIONAL_WIZARD = (new Achievement(92, L"organizationalWizard", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + GLIDER + = (new Achievement(93, L"glider", 0, 0, Blocks::LOG, nullptr))->registerStat(true)->setIndependent(); + PILOT = (new Achievement(94, L"pilot", 0, 0, Blocks::LOG, nullptr))->registerStat(true)->setIndependent(); + GO_GREEN + = (new Achievement(95, L"goGreen", 0, 0, Blocks::LOG, nullptr))->registerStat(true)->setIndependent(); + GO_YELLOW = (new Achievement(96, L"goYellow", 0, 0, Blocks::LOG, nullptr)) + ->registerStat(true) + ->setIndependent(); + GO_BLUE + = (new Achievement(97, L"goBlue", 0, 0, Blocks::LOG, nullptr))->registerStat(true)->setIndependent(); +} diff --git a/src/Minecraft.World/net/minecraft/world/stats/GenericStats.cpp b/src/Minecraft.World/net/minecraft/world/stats/GenericStats.cpp index a572e8f3..3aaab421 100644 --- a/src/Minecraft.World/net/minecraft/world/stats/GenericStats.cpp +++ b/src/Minecraft.World/net/minecraft/world/stats/GenericStats.cpp @@ -1,5 +1,14 @@ #include "net/minecraft/world/stats/GenericStats.h" +#include "net/minecraft/world/item/ItemInstance.h" + +arrayWithLength GenericStats::param_itemsUsed(std::shared_ptr player, + not_null_ptr item) { + if (!player || item->isEmpty()) + return sInstance->getParam_noArgs(); + return sInstance->getParam_itemsUsed(player, item); +} + Stat* GenericStats::get_achievement(eAward) { return nullptr; } @@ -140,6 +149,7 @@ Stat* GenericStats::get_itemsBought(int) { return nullptr; } +// name guessed Stat* GenericStats::get_armourDyed(int) { return nullptr; } @@ -192,7 +202,7 @@ arrayWithLength GenericStats::getParam_climbOneM(int) { return getParam_noArgs(); } -arrayWithLength GenericStats::getParam_inecartOneM(int) { +arrayWithLength GenericStats::getParam_minecartOneM(int) { return getParam_noArgs(); } @@ -237,8 +247,8 @@ arrayWithLength GenericStats::getParam_itemsBought(int, int, int) return getParam_noArgs(); } -arrayWithLength GenericStats::getParam_obKill(std::shared_ptr, std::shared_ptr, - DamageSource*) { +arrayWithLength GenericStats::getParam_mobKill(std::shared_ptr, std::shared_ptr, + DamageSource*) { return getParam_noArgs(); } @@ -294,7 +304,7 @@ arrayWithLength GenericStats::getParam_chestfulOfCobblestone(int) return getParam_achievement(eAward_CHESTFUL_OF_COBBLESTONE); } -arrayWithLength GenericStats::getParam_usicToMyEars(int) { +arrayWithLength GenericStats::getParam_musicToMyEars(int) { return getParam_achievement(eAward_MUSIC_TO_MY_EARS); } @@ -366,7 +376,7 @@ arrayWithLength GenericStats::getParam_youWontLikeMeWhenImHungry( return getParam_achievement(eAward_YOU_WONT_LIKE_ME_WHEN_IM_HUNGRY); } -arrayWithLength GenericStats::getParam_ine() { +arrayWithLength GenericStats::getParam_mine() { return getParam_achievement(eAward_MINE); } @@ -382,7 +392,7 @@ arrayWithLength GenericStats::getParam_beamMeUp(int) { return getParam_achievement(eAward_BEAM_ME_UP); } -arrayWithLength GenericStats::getParam_apRoom(int) { +arrayWithLength GenericStats::getParam_mapRoom(int) { return getParam_achievement(eAward_MAP_ROOM); } @@ -738,7 +748,7 @@ arrayWithLength GenericStats::param_buildHoe() { return sInstance->getParam_achievement(eAward_BUILD_HOE); } -arrayWithLength GenericStats::param_akeBread() { +arrayWithLength GenericStats::param_makeBread() { return sInstance->getParam_achievement(eAward_MAKE_BREAD); } @@ -830,7 +840,7 @@ arrayWithLength GenericStats::param_deadshot() { return sInstance->getParam_achievement(eAward_DEADSHOT); } -arrayWithLength GenericStats::param_ountainTop() { +arrayWithLength GenericStats::param_mountainTop() { return sInstance->getParam_achievement(eAward_MOUNTAIN_TOP); } diff --git a/src/Minecraft.World/net/minecraft/world/stats/GenericStats.h b/src/Minecraft.World/net/minecraft/world/stats/GenericStats.h index 943f40f2..26d8bbb2 100644 --- a/src/Minecraft.World/net/minecraft/world/stats/GenericStats.h +++ b/src/Minecraft.World/net/minecraft/world/stats/GenericStats.h @@ -72,7 +72,7 @@ class GenericStats { virtual arrayWithLength getParam_swimOneM(int); virtual arrayWithLength getParam_fallOneM(int); virtual arrayWithLength getParam_climbOneM(int); - virtual arrayWithLength getParam_inecartOneM(int); + virtual arrayWithLength getParam_minecartOneM(int); virtual arrayWithLength getParam_boatOneM(int); virtual arrayWithLength getParam_pigOneM(int); virtual arrayWithLength getParam_cowsMilked(); @@ -84,8 +84,8 @@ class GenericStats { virtual arrayWithLength getParam_itemsUsed(std::shared_ptr, not_null_ptr); virtual arrayWithLength getParam_itemsBought(int, int, int); - virtual arrayWithLength getParam_obKill(std::shared_ptr, std::shared_ptr, - DamageSource*); + virtual arrayWithLength getParam_mobKill(std::shared_ptr, std::shared_ptr, + DamageSource*); virtual arrayWithLength getParam_breedEntity(eINSTANCEOF); virtual arrayWithLength getParam_tamedEntity(eINSTANCEOF); virtual arrayWithLength getParam_curedEntity(eINSTANCEOF); @@ -99,7 +99,7 @@ class GenericStats { virtual arrayWithLength getParam_overkill(int); virtual arrayWithLength getParam_openInventory(int); virtual arrayWithLength getParam_chestfulOfCobblestone(int); - virtual arrayWithLength getParam_usicToMyEars(int); + virtual arrayWithLength getParam_musicToMyEars(int); virtual arrayWithLength getParam_MG03Score(int); virtual arrayWithLength getParam_MG03RingCount(int); virtual arrayWithLength getParam_MG03BestTime(unsigned int); @@ -117,11 +117,11 @@ class GenericStats { virtual arrayWithLength getParam_tisButAScratch(); virtual arrayWithLength getParam_cupid(); virtual arrayWithLength getParam_youWontLikeMeWhenImHungry(); - virtual arrayWithLength getParam_ine(); + virtual arrayWithLength getParam_mine(); virtual arrayWithLength getParam_superSonic(int); virtual arrayWithLength getParam_freeDiver(int); virtual arrayWithLength getParam_beamMeUp(int); - virtual arrayWithLength getParam_apRoom(int); + virtual arrayWithLength getParam_mapRoom(int); virtual arrayWithLength getParam_tenaciousBall(int); virtual arrayWithLength getParam_suckMySnowballs(int); virtual arrayWithLength getParam_greatViewFromUpHere(int); @@ -217,7 +217,7 @@ class GenericStats { static arrayWithLength param_buildPickaxe(); static arrayWithLength param_buildFurnace(); static arrayWithLength param_buildHoe(); - static arrayWithLength param_akeBread(); + static arrayWithLength param_makeBread(); static arrayWithLength param_bakeCake(); static arrayWithLength param_buildBetterPickaxe(); static arrayWithLength param_onARail(int); @@ -240,7 +240,7 @@ class GenericStats { static arrayWithLength param_backFromTheDead(); static arrayWithLength param_equipYourFists(); static arrayWithLength param_deadshot(); - static arrayWithLength param_ountainTop(); + static arrayWithLength param_mountainTop(); static arrayWithLength param_willLikeNoOther(); static arrayWithLength param_changeOfSheets(); static arrayWithLength param_adventuringTime(); diff --git a/src/Minecraft.World/net/minecraft/world/stats/Stat.cpp b/src/Minecraft.World/net/minecraft/world/stats/Stat.cpp new file mode 100644 index 00000000..6f7571e5 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/stats/Stat.cpp @@ -0,0 +1,73 @@ +#include "net/minecraft/world/stats/Stat.h" + +Stat::Formatter* Stat::DEFAULT_FORMAT; // name guessed +std::vector* Stat::ALL_STATS = new std::vector; +std::unordered_map* Stat::BY_ID = new std::unordered_map; + +// name guessed +Stat::Stat(int id, const std::wstring& name, Formatter* formatter) + : m_id(id), m_name(name), m_formatter(formatter) { + initializeFlags(); +} +// name guessed +Stat::Stat(int id, const std::wstring& name) : m_id(id), m_name(name), m_formatter(DEFAULT_FORMAT) { + initializeFlags(); +} +// name guessed +Stat::~Stat() {} +// name guessed +void Stat::initializeFlags() { + m_flag = false; + m_flagWord = 0; +} +// name guessed +Stat* Stat::setFlag() { + m_flag = true; + return this; +} +// name guessed +Stat* Stat::registerStat(bool addToList) { + if (addToList) + ALL_STATS->push_back(this); + std::pair value(m_id, this); + BY_ID->insert(value); + return this; +} +// name guessed +bool Stat::isAchievement() { + return false; +} +// name guessed +void Stat::setIndependent() { + m_independent = true; +} +// name guessed +bool Stat::getFlag1() { + return m_flag1; +} +// name guessed +bool Stat::getFlag2() { + return m_flag2; +} +// name guessed +bool Stat::getFlag0() { + return m_flag0; +} +// name guessed +void Stat::setFlag2(bool value) { + m_flag2 = value; +} +// name guessed +void Stat::setFlag1(bool value) { + m_flag1 = value; +} +// name guessed +void Stat::setFlag0(bool value) { + m_flag0 = value; +} +// name guessed +bool Stat::isFlagClear() { + return !m_flag; +} +// name guessed +void Stat::reservedHook() {} diff --git a/src/Minecraft.World/net/minecraft/world/stats/Stat.h b/src/Minecraft.World/net/minecraft/world/stats/Stat.h new file mode 100644 index 00000000..90d3a488 --- /dev/null +++ b/src/Minecraft.World/net/minecraft/world/stats/Stat.h @@ -0,0 +1,42 @@ +#pragma once + +#include +#include +#include + +class Stat { +public: + class Formatter; + static Formatter* DEFAULT_FORMAT; + static std::vector* ALL_STATS; + static std::unordered_map* BY_ID; + + Stat(int, const std::wstring&, Formatter*); + Stat(int, const std::wstring&); + virtual ~Stat(); + virtual Stat* registerStat(bool); + virtual bool isAchievement(); + virtual bool getFlag1(); + virtual bool getFlag2(); + virtual bool getFlag0(); + virtual void reservedHook(); + void initializeFlags(); + Stat* setFlag(); + void setIndependent(); + void setFlag2(bool); + void setFlag1(bool); + void setFlag0(bool); + bool isFlagClear(); + +protected: + int m_id; + std::wstring m_name; + Formatter* m_formatter; + union { + unsigned int m_flagWord; + struct { + bool m_flag0, m_flag1, m_flag2, m_independent; + }; + }; + bool m_flag; +}; diff --git a/src/types.h b/src/types.h index 8873f9d7..1bcb808b 100644 --- a/src/types.h +++ b/src/types.h @@ -15,7 +15,7 @@ template class not_null_ptr : public std::shared_ptr { public: not_null_ptr() = default; - not_null_ptr(T* ptr); + not_null_ptr(T* ptr) : std::shared_ptr(ptr) {} not_null_ptr(const T& other); };