diff --git a/Minecraft.Client/Common/Audio/SoundNames.cpp b/Minecraft.Client/Common/Audio/SoundNames.cpp index afc3343c..b142e85d 100644 --- a/Minecraft.Client/Common/Audio/SoundNames.cpp +++ b/Minecraft.Client/Common/Audio/SoundNames.cpp @@ -294,9 +294,48 @@ const WCHAR *ConsoleSoundEngine::wchSoundNames[eSoundType_MAX]= L"mob.polarbear.hurt", L"mob.polarbear.death", L"mob.polarbear.step", - L"mob.polarbear.warning" + L"mob.polarbear.warning", + // tu43 + // witch sounds + L"entity.witch.ambient", //eSoundType_ENTITY_WITCH_AMBIENT, + L"entity.witch.hurt", //eSoundType_ENTITY_WITCH_HURT, + L"entity.witch.death", //eSoundType_ENTITY_WITCH_DEATH, + L"entity.witch.throw", //eSoundType_ENTITY_WITCH_THROW, + // squid sounds + L"entity.squid.ambient", //eSoundType_ENTITY_SQUID_AMBIENT, + L"entity.squid.hurt", //eSoundType_ENTITY_SQUID_HURT, + L"entity.squid.death", //eSoundType_ENTITY_SQUID_DEATH, + + // snowman sounds + L"entity.snowman.hurt", //eSoundType_ENTITY_SNOWMAN_HURT, + L"entity.snowman.death", //eSoundType_ENTITY_SNOWMAN_DEATH, + + // armor stand sounds + L"entity.armorstand.break", //eSoundType_ENTITY_ARMORSTAND_BREAK, + L"entity.armorstand.hit", //eSoundType_ENTITY_ARMORSTAND_HIT, + + // cow sounds + L"entity.cow.milk", //eSoundType_ENTITY_COW_MILK, + + // horse sounds + L"entity.horse.eat", // eSoundType_ENTITY_EAT, + + // item frame sounds + L"entity.itemframe.add_item", //eSoundType_ENTITY_ITEMFRAME_ADD_ITEM, + L"entity.itemframe.break", //eSoundType_ENTITY_ITEMFRAME_BREAK, + L"entity.itemframe.place", //eSoundType_ENTITY_ITEMFRAME_PLACE, + L"entity.itemframe.remove_item", //eSoundType_ENTITY_ITEMFRAME_REMOVE_ITEM, + L"entity.itemframe.rotate_item", //eSoundType_ENTITY_ITEMFRAME_ROTATE_ITEM, + + // leash sounds + L"entity.leashknot.break", //eSoundType_ENTITY_LEASHKNOT_BREAK, + L"entity.leashknot.place", //eSoundType_ENTITY_LEASHKNOT_PLACE, + + // painting sounds + L"entity.painting.place", //eSoundType_ENTITY_PAINTING_PLACE, + L"entity.painting.break", //eSoundType_ENTITY_PAINTING_BREAK, }; diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/armorstand/break1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/armorstand/break1.ogg new file mode 100644 index 00000000..157b17d3 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/armorstand/break1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/armorstand/break2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/armorstand/break2.ogg new file mode 100644 index 00000000..b9cfe957 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/armorstand/break2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/armorstand/break3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/armorstand/break3.ogg new file mode 100644 index 00000000..9dac68f7 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/armorstand/break3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/armorstand/break4.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/armorstand/break4.ogg new file mode 100644 index 00000000..6a4261d7 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/armorstand/break4.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/armorstand/hit1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/armorstand/hit1.ogg new file mode 100644 index 00000000..2f077fe8 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/armorstand/hit1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/armorstand/hit2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/armorstand/hit2.ogg new file mode 100644 index 00000000..544713b7 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/armorstand/hit2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/armorstand/hit3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/armorstand/hit3.ogg new file mode 100644 index 00000000..50d410cc Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/armorstand/hit3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/armorstand/hit4.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/armorstand/hit4.ogg new file mode 100644 index 00000000..86ff0f5b Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/armorstand/hit4.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/cow/milk1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/cow/milk1.ogg new file mode 100644 index 00000000..c24d7bfe Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/cow/milk1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/cow/milk2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/cow/milk2.ogg new file mode 100644 index 00000000..9cd31963 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/cow/milk2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/cow/milk3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/cow/milk3.ogg new file mode 100644 index 00000000..92d902fd Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/cow/milk3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/guardian/ambient1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/guardian/ambient1.ogg new file mode 100644 index 00000000..f69a4816 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/guardian/ambient1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/guardian/ambient2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/guardian/ambient2.ogg new file mode 100644 index 00000000..68c5d7ff Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/guardian/ambient2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/guardian/ambient3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/guardian/ambient3.ogg new file mode 100644 index 00000000..fe886531 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/guardian/ambient3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/guardian/ambient4.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/guardian/ambient4.ogg new file mode 100644 index 00000000..d8ab420a Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/guardian/ambient4.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/horse/eat1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/horse/eat1.ogg new file mode 100644 index 00000000..f6024711 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/horse/eat1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/horse/eat2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/horse/eat2.ogg new file mode 100644 index 00000000..fc672fe2 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/horse/eat2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/horse/eat3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/horse/eat3.ogg new file mode 100644 index 00000000..b8c761d9 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/horse/eat3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/horse/eat4.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/horse/eat4.ogg new file mode 100644 index 00000000..1b495872 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/horse/eat4.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/horse/eat5.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/horse/eat5.ogg new file mode 100644 index 00000000..1c8da51e Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/horse/eat5.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/add_item1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/add_item1.ogg new file mode 100644 index 00000000..259a4ed4 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/add_item1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/add_item2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/add_item2.ogg new file mode 100644 index 00000000..3725deb5 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/add_item2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/add_item3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/add_item3.ogg new file mode 100644 index 00000000..8cc965db Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/add_item3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/add_item4.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/add_item4.ogg new file mode 100644 index 00000000..79d15da6 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/add_item4.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/break1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/break1.ogg new file mode 100644 index 00000000..b331fcca Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/break1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/break2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/break2.ogg new file mode 100644 index 00000000..12f6d730 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/break2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/break3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/break3.ogg new file mode 100644 index 00000000..a44343d8 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/break3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/place1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/place1.ogg new file mode 100644 index 00000000..58cd609e Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/place1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/place2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/place2.ogg new file mode 100644 index 00000000..bd5b53b2 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/place2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/place3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/place3.ogg new file mode 100644 index 00000000..ed5d21d7 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/place3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/place4.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/place4.ogg new file mode 100644 index 00000000..9fa8a2be Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/place4.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/remove_item1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/remove_item1.ogg new file mode 100644 index 00000000..36451760 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/remove_item1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/remove_item2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/remove_item2.ogg new file mode 100644 index 00000000..f9e834e2 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/remove_item2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/remove_item3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/remove_item3.ogg new file mode 100644 index 00000000..9b729598 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/remove_item3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/remove_item4.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/remove_item4.ogg new file mode 100644 index 00000000..3dd60a09 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/remove_item4.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/rotate_item1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/rotate_item1.ogg new file mode 100644 index 00000000..197d78a5 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/rotate_item1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/rotate_item2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/rotate_item2.ogg new file mode 100644 index 00000000..391efb8d Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/rotate_item2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/rotate_item3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/rotate_item3.ogg new file mode 100644 index 00000000..bb964a51 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/rotate_item3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/rotate_item4.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/rotate_item4.ogg new file mode 100644 index 00000000..5632717f Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/itemframe/rotate_item4.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/leashknot/break1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/leashknot/break1.ogg new file mode 100644 index 00000000..acbb9412 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/leashknot/break1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/leashknot/break2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/leashknot/break2.ogg new file mode 100644 index 00000000..238314a3 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/leashknot/break2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/leashknot/break3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/leashknot/break3.ogg new file mode 100644 index 00000000..faf0bc06 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/leashknot/break3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/leashknot/place1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/leashknot/place1.ogg new file mode 100644 index 00000000..f5058382 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/leashknot/place1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/leashknot/place2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/leashknot/place2.ogg new file mode 100644 index 00000000..d54853e4 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/leashknot/place2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/leashknot/place3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/leashknot/place3.ogg new file mode 100644 index 00000000..970c687d Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/leashknot/place3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/painting/break1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/painting/break1.ogg new file mode 100644 index 00000000..55bf14ad Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/painting/break1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/painting/break2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/painting/break2.ogg new file mode 100644 index 00000000..37e7dfba Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/painting/break2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/painting/break3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/painting/break3.ogg new file mode 100644 index 00000000..44b0dd02 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/painting/break3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/painting/place1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/painting/place1.ogg new file mode 100644 index 00000000..ea6e9fd6 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/painting/place1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/painting/place2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/painting/place2.ogg new file mode 100644 index 00000000..f7111008 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/painting/place2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/painting/place3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/painting/place3.ogg new file mode 100644 index 00000000..cfd5ecc8 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/painting/place3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/painting/place4.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/painting/place4.ogg new file mode 100644 index 00000000..41a3dd23 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/painting/place4.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/crit1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/crit1.ogg new file mode 100644 index 00000000..98f0c859 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/crit1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/crit2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/crit2.ogg new file mode 100644 index 00000000..80c1da52 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/crit2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/crit3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/crit3.ogg new file mode 100644 index 00000000..cf3ac681 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/crit3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/knockback1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/knockback1.ogg new file mode 100644 index 00000000..50b31194 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/knockback1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/knockback2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/knockback2.ogg new file mode 100644 index 00000000..edc6a7bc Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/knockback2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/knockback3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/knockback3.ogg new file mode 100644 index 00000000..6ad08034 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/knockback3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/knockback4.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/knockback4.ogg new file mode 100644 index 00000000..5ddb6740 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/knockback4.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/strong1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/strong1.ogg new file mode 100644 index 00000000..d91af7fe Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/strong1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/strong2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/strong2.ogg new file mode 100644 index 00000000..a11ec607 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/strong2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/strong3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/strong3.ogg new file mode 100644 index 00000000..2d6bb7ba Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/strong3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/strong4.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/strong4.ogg new file mode 100644 index 00000000..ce6a115c Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/strong4.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/strong5.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/strong5.ogg new file mode 100644 index 00000000..7643da5e Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/strong5.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/strong6.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/strong6.ogg new file mode 100644 index 00000000..bbc4cd50 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/strong6.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/sweep1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/sweep1.ogg new file mode 100644 index 00000000..6ce121fc Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/sweep1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/sweep2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/sweep2.ogg new file mode 100644 index 00000000..b3fa2720 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/sweep2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/sweep3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/sweep3.ogg new file mode 100644 index 00000000..001bde5e Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/sweep3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/sweep4.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/sweep4.ogg new file mode 100644 index 00000000..72078d92 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/sweep4.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/sweep5.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/sweep5.ogg new file mode 100644 index 00000000..f8ade098 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/sweep5.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/sweep6.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/sweep6.ogg new file mode 100644 index 00000000..82a38b5e Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/sweep6.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/sweep7.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/sweep7.ogg new file mode 100644 index 00000000..73c8cf67 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/sweep7.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/weak1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/weak1.ogg new file mode 100644 index 00000000..abc3a582 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/weak1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/weak2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/weak2.ogg new file mode 100644 index 00000000..ec351509 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/weak2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/weak3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/weak3.ogg new file mode 100644 index 00000000..178dddec Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/weak3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/weak4.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/weak4.ogg new file mode 100644 index 00000000..0744d24a Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/player/attack/weak4.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/rabbit/attack1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/rabbit/attack1.ogg new file mode 100644 index 00000000..678d34c8 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/rabbit/attack1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/rabbit/attack2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/rabbit/attack2.ogg new file mode 100644 index 00000000..9c8de50b Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/rabbit/attack2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/rabbit/attack3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/rabbit/attack3.ogg new file mode 100644 index 00000000..092bc9b8 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/rabbit/attack3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/rabbit/attack4.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/rabbit/attack4.ogg new file mode 100644 index 00000000..a4c1e1c5 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/rabbit/attack4.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/snowman/death1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/snowman/death1.ogg new file mode 100644 index 00000000..fe8c796f Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/snowman/death1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/snowman/death2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/snowman/death2.ogg new file mode 100644 index 00000000..fb542a3a Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/snowman/death2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/snowman/death3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/snowman/death3.ogg new file mode 100644 index 00000000..a334224f Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/snowman/death3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/snowman/hurt1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/snowman/hurt1.ogg new file mode 100644 index 00000000..a1c54f81 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/snowman/hurt1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/snowman/hurt2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/snowman/hurt2.ogg new file mode 100644 index 00000000..1452086d Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/snowman/hurt2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/snowman/hurt3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/snowman/hurt3.ogg new file mode 100644 index 00000000..5e89415f Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/snowman/hurt3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/ambient1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/ambient1.ogg new file mode 100644 index 00000000..6fd56342 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/ambient1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/ambient2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/ambient2.ogg new file mode 100644 index 00000000..d7c7bfcb Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/ambient2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/ambient3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/ambient3.ogg new file mode 100644 index 00000000..88adaa65 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/ambient3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/ambient4.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/ambient4.ogg new file mode 100644 index 00000000..ff811182 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/ambient4.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/ambient5.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/ambient5.ogg new file mode 100644 index 00000000..7b4ef6ec Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/ambient5.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/death1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/death1.ogg new file mode 100644 index 00000000..14e68b18 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/death1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/death2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/death2.ogg new file mode 100644 index 00000000..8c30e006 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/death2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/death3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/death3.ogg new file mode 100644 index 00000000..05629ea7 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/death3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/hurt1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/hurt1.ogg new file mode 100644 index 00000000..3f2e4bf6 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/hurt1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/hurt2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/hurt2.ogg new file mode 100644 index 00000000..6ac6c5e3 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/hurt2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/hurt3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/hurt3.ogg new file mode 100644 index 00000000..74dde1bb Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/hurt3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/hurt4.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/hurt4.ogg new file mode 100644 index 00000000..fbbe26b3 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/squid/hurt4.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/ambient1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/ambient1.ogg new file mode 100644 index 00000000..9fd7b264 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/ambient1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/ambient2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/ambient2.ogg new file mode 100644 index 00000000..209009a5 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/ambient2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/ambient3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/ambient3.ogg new file mode 100644 index 00000000..43681dba Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/ambient3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/ambient4.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/ambient4.ogg new file mode 100644 index 00000000..169e741f Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/ambient4.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/ambient5.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/ambient5.ogg new file mode 100644 index 00000000..702fcd6a Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/ambient5.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/death1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/death1.ogg new file mode 100644 index 00000000..fc92472c Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/death1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/death2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/death2.ogg new file mode 100644 index 00000000..54a02ab3 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/death2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/death3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/death3.ogg new file mode 100644 index 00000000..9185e75b Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/death3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/drink1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/drink1.ogg new file mode 100644 index 00000000..10989ab2 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/drink1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/drink2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/drink2.ogg new file mode 100644 index 00000000..8989734f Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/drink2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/drink3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/drink3.ogg new file mode 100644 index 00000000..6cd51b6a Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/drink3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/drink4.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/drink4.ogg new file mode 100644 index 00000000..4d951665 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/drink4.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/hurt1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/hurt1.ogg new file mode 100644 index 00000000..ce0b98bd Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/hurt1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/hurt2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/hurt2.ogg new file mode 100644 index 00000000..2fd31fec Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/hurt2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/hurt3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/hurt3.ogg new file mode 100644 index 00000000..f81ea8d5 Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/hurt3.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/throw1.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/throw1.ogg new file mode 100644 index 00000000..ef3c81dd Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/throw1.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/throw2.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/throw2.ogg new file mode 100644 index 00000000..5467658d Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/throw2.ogg differ diff --git a/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/throw3.ogg b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/throw3.ogg new file mode 100644 index 00000000..d4fc993a Binary files /dev/null and b/Minecraft.Client/Windows64Media/Sound/Minecraft/entity/witch/throw3.ogg differ diff --git a/Minecraft.World/ArmorStand.cpp b/Minecraft.World/ArmorStand.cpp index 81f6beca..38cfc8aa 100644 --- a/Minecraft.World/ArmorStand.cpp +++ b/Minecraft.World/ArmorStand.cpp @@ -16,6 +16,7 @@ #include "ParticleTypes.h" #include "Random.h" #include "AABB.h" +#include "SoundTypes.h" #include "../Minecraft.World/LevelChunk.h" const Rotations ArmorStand::DEFAULT_HEAD_POSE (0.0f, 0.0f, 0.0f); @@ -386,6 +387,7 @@ bool ArmorStand::hurt(DamageSource* source, float damage) if (source->isExplosion()) { + playSound(eSoundType_ENTITY_ARMORSTAND_BREAK, 1.0f, 1.0f); spawnAtLocation(Item::armor_stand_Id, 1); brokenByAnything(); remove(); @@ -398,6 +400,7 @@ bool ArmorStand::hurt(DamageSource* source, float damage) if (attacker && attacker->instanceof(eTYPE_PLAYER) && dynamic_pointer_cast(attacker)->abilities.instabuild) { + playSound(eSoundType_ENTITY_ARMORSTAND_BREAK, 1.0f, 1.0f); level->broadcastEntityEvent(shared_from_this(), (byte)31); remove(); return true; @@ -417,6 +420,7 @@ bool ArmorStand::hurt(DamageSource* source, float damage) return false; } + playSound(eSoundType_ENTITY_ARMORSTAND_HIT, 1.0f, 1.0f); hurtDir = -hurtDir; standDamage += damage * 10.0f; lastHit = (long long)tickCount; @@ -424,6 +428,7 @@ bool ArmorStand::hurt(DamageSource* source, float damage) if (standDamage >= 40.0f) { + playSound(eSoundType_ENTITY_ARMORSTAND_BREAK, 1.0f, 1.0f); spawnAtLocation(Item::armor_stand_Id, 1); brokenByAnything(); remove(); diff --git a/Minecraft.World/BaseMobSpawner.cpp b/Minecraft.World/BaseMobSpawner.cpp index b01aeb09..723bf5e5 100644 --- a/Minecraft.World/BaseMobSpawner.cpp +++ b/Minecraft.World/BaseMobSpawner.cpp @@ -131,6 +131,8 @@ void BaseMobSpawner::tick() shared_ptr BaseMobSpawner::loadDataAndAddEntity(shared_ptr entity) { + if (entity == nullptr) return nullptr; + if (getNextSpawnData() != nullptr) { CompoundTag *data = new CompoundTag(); @@ -155,6 +157,7 @@ shared_ptr BaseMobSpawner::loadDataAndAddEntity(shared_ptr entit { CompoundTag *ridingTag = data->getCompound(Entity::RIDING_TAG); shared_ptr mount = EntityIO::newEntity(ridingTag->getString(L"id"), entity->level); + if (mount != nullptr) { CompoundTag *mountData = new CompoundTag(); @@ -230,7 +233,8 @@ void BaseMobSpawner::load(CompoundTag *tag) if (tag->contains(L"SpawnData")) { - setNextSpawnData(new SpawnData(tag->getCompound(L"SpawnData"), entityId)); + CompoundTag *spawnDataTag = tag->getCompound(L"SpawnData"); + setNextSpawnData(new SpawnData(spawnDataTag, entityId)); } else { @@ -250,7 +254,10 @@ void BaseMobSpawner::load(CompoundTag *tag) requiredPlayerRange = tag->getShort(L"RequiredPlayerRange"); } - if (tag->contains(L"SpawnRange")) spawnRange = tag->getShort(L"SpawnRange"); + if (tag->contains(L"SpawnRange")) + { + spawnRange = tag->getShort(L"SpawnRange"); + } if (getLevel() != nullptr && getLevel()->isClientSide) { @@ -328,8 +335,21 @@ void BaseMobSpawner::setNextSpawnData(SpawnData *nextSpawnData) BaseMobSpawner::SpawnData::SpawnData(CompoundTag *base) : WeighedRandomItem(base->getInt(L"Weight")) { - CompoundTag *tag = base->getCompound(L"Properties"); - wstring _type = base->getString(L"Type"); + CompoundTag *tag = nullptr; + wstring _type; + + if (!base->contains(L"Entity")) + { + CompoundTag *propertiesTag = base->getCompound(L"Properties"); + tag = propertiesTag != nullptr ? static_cast(propertiesTag->copy()) : nullptr; + _type = base->getString(L"Type"); + } + else + { + CompoundTag *entityTag = base->getCompound(L"Entity"); + tag = entityTag != nullptr ? static_cast(entityTag->copy()) : nullptr; + _type = entityTag != nullptr ? entityTag->getString(L"id") : L""; + } if (_type.compare(L"Minecart") == 0) { @@ -360,6 +380,11 @@ BaseMobSpawner::SpawnData::SpawnData(CompoundTag *base) : WeighedRandomItem(base BaseMobSpawner::SpawnData::SpawnData(CompoundTag *tag, wstring _type) : WeighedRandomItem(1) { + if (_type.empty() && tag != nullptr && tag->contains(L"id")) + { + _type = tag->getString(L"id"); + } + if (_type.compare(L"Minecart") == 0) { if (tag != nullptr) @@ -383,7 +408,7 @@ BaseMobSpawner::SpawnData::SpawnData(CompoundTag *tag, wstring _type) : WeighedR } } - this->tag = tag; + this->tag = tag != nullptr ? static_cast(tag->copy()) : nullptr; this->type = _type; } @@ -396,9 +421,9 @@ CompoundTag *BaseMobSpawner::SpawnData::save() { CompoundTag *result = new CompoundTag(); - result->putCompound(L"Properties", tag); + result->putCompound(L"Properties", tag != nullptr ? static_cast(tag->copy()) : nullptr); result->putString(L"Type", type); result->putInt(L"Weight", randomWeight); return result; -} \ No newline at end of file +} diff --git a/Minecraft.World/Cow.cpp b/Minecraft.World/Cow.cpp index 5232a3fb..6c0d4e84 100644 --- a/Minecraft.World/Cow.cpp +++ b/Minecraft.World/Cow.cpp @@ -13,6 +13,7 @@ #include "Cow.h" #include "../Minecraft.Client/Textures.h" #include "MobCategory.h" +#include "SoundTypes.h" @@ -111,6 +112,7 @@ bool Cow::mobInteract(shared_ptr player) if (item != nullptr && item->id == Item::bucket->id && !player->abilities.instabuild) { player->awardStat(GenericStats::cowsMilked(),GenericStats::param_cowsMilked()); + playSound(eSoundType_ENTITY_COW_MILK, 1.0f, 1.0f); if (item->count-- == 0) { diff --git a/Minecraft.World/Entity.h b/Minecraft.World/Entity.h index 93b68713..e0fb1a44 100644 --- a/Minecraft.World/Entity.h +++ b/Minecraft.World/Entity.h @@ -303,9 +303,9 @@ public: protected: virtual bool repositionEntityAfterLoad(); - const wstring getEncodeId(); public: + const wstring getEncodeId(); virtual void readAdditionalSaveData(CompoundTag *tag) = 0; virtual void addAdditonalSaveData(CompoundTag *tag) = 0; /** diff --git a/Minecraft.World/EntityHorse.cpp b/Minecraft.World/EntityHorse.cpp index 949fd455..fade0fd1 100644 --- a/Minecraft.World/EntityHorse.cpp +++ b/Minecraft.World/EntityHorse.cpp @@ -405,7 +405,7 @@ void EntityHorse::dropBags() void EntityHorse::eatingHorse() { openMouth(); - level->playEntitySound(shared_from_this(), eSoundType_EATING, 1.0f, 1.0f + (random->nextFloat() - random->nextFloat()) * 0.2f); + level->playEntitySound(shared_from_this(), eSoundType_ENTITY_HORSE_EAT, 1.0f, 1.0f + (random->nextFloat() - random->nextFloat()) * 0.2f); } /** diff --git a/Minecraft.World/HangingEntityItem.cpp b/Minecraft.World/HangingEntityItem.cpp index ddb09497..95d6f9e5 100644 --- a/Minecraft.World/HangingEntityItem.cpp +++ b/Minecraft.World/HangingEntityItem.cpp @@ -10,6 +10,7 @@ #include "Painting.h" #include "GenericStats.h" #include "ItemFrame.h" +#include "SoundTypes.h" HangingEntityItem::HangingEntityItem(int id, eINSTANCEOF eClassType) : Item(id) @@ -41,6 +42,11 @@ bool HangingEntityItem::useOn(shared_ptr instance, shared_ptraddEntity(entity)==TRUE) { + if (eType==eTYPE_ITEM_FRAME) + { + entity->playSound(eSoundType_ENTITY_ITEMFRAME_PLACE, 1.0f, 1.0f); + } + // 4J-JEV: Hook for durango 'BlockPlaced' event. if (eType==eTYPE_PAINTING) player->awardStat(GenericStats::blocksPlaced(Item::painting_Id), GenericStats::param_blocksPlaced(Item::painting_Id,instance->getAuxValue(),1)); else if (eType==eTYPE_ITEM_FRAME) player->awardStat(GenericStats::blocksPlaced(Item::item_frame_Id), GenericStats::param_blocksPlaced(Item::item_frame_Id,instance->getAuxValue(),1)); diff --git a/Minecraft.World/ItemFrame.cpp b/Minecraft.World/ItemFrame.cpp index 528c0711..ea64d059 100644 --- a/Minecraft.World/ItemFrame.cpp +++ b/Minecraft.World/ItemFrame.cpp @@ -12,6 +12,7 @@ #include "ItemFrame.h" #include "DamageSource.h" #include "Level.h" +#include "SoundTypes.h" @@ -174,6 +175,7 @@ bool ItemFrame::interact(shared_ptr player) if (!level->isClientSide)//isClientSide) { setItem(item); + playSound(eSoundType_ENTITY_ITEMFRAME_ADD_ITEM, 1.0f, 1.0f); if (!player->abilities.instabuild) { @@ -190,6 +192,7 @@ bool ItemFrame::interact(shared_ptr player) if (!level->isClientSide)//isClientSide) { setRotation(getRotation() + 1); + playSound(eSoundType_ENTITY_ITEMFRAME_ROTATE_ITEM, 1.0f, 1.0f); } } @@ -226,11 +229,13 @@ bool ItemFrame::hurt(DamageSource *source, float damage) removeFramedMap(copy); spawnAtLocation(copy, 0); } - + + playSound(eSoundType_ENTITY_ITEMFRAME_REMOVE_ITEM, 1.0f, 1.0f); setItem(nullptr); return true; } - + + playSound(eSoundType_ENTITY_ITEMFRAME_BREAK, 1.0f, 1.0f); return HangingEntity::hurt(source, damage); } diff --git a/Minecraft.World/LeashFenceKnotEntity.cpp b/Minecraft.World/LeashFenceKnotEntity.cpp index f94bcba7..5aa0408f 100644 --- a/Minecraft.World/LeashFenceKnotEntity.cpp +++ b/Minecraft.World/LeashFenceKnotEntity.cpp @@ -4,6 +4,7 @@ #include "net.minecraft.world.level.h" #include "net.minecraft.world.phys.h" #include "LeashFenceKnotEntity.h" +#include "SoundTypes.h" void LeashFenceKnotEntity::_init() { @@ -92,8 +93,13 @@ bool LeashFenceKnotEntity::interact(shared_ptr player) } } } + if (!level->isClientSide && attachedMob) + { + playSound(eSoundType_ENTITY_LEASHKNOT_PLACE, 1.0f, 1.0f); + } if (!level->isClientSide && !attachedMob) { + playSound(eSoundType_ENTITY_LEASHKNOT_BREAK, 1.0f, 1.0f); remove(); if (player->abilities.instabuild) @@ -129,6 +135,13 @@ bool LeashFenceKnotEntity::survives() return false; } +bool LeashFenceKnotEntity::hurt(DamageSource *source, float damage) +{ + if (level->isClientSide) return false; + playSound(eSoundType_ENTITY_LEASHKNOT_BREAK, 1.0f, 1.0f); + return HangingEntity::hurt(source, damage); +} + shared_ptr LeashFenceKnotEntity::createAndAddKnot(Level *level, int x, int y, int z) { shared_ptr knot = std::make_shared(level, x, y, z); diff --git a/Minecraft.World/LeashFenceKnotEntity.h b/Minecraft.World/LeashFenceKnotEntity.h index 1bf3a7b7..3838cb78 100644 --- a/Minecraft.World/LeashFenceKnotEntity.h +++ b/Minecraft.World/LeashFenceKnotEntity.h @@ -30,6 +30,7 @@ public: void addAdditonalSaveData(CompoundTag *tag); void readAdditionalSaveData(CompoundTag *tag); bool interact(shared_ptr player); + virtual bool hurt(DamageSource *source, float damage); virtual bool survives(); static shared_ptr createAndAddKnot(Level *level, int x, int y, int z); static shared_ptr findKnotAt(Level *level, int x, int y, int z); diff --git a/Minecraft.World/LeashItem.cpp b/Minecraft.World/LeashItem.cpp index 4de74a5c..036b6f2b 100644 --- a/Minecraft.World/LeashItem.cpp +++ b/Minecraft.World/LeashItem.cpp @@ -34,6 +34,7 @@ bool LeashItem::bindPlayerMobs(shared_ptr player, Level *level, int x, i // look for entities that can be attached to the fence bool foundMobs = false; + bool knotCreated = false; double range = 7; vector > *mobs = level->getEntitiesOfClass(typeid(Mob), AABB::newTemp(x - range, y - range, z - range, x + range, y + range, z + range)); if (mobs != nullptr) @@ -46,12 +47,19 @@ bool LeashItem::bindPlayerMobs(shared_ptr player, Level *level, int x, i if (activeKnot == nullptr) { activeKnot = LeashFenceKnotEntity::createAndAddKnot(level, x, y, z); + knotCreated = true; } mob->setLeashedTo(activeKnot, true); foundMobs = true; } } } + + if (foundMobs && knotCreated) + { + activeKnot->playSound(eSoundType_ENTITY_LEASHKNOT_PLACE, 1.0f, 1.0f); + } + return foundMobs; } diff --git a/Minecraft.World/Painting.cpp b/Minecraft.World/Painting.cpp index 5e56b9ca..29334cee 100644 --- a/Minecraft.World/Painting.cpp +++ b/Minecraft.World/Painting.cpp @@ -8,6 +8,7 @@ #include "com.mojang.nbt.h" #include "Painting.h" #include "Material.h" +#include "SoundTypes.h" @@ -101,6 +102,7 @@ void Painting::PaintingPostConstructor(int dir, int motive) this->motive = survivableMotives->at(random->nextInt(static_cast(survivableMotives->size()))); } setDir(dir); + playSound(eSoundType_ENTITY_PAINTING_PLACE, 1.0f, 1.0f); } } @@ -165,4 +167,11 @@ void Painting::dropItem(shared_ptr causedBy) } spawnAtLocation(std::make_shared(Item::painting), 0.0f); -} \ No newline at end of file +} + +bool Painting::hurt(DamageSource *source, float damage) +{ + if (level->isClientSide) return false; + playSound(eSoundType_ENTITY_PAINTING_BREAK, 1.0f, 1.0f); + return HangingEntity::hurt(source, damage); +} diff --git a/Minecraft.World/Painting.h b/Minecraft.World/Painting.h index b47a012b..a0b08f35 100644 --- a/Minecraft.World/Painting.h +++ b/Minecraft.World/Painting.h @@ -100,7 +100,7 @@ public: //virtual void tick(); //bool survives(); //virtual bool isPickable(); - //virtual bool hurt(DamageSource *source, int damage); + virtual bool hurt(DamageSource *source, float damage); virtual void addAdditonalSaveData(CompoundTag *tag); virtual void readAdditionalSaveData(CompoundTag *tag); //static Motive *randomMotive(); diff --git a/Minecraft.World/SnowMan.cpp b/Minecraft.World/SnowMan.cpp index 5b178676..99ca5df3 100644 --- a/Minecraft.World/SnowMan.cpp +++ b/Minecraft.World/SnowMan.cpp @@ -83,6 +83,16 @@ void SnowMan::aiStep() } } +int SnowMan::getHurtSound() +{ + return eSoundType_ENTITY_SNOWMAN_HURT; +} + +int SnowMan::getDeathSound() +{ + return eSoundType_ENTITY_SNOWMAN_DEATH; +} + int SnowMan::getDeathLoot() { return Item::snowball_Id; diff --git a/Minecraft.World/SnowMan.h b/Minecraft.World/SnowMan.h index ff473432..756cb142 100644 --- a/Minecraft.World/SnowMan.h +++ b/Minecraft.World/SnowMan.h @@ -20,6 +20,8 @@ public: virtual void aiStep(); protected: + virtual int getHurtSound(); + virtual int getDeathSound(); virtual int getDeathLoot(); // virtual void dropDeathLoot(bool wasKilledByPlayer, int playerBonusLevel); diff --git a/Minecraft.World/SoundTypes.h b/Minecraft.World/SoundTypes.h index 131760c4..b28b0ebd 100644 --- a/Minecraft.World/SoundTypes.h +++ b/Minecraft.World/SoundTypes.h @@ -283,6 +283,47 @@ enum eSOUND_TYPE eSoundType_MOB_POLARBEAR_STEP, eSoundType_MOB_POLARBEAR_WARNING, + // tu43 + // witch sounds + eSoundType_ENTITY_WITCH_AMBIENT, + eSoundType_ENTITY_WITCH_HURT, + eSoundType_ENTITY_WITCH_DEATH, + eSoundType_ENTITY_WITCH_THROW, + + // squid sounds + eSoundType_ENTITY_SQUID_AMBIENT, + eSoundType_ENTITY_SQUID_HURT, + eSoundType_ENTITY_SQUID_DEATH, + + // snowman sounds + eSoundType_ENTITY_SNOWMAN_HURT, + eSoundType_ENTITY_SNOWMAN_DEATH, + + // armor stand sounds + eSoundType_ENTITY_ARMORSTAND_BREAK, + eSoundType_ENTITY_ARMORSTAND_HIT, + + // cow sounds + eSoundType_ENTITY_COW_MILK, + + // horse sounds + eSoundType_ENTITY_HORSE_EAT, + + // item frame sounds + eSoundType_ENTITY_ITEMFRAME_ADD_ITEM, + eSoundType_ENTITY_ITEMFRAME_BREAK, + eSoundType_ENTITY_ITEMFRAME_PLACE, + eSoundType_ENTITY_ITEMFRAME_REMOVE_ITEM, + eSoundType_ENTITY_ITEMFRAME_ROTATE_ITEM, + + // leash sounds + eSoundType_ENTITY_LEASHKNOT_BREAK, + eSoundType_ENTITY_LEASHKNOT_PLACE, + + // painting sounds + eSoundType_ENTITY_PAINTING_PLACE, + eSoundType_ENTITY_PAINTING_BREAK, + eSoundType_MAX }; diff --git a/Minecraft.World/Squid.cpp b/Minecraft.World/Squid.cpp index fcfbe6cb..d3ba6125 100644 --- a/Minecraft.World/Squid.cpp +++ b/Minecraft.World/Squid.cpp @@ -9,6 +9,7 @@ #include "net.minecraft.world.entity.monster.h" #include "SharedConstants.h" #include "Squid.h" +#include "SoundTypes.h" #include "../Minecraft.Client/Textures.h" void Squid::_init() @@ -48,17 +49,17 @@ void Squid::registerAttributes() int Squid::getAmbientSound() { - return -1; + return eSoundType_ENTITY_SQUID_AMBIENT; } int Squid::getHurtSound() { - return -1; + return eSoundType_ENTITY_SQUID_HURT; } int Squid::getDeathSound() { - return -1; + return eSoundType_ENTITY_SQUID_DEATH; } float Squid::getSoundVolume() diff --git a/Minecraft.World/Witch.cpp b/Minecraft.World/Witch.cpp index 053b8023..345c23b1 100644 --- a/Minecraft.World/Witch.cpp +++ b/Minecraft.World/Witch.cpp @@ -12,6 +12,7 @@ #include "net.minecraft.world.level.h" #include "net.minecraft.world.phys.h" #include "Witch.h" +#include "SoundTypes.h" AttributeModifier *Witch::SPEED_MODIFIER_DRINKING = (new AttributeModifier(eModifierId_MOB_WITCH_DRINKSPEED, -0.25f, AttributeModifier::OPERATION_ADDITION))->setSerialize(false); @@ -48,17 +49,17 @@ void Witch::defineSynchedData() int Witch::getAmbientSound() { - return eSoundType_MOB_WITCH_IDLE; //"mob.witch.idle"; + return eSoundType_ENTITY_WITCH_AMBIENT; } int Witch::getHurtSound() { - return eSoundType_MOB_WITCH_HURT; //"mob.witch.hurt"; + return eSoundType_ENTITY_WITCH_HURT; } int Witch::getDeathSound() { - return eSoundType_MOB_WITCH_DEATH; //"mob.witch.death"; + return eSoundType_ENTITY_WITCH_DEATH; } void Witch::setUsingItem(bool isUsing) @@ -211,6 +212,7 @@ void Witch::performRangedAttack(shared_ptr target, float power) } potion->shoot(xd, yd + dist * 0.2f, zd, 0.75f, 8); + playSound(eSoundType_ENTITY_WITCH_THROW, 1.0f, 1.0f); level->addEntity(potion); } \ No newline at end of file diff --git a/tools/toggle_region_format_16.py b/tools/toggle_region_format_16.py new file mode 100644 index 00000000..c31cc1af --- /dev/null +++ b/tools/toggle_region_format_16.py @@ -0,0 +1,227 @@ +#!/usr/bin/env python3 + +import argparse +import os +import sys +import zlib + +FILE_ENTRY_SIZE = 144 +SAVE_HEADER_SIZE = 12 +REGION_FORMAT_16_NAME = "region_format_16" + + +def read_u16(data, offset, endian): + return int.from_bytes(data[offset:offset + 2], endian) + + +def read_u32(data, offset, endian): + return int.from_bytes(data[offset:offset + 4], endian) + + +def read_u64(data, offset, endian): + return int.from_bytes(data[offset:offset + 8], endian) + + +def write_u32(buf, offset, value, endian): + buf[offset:offset + 4] = int(value).to_bytes(4, endian, signed=False) + + +def write_u64(buf, offset, value, endian): + buf[offset:offset + 8] = int(value).to_bytes(8, endian, signed=False) + + +def detect_payload_endian(payload): + for endian in ("little", "big"): + header_offset = read_u32(payload, 0, endian) + header_count = read_u32(payload, 4, endian) + if header_offset < SAVE_HEADER_SIZE: + continue + if header_count == 0 or header_count > 50000: + continue + if header_offset + (header_count * FILE_ENTRY_SIZE) == len(payload): + return endian + return None + + +def parse_entries(payload, endian): + header_offset = read_u32(payload, 0, endian) + header_count = read_u32(payload, 4, endian) + original_version = read_u16(payload, 8, endian) + current_version = read_u16(payload, 10, endian) + + if header_offset + (header_count * FILE_ENTRY_SIZE) != len(payload): + raise ValueError("Invalid save header layout") + + entries = [] + text_encoding = "utf-16-le" if endian == "little" else "utf-16-be" + for i in range(header_count): + entry_offset = header_offset + (i * FILE_ENTRY_SIZE) + raw_name = payload[entry_offset:entry_offset + 128] + name = raw_name.decode(text_encoding, errors="ignore").split("\x00", 1)[0] + length = read_u32(payload, entry_offset + 128, endian) + start = read_u32(payload, entry_offset + 132, endian) + last_modified = read_u64(payload, entry_offset + 136, endian) + entries.append( + { + "name": name, + "length": length, + "start": start, + "last_modified": last_modified, + } + ) + + return { + "header_offset": header_offset, + "original_version": original_version, + "current_version": current_version, + "entries": entries, + } + + +def serialize_payload_from_entries(entries, original_version, current_version, endian): + data_payload = bytearray(SAVE_HEADER_SIZE) + serialized_entries = [] + + for entry in entries: + start = len(data_payload) + data = entry["data"] + data_payload.extend(data) + serialized_entries.append( + { + "name": entry["name"], + "start": start, + "length": len(data), + "last_modified": entry.get("last_modified", 0), + } + ) + + header_offset = len(data_payload) + out_payload = bytearray(data_payload) + write_u32(out_payload, 0, header_offset, endian) + write_u32(out_payload, 4, len(serialized_entries), endian) + out_payload[8:10] = int(original_version).to_bytes(2, endian, signed=False) + out_payload[10:12] = int(current_version).to_bytes(2, endian, signed=False) + + text_encoding = "utf-16-le" if endian == "little" else "utf-16-be" + header_table = bytearray() + for entry in serialized_entries: + record = bytearray(FILE_ENTRY_SIZE) + name_bytes = entry["name"].encode(text_encoding, errors="ignore") + name_bytes = name_bytes[:128] + name_bytes = name_bytes + (b"\x00" * (128 - len(name_bytes))) + record[0:128] = name_bytes + write_u32(record, 128, entry["length"], endian) + write_u32(record, 132, entry["start"], endian) + write_u64(record, 136, entry["last_modified"], endian) + header_table.extend(record) + + out_payload.extend(header_table) + return bytes(out_payload) + + +def toggle_region_format_16(input_path, output_path, source_endian="auto"): + with open(input_path, "rb") as f: + blob = f.read() + + if len(blob) < 12: + raise ValueError("Input file is too small to be a valid save file") + + compressed_payload = blob[8:] + payload = zlib.decompress(compressed_payload) + + endian = source_endian + if endian == "auto": + endian = detect_payload_endian(payload) + if endian is None: + raise ValueError("Could not detect payload endianness!") + + parsed = parse_entries(payload, endian) + + has_marker = any(e["name"] == REGION_FORMAT_16_NAME for e in parsed["entries"]) + + entries_out = [] + for e in parsed["entries"]: + if e["name"] == REGION_FORMAT_16_NAME: + continue + entries_out.append( + { + "name": e["name"], + "data": payload[e["start"]:e["start"] + e["length"]], + "last_modified": e["last_modified"], + } + ) + + if has_marker: + action = "removed" + else: + action = "added" + entries_out.append( + { + "name": REGION_FORMAT_16_NAME, + "data": b"", + "last_modified": 0, + } + ) + + out_payload = serialize_payload_from_entries( + entries_out, parsed["original_version"], parsed["current_version"], endian + ) + + out_blob = bytearray() + out_blob.extend(b"\x00\x00\x00\x00") + out_blob.extend(len(out_payload).to_bytes(4, endian, signed=False)) + out_blob.extend(zlib.compress(out_payload, level=9)) + + out_dir = os.path.dirname(output_path) + if out_dir: + os.makedirs(out_dir, exist_ok=True) + + with open(output_path, "wb") as f: + f.write(out_blob) + + return { + "action": action, + "endian": endian, + "entry_count": len(entries_out), + } + + +def main(): + parser = argparse.ArgumentParser( + description="Toggles the region_format_16 marker entry in any given mcs or ms save" + ) + parser.add_argument("input", help="Input .mcs/.ms path") + parser.add_argument( + "output", + nargs="?", + help="Output path (overwrites the input file by default)", + ) + parser.add_argument( + "--source-endian", + choices=["auto", "big", "little"], + default="auto", + help="Override the input source's endianness", + ) + + args = parser.parse_args() + output_path = args.output or args.input + + try: + result = toggle_region_format_16( + input_path=args.input, + output_path=output_path, + source_endian=args.source_endian, + ) + except Exception as exc: + print(f"Error: {exc}", file=sys.stderr) + return 1 + + print(f"region_format_16 {result['action']} successfully!") + print(f" Endian: {result['endian']}") + print(f" Entry Count: {result['entry_count']}") + print(f" Output Path: {output_path}") + return 0 + + +if __name__ == "__main__": + raise SystemExit(main())