diff --git a/developer_documentation.md b/developer_documentation.md index 63832e6..6821d67 100644 --- a/developer_documentation.md +++ b/developer_documentation.md @@ -1,22 +1,23 @@ - * [Introduction](#Introduction) - * [Armor stands](#Armor-stands) - * [Part visibility and rotation encoding](#Part-visibility-and-rotation-encoding) - * [Geometry and attachables](#Geometry-and-attachables) - * [Illusioners](#Illusioners) - * [Killer bunnies](#Killer-bunnies) - * [Offhand Animation](#Offhand-animation) - * [Particles](#Particles) - * [Sweep Attack](#Sweep-attack) - * [Phantoms](#Phantoms) - * [Player skin parts](#Player-skin-parts) - * [Shulkers](#Shulkers) - * [Spectral arrow entities](#Spectral-arrow-entities) - * [Spyglass animations](#Spyglass-animations) - * [Zombie villager textures](#Zombie-villager-textures) - * [UI modifications](#ui-modifications) - * [Structure block texture changes (MCPE-48224)](#structure-block-texture-changes-mcpe-48224) - * [Cherry Fence Gate Sound Fix (MCPE-168021)](#cherry-fence-gate-sound-fix-mcpe-168021) +* [Introduction](#Introduction) +* [Armor stands](#Armor-stands) + * [Part visibility and rotation encoding](#Part-visibility-and-rotation-encoding) + * [Geometry and attachables](#Geometry-and-attachables) +* [Illusioners](#Illusioners) +* [Killer bunnies](#Killer-bunnies) +* [Offhand Animation](#Offhand-animation) +* [Particles](#Particles) + * [Sweep Attack](#Sweep-attack) +* [Phantoms](#Phantoms) +* [Player skin parts](#Player-skin-parts) +* [Shulkers](#Shulkers) +* [Spectral arrow entities](#Spectral-arrow-entities) +* [Spyglass animations](#Spyglass-animations) +* [Zombie villager textures](#Zombie-villager-textures) +* [UI modifications](#ui-modifications) +* [Combat Sounds](#combat-sounds) +* [Structure block texture changes (MCPE-48224)](#structure-block-texture-changes-mcpe-48224) +* [Cherry Fence Gate Sound Fix (MCPE-168021)](#cherry-fence-gate-sound-fix-mcpe-168021) ### Introduction @@ -315,6 +316,21 @@ Hiding the 2x2 crafting grid is a bit more involved. We have to use bindings to This uses the `#is_creative_mode` binding, and applies it to the crafting panel. Note that we insert this modification into the bindings array instead of directly modifying the UI - this allows the GeyserOptionalPack to stay compatible with other resource packs that modify this screen. +### Combat Sounds + +Bedrock Edition's combat system is similar to Java Edition 1.8's combat system, however it includes some updated sounds for strong and weak attacks. +We can use these as they are the exact same as Java Edition's sounds, however we have to manually add some audio files that aren't in Bedrock Edition's default resources due to Java Edition 1.9's combat system having mechanics that simply aren't in Bedrock, meaning the related sounds are not present. + +| Java (`entity.`) | Bedrock (`game.`) | Optional Pack (`geyseropt.`) | +| :------------------------------: | :---------------------------: | :---------------------------------: | +| `entity.player.attack.crit` | - | `geyseropt.player.attack.crit` | +| `entity.player.attack.knockback` | - | `geyseropt.player.attack.knockback` | +| `entity.player.attack.strong` | `game.player.attack.strong` | - | +| `entity.player.attack.sweep` | - | `geyseropt.player.attack.sweep` | +| `entity.player.attack.weak` | `game.player.attack.nodamage` | - | + +Note that this pack still makes changes to the sounds available in Bedrock Edition. The volume of both the strong and weak sounds are quieter, so the optional pack raises the volume of the sounds from 20% to 70% to match Java Edition. + ### Structure block texture changes (MCPE-48224) Bedrock edition is currently wrongly assigning textures to the load, save and corner structure block modes. The `terrain_texture.json` file fixes this by diff --git a/manifest.json b/manifest.json index 111122c..623b0c3 100755 --- a/manifest.json +++ b/manifest.json @@ -4,7 +4,7 @@ "description": "Optional Bedrock resource pack to extend Geyser functionality", "name": "GeyserOptionalPack", "uuid": "e5f5c938-a701-11eb-b2a3-047d7bb283ba", - "version": [1, 0, 10], + "version": [1, 0, 11], "min_engine_version": [ 1, 16, 0 ] }, "modules": [ @@ -12,7 +12,7 @@ "description": "GeyserOptionalPack", "type": "resources", "uuid": "eebb4ea8-a701-11eb-95ba-047d7bb283ba", - "version": [1, 0, 10] + "version": [1, 0, 11] } ] } diff --git a/prepare_pack.sh b/prepare_pack.sh index 9e33352..ad1fe20 100755 --- a/prepare_pack.sh +++ b/prepare_pack.sh @@ -1,3 +1,26 @@ +# Combat Sounds +mkdir -p sounds/geyser/entity/player/attack/ + +# Critical Attack +wget -O sounds/geyser/entity/player/attack/crit1.ogg https://resources.download.minecraft.net/50/509656b6d02a4491f46c686e66b615950c6c1408 +wget -O sounds/geyser/entity/player/attack/crit2.ogg https://resources.download.minecraft.net/1b/1b172129daf7cd9a36d2b0f7820baf2e479e381a +wget -O sounds/geyser/entity/player/attack/crit3.ogg https://resources.download.minecraft.net/15/15bbaf7901d7abff12bb872ff88a6ad541f5227a + +# Knockback Attack +wget -O sounds/geyser/entity/player/attack/knockback1.ogg https://resources.download.minecraft.net/08/08626fc2a337c28b5dfdafb6daa9ea31f9a70571 +wget -O sounds/geyser/entity/player/attack/knockback2.ogg https://resources.download.minecraft.net/05/0556f8b2dc424e7368b4ab9f8a315aa26982e3fc +wget -O sounds/geyser/entity/player/attack/knockback3.ogg https://resources.download.minecraft.net/08/085a6cd2e023877254d1118c403f39e556c003cb +wget -O sounds/geyser/entity/player/attack/knockback4.ogg https://resources.download.minecraft.net/1c/1c722dfd43b06c28273bc8c56d1d02c1a6ea5e48 + +# Sweep Attack +wget -O sounds/geyser/entity/player/attack/sweep1.ogg https://resources.download.minecraft.net/fd/fd20e1cd8c69bc2f037de950b078a729a4b7d6a6 +wget -O sounds/geyser/entity/player/attack/sweep2.ogg https://resources.download.minecraft.net/c9/c9534f4d840470b3c6efbcb84cff23c57baa3393 +wget -O sounds/geyser/entity/player/attack/sweep3.ogg https://resources.download.minecraft.net/4c/4c26fd4c2774e7afcbda1e293a27595e04e87c47 +wget -O sounds/geyser/entity/player/attack/sweep4.ogg https://resources.download.minecraft.net/ae/ae9bb7a332e3e3d3665f282b60b296ec01be97df +wget -O sounds/geyser/entity/player/attack/sweep5.ogg https://resources.download.minecraft.net/50/50a317f837b0604c3ebe8224951c1a0d7a94516a +wget -O sounds/geyser/entity/player/attack/sweep6.ogg https://resources.download.minecraft.net/39/39077d824a27e8040b0e1f2b4707d81149830d11 +wget -O sounds/geyser/entity/player/attack/sweep7.ogg https://resources.download.minecraft.net/e8/e8d0df494880f2067bb64d08a7428a78239c9a29 + # Download the client jar from mojang to extract assets wget https://launcher.mojang.com/v1/objects/37fd3c903861eeff3bc24b71eed48f828b5269c8/client.jar unzip client.jar -d extracted/ diff --git a/sounds/sound_definitions.json b/sounds/sound_definitions.json index 5dfbe0b..fa355a9 100644 --- a/sounds/sound_definitions.json +++ b/sounds/sound_definitions.json @@ -1,6 +1,143 @@ { "format_version": "1.20.20", "sound_definitions": { + "game.player.attack.nodamage": { + "__use_legacy_max_distance": true, + "category": "player", + "max_distance": null, + "min_distance": null, + "sounds": [ + { + "name": "sounds/mob/player/attack/weak1", + "volume": 0.7 + }, + { + "load_on_low_memory": true, + "name": "sounds/mob/player/attack/weak2", + "volume": 0.7 + }, + { + "name": "sounds/mob/player/attack/weak3", + "volume": 0.7 + }, + { + "name": "sounds/mob/player/attack/weak4", + "volume": 0.7 + } + ] + }, + "game.player.attack.strong": { + "__use_legacy_max_distance": true, + "category": "player", + "max_distance": null, + "min_distance": null, + "sounds": [ + { + "load_on_low_memory": true, + "name": "sounds/mob/player/attack/strong1", + "volume": 0.6 + }, + { + "name": "sounds/mob/player/attack/strong2", + "volume": 0.6 + }, + { + "name": "sounds/mob/player/attack/strong3", + "volume": 0.6 + }, + { + "name": "sounds/mob/player/attack/strong4", + "volume": 0.6 + }, + { + "name": "sounds/mob/player/attack/strong5", + "volume": 0.7 + }, + { + "name": "sounds/mob/player/attack/strong6", + "volume": 0.7 + } + ] + }, + "geyseropt.player.attack.crit": { + "__use_legacy_max_distance": true, + "category": "player", + "max_distance": null, + "min_distance": null, + "sounds": [ + { + "load_on_low_memory": true, + "name": "sounds/geyser/entity/player/attack/crit1", + "volume": 0.7 + }, + { + "name": "sounds/geyser/entity/player/attack/crit2", + "volume": 0.7 + }, + { + "name": "sounds/geyser/entity/player/attack/crit3", + "volume": 0.7 + } + ] + }, + "geyseropt.player.attack.knockback": { + "__use_legacy_max_distance": true, + "category": "player", + "max_distance": null, + "min_distance": null, + "sounds": [ + { + "load_on_low_memory": true, + "name": "sounds/geyser/entity/player/attack/knockback1", + "volume": 0.7 + }, + { + "name": "sounds/geyser/entity/player/attack/knockback2", + "volume": 0.7 + }, + { + "name": "sounds/geyser/entity/player/attack/knockback3", + "volume": 0.7 + } + ] + }, + "geyseropt.player.attack.sweep": { + "__use_legacy_max_distance": true, + "category": "player", + "max_distance": null, + "min_distance": null, + "sounds": [ + { + "load_on_low_memory": true, + "name": "sounds/geyser/entity/player/attack/sweep1", + "volume": 0.7 + }, + { + "name": "sounds/geyser/entity/player/attack/sweep2", + "volume": 0.7 + }, + { + "name": "sounds/geyser/entity/player/attack/sweep3", + "volume": 0.7 + }, + { + "name": "sounds/geyser/entity/player/attack/sweep4", + "volume": 0.7 + }, + { + "name": "sounds/geyser/entity/player/attack/sweep5", + "volume": 0.7 + }, + { + "name": "sounds/geyser/entity/player/attack/sweep6", + "volume": 0.7 + }, + { + "name": "sounds/geyser/entity/player/attack/sweep7", + "volume": 0.7 + } + ] + }, "close.cherry_wood_fence_gate": { "category": "block", "max_distance": null,