Merge branch 'sterr/sound' into '1.8.0'

Some block sounds and alpha cry tweaks

See merge request cable-mc/cobblemon!2220
This commit is contained in:
Polymeta
2026-04-25 21:40:22 +00:00
38 changed files with 141 additions and 10 deletions
@@ -611,14 +611,14 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
val PINK_PLAQUE = create("pink_plaque", PlaqueBlock(BlockBehaviour.Properties.of().sound(SoundType.METAL).mapColor(MapColor.METAL).noOcclusion().pushReaction(PushReaction.DESTROY).strength(5.0F)))
@JvmField
val CLEANSE_TAG = create("cleanse_tag", WallAttachedStackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.WOOD).mapColor(MapColor.NONE).pushReaction(PushReaction.DESTROY).noOcclusion().noCollission(), WallAttachedStackableItemBlock.WallStackableItemBlockType.TAG))
val CLEANSE_TAG = create("cleanse_tag", WallAttachedStackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_PAPER_SMALL_SOUNDS).mapColor(MapColor.NONE).pushReaction(PushReaction.DESTROY).noOcclusion().noCollission(), WallAttachedStackableItemBlock.WallStackableItemBlockType.TAG))
@JvmField
val SPELL_TAG = create("spell_tag", WallAttachedStackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.WOOD).mapColor(MapColor.NONE).pushReaction(PushReaction.DESTROY).noOcclusion().noCollission(), WallAttachedStackableItemBlock.WallStackableItemBlockType.TAG))
val SPELL_TAG = create("spell_tag", WallAttachedStackableItemBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_PAPER_SMALL_SOUNDS).mapColor(MapColor.NONE).pushReaction(PushReaction.DESTROY).noOcclusion().noCollission(), WallAttachedStackableItemBlock.WallStackableItemBlockType.TAG))
@JvmField
val BLUNDER_POLICY = create("blunder_policy", WallAttachedDirectionalShapeBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion().noCollission(), 14, 12, 1))
val BLUNDER_POLICY = create("blunder_policy", WallAttachedDirectionalShapeBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_PAPER_LARGE_SOUNDS).mapColor(MapColor.NONE).noOcclusion().noCollission(), 14, 12, 1))
@JvmField
val WEAKNESS_POLICY = create("weakness_policy", WallAttachedDirectionalShapeBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion().noCollission(), 14, 12, 1))
val WEAKNESS_POLICY = create("weakness_policy", WallAttachedDirectionalShapeBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.ITEM_BLOCK_PAPER_LARGE_SOUNDS).mapColor(MapColor.NONE).noOcclusion().noCollission(), 14, 12, 1))
@JvmField
val FULL_HEAL = create("full_heal", StackableItemBlock(BlockBehaviour.Properties.of().sound(SoundType.CANDLE).mapColor(MapColor.NONE).noOcclusion(), StackableItemBlock.StackableItemBlockType.STATUS_RESTORE))
@@ -1009,7 +1009,7 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
}
private fun typeGemBlock(name: String): Block {
val typeGemBlock = this.create(name, Block(BlockBehaviour.Properties.of().strength(3.0F, 6.0F).sound(SoundType.AMETHYST)))
val typeGemBlock = this.create(name, Block(BlockBehaviour.Properties.of().strength(3.0F, 6.0F).sound(CobblemonSounds.TYPE_GEM_BLOCK_SOUNDS)))
val identifier = cobblemonResource(name)
typeGemBlocks[identifier] = typeGemBlock
@@ -1020,7 +1020,7 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
fun typeGemBlocks() = typeGemBlocks.toMap()
private fun typeGemCluster(name: String, gemBlock: Block, dropItemId: ResourceLocation): Block {
val gemClusterBlock = this.create(name, TypeGemClusterBlock(BlockBehaviour.Properties.of().strength(2.0F, 3.0F).sound(SoundType.AMETHYST_CLUSTER).pushReaction(PushReaction.DESTROY), gemBlock, dropItemId))
val gemClusterBlock = this.create(name, TypeGemClusterBlock(BlockBehaviour.Properties.of().strength(2.0F, 3.0F).sound(CobblemonSounds.TYPE_GEM_CLUSTER_SOUNDS).pushReaction(PushReaction.DESTROY), gemBlock, dropItemId))
TypeGemClusterBlock.gemToClusterMap[gemBlock] = gemClusterBlock
@@ -407,6 +407,35 @@ object CobblemonSounds : PlatformRegistry<Registry<SoundEvent>, ResourceKey<Regi
TUMBLESTONE_STEP
)
@JvmField
val TYPE_GEM_BLOCK_BREAK = this.create("block.type_gem_cluster.break")
@JvmField
val TYPE_GEM_CLUSTER_BREAK = this.create("block.type_gem_block.break")
@JvmField
val TYPE_GEM_BLOCK_HIT = this.create("block.type_gem_block.hit")
@JvmField
val TYPE_GEM_BLOCK_PLACE = this.create("block.type_gem_block.place")
@JvmField
val TYPE_GEM_BLOCK_STEP = this.create("block.type_gem_block.step")
@JvmField
val TYPE_GEM_CLUSTER_SOUNDS = SoundType(1f, 1.2f,
TYPE_GEM_CLUSTER_BREAK,
TYPE_GEM_BLOCK_STEP,
TYPE_GEM_BLOCK_PLACE,
TYPE_GEM_BLOCK_HIT,
TYPE_GEM_BLOCK_STEP
)
@JvmField
val TYPE_GEM_BLOCK_SOUNDS = SoundType(1f, 1.1f,
TYPE_GEM_BLOCK_BREAK,
TYPE_GEM_BLOCK_STEP,
TYPE_GEM_BLOCK_PLACE,
TYPE_GEM_BLOCK_HIT,
TYPE_GEM_BLOCK_STEP
)
@JvmField
val EVOLUTION_STONE_BLOCK_SOUNDS = SoundType(1f, 1.1f,
EVOLUTION_STONE_BLOCK_BREAK,
@@ -588,5 +617,31 @@ object CobblemonSounds : PlatformRegistry<Registry<SoundEvent>, ResourceKey<Regi
CAMPFIRE_POT_STEP
)
@JvmField
val ITEM_BLOCK_PAPER_SMALL_PLACE = this.create("block.item_block.paper_small.place")
@JvmField
val ITEM_BLOCK_PAPER_SMALL_BREAK = this.create("block.item_block.paper_small.break")
@JvmField
val ITEM_BLOCK_PAPER_SMALL_SOUNDS = SoundType(1f, 1.1f,
ITEM_BLOCK_PAPER_SMALL_BREAK,
SoundEvents.WOOL_STEP,
ITEM_BLOCK_PAPER_SMALL_PLACE,
SoundEvents.WOOL_HIT,
SoundEvents.WOOL_FALL
)
@JvmField
val ITEM_BLOCK_PAPER_LARGE_PLACE = this.create("block.item_block.paper_large.place")
@JvmField
val ITEM_BLOCK_PAPER_LARGE_BREAK = this.create("block.item_block.paper_large.break")
@JvmField
val ITEM_BLOCK_PAPER_LARGE_SOUNDS = SoundType(1f, 1.1f,
ITEM_BLOCK_PAPER_LARGE_BREAK,
SoundEvents.WOOL_STEP,
ITEM_BLOCK_PAPER_LARGE_PLACE,
SoundEvents.WOOL_HIT,
SoundEvents.WOOL_FALL
)
private fun create(name: String): SoundEvent = this.create(name, SoundEvent.createVariableRangeEvent(cobblemonResource(name)))
}
@@ -115,7 +115,7 @@ class BedrockSoundKeyframe(
// If this entity is an alpha then play their cry as such
if (entity is PokemonEntity && entity.pokemon.isAlpha) {
Minecraft.getInstance().soundManager.play(
AlphaCrySoundInstance(soundEvent, entity.soundSource, 1.5f, 0.95f, entity, entity.level().random.nextLong()))
AlphaCrySoundInstance(soundEvent, entity.soundSource, 1.5f, 0.92f, entity, entity.level().random.nextLong()))
} else {
entity.level().playLocalSound(entity, soundEvent, entity.soundSource, 1F, 1F)
}
@@ -448,6 +448,51 @@
"cobblemon:block/tumblestone/tumblestone_step_4"
]
},
"block.type_gem_block.break": {
"subtitle": "subtitles.block.generic.break",
"sounds": [
"cobblemon:block/type_gem/type_gem_block_break_1",
"cobblemon:block/type_gem/type_gem_block_break_2",
"cobblemon:block/type_gem/type_gem_block_break_3",
"cobblemon:block/type_gem/type_gem_block_break_4"
]
},
"block.type_gem_cluster.break": {
"subtitle": "subtitles.block.generic.break",
"sounds": [
"cobblemon:block/type_gem/type_gem_cluster_break_1",
"cobblemon:block/type_gem/type_gem_cluster_break_2",
"cobblemon:block/type_gem/type_gem_cluster_break_3",
"cobblemon:block/type_gem/type_gem_cluster_break_4"
]
},
"block.type_gem_block.hit": {
"subtitle": "subtitles.block.generic.hit",
"sounds": [
{ "name": "cobblemon:block/type_gem/type_gem_block_hit_1", "volume": 0.8 },
{ "name": "cobblemon:block/type_gem/type_gem_block_hit_2", "volume": 0.8 },
{ "name": "cobblemon:block/type_gem/type_gem_block_hit_3", "volume": 0.8 },
{ "name": "cobblemon:block/type_gem/type_gem_block_hit_4", "volume": 0.8 }
]
},
"block.type_gem_block.place": {
"subtitle": "subtitles.block.generic.place",
"sounds": [
{ "name": "cobblemon:block/type_gem/type_gem_block_place_1", "volume": 0.7 },
{ "name": "cobblemon:block/type_gem/type_gem_block_place_2", "volume": 0.7 },
{ "name": "cobblemon:block/type_gem/type_gem_block_place_3", "volume": 0.7 },
{ "name": "cobblemon:block/type_gem/type_gem_block_place_4", "volume": 0.7 }
]
},
"block.type_gem_block.step": {
"subtitle": "subtitles.block.generic.footsteps",
"sounds": [
{ "name": "cobblemon:block/type_gem/type_gem_block_step_1", "volume": 0.7 },
{ "name": "cobblemon:block/type_gem/type_gem_block_step_2", "volume": 0.7 },
{ "name": "cobblemon:block/type_gem/type_gem_block_step_3", "volume": 0.7 },
{ "name": "cobblemon:block/type_gem/type_gem_block_step_4", "volume": 0.7 }
]
},
"block.evolution_stone_block.break": {
"subtitle": "subtitles.block.generic.break",
"sounds": [
@@ -855,10 +900,41 @@
"sounds": [
{ "name": "cobblemon:block/campfire_pot/campfire_pot_step_1", "volume": 0.5 },
{ "name": "cobblemon:block/campfire_pot/campfire_pot_step_2", "volume": 0.5 },
{ "name": "cobblemon:block/campfire_pot/campfire_pot_step_3", "volume": 0.5 },
{ "name": "cobblemon:block/campfire_pot/campfire_pot_step_3", "volume": 0.5 }
]
},
"block.item_block.paper_small.place": {
"subtitle": "subtitles.block.generic.place",
"sounds": [
{ "name": "cobblemon:block/item_block/paper_small_place_1", "volume": 0.4 },
{ "name": "cobblemon:block/item_block/paper_small_place_2", "volume": 0.4 },
{ "name": "cobblemon:block/item_block/paper_small_place_3", "volume": 0.4 }
]
},
"block.item_block.paper_small.break": {
"subtitle": "subtitles.block.generic.break",
"sounds": [
{ "name": "cobblemon:block/item_block/paper_small_break_1", "volume": 0.6 },
{ "name": "cobblemon:block/item_block/paper_small_break_2", "volume": 0.6 },
{ "name": "cobblemon:block/item_block/paper_small_break_3", "volume": 0.6 }
]
},
"block.item_block.paper_large.place": {
"subtitle": "subtitles.block.generic.place",
"sounds": [
{ "name": "cobblemon:block/item_block/paper_large_place_1", "volume": 0.4 },
{ "name": "cobblemon:block/item_block/paper_large_place_2", "volume": 0.4 },
{ "name": "cobblemon:block/item_block/paper_large_place_3", "volume": 0.4 }
]
},
"block.item_block.paper_large.break": {
"subtitle": "subtitles.block.generic.break",
"sounds": [
{ "name": "cobblemon:block/item_block/paper_large_break_1", "volume": 0.6 },
{ "name": "cobblemon:block/item_block/paper_large_break_2", "volume": 0.6 },
{ "name": "cobblemon:block/item_block/paper_large_break_3", "volume": 0.6 }
]
},
"move.absorb.actor": {
"sounds": [ { "name": "cobblemon:move/absorb/absorb_actor", "volume": 0.3 } ]
},
@@ -88,7 +88,7 @@ public class FabricSoundEngineMixin {
// TODO: probably not make these values hardcoded? Maybe add to alphaCrySoundInstance?
handle.execute(channel ->
((ChannelDuck) channel).cobblemon$applyReverb(1.6f, 0.2f, 0.1f, 0.9f)
((ChannelDuck) channel).cobblemon$applyReverb(1.8f, 0.25f, 0.1f, 0.9f)
);
}
@@ -89,7 +89,7 @@ public class NeoforgeSoundEngineMixin {
// TODO: probably not make these values hardcoded? Maybe add to alphaCrySoundInstance?
handle.execute(channel ->
((ChannelDuck) channel).cobblemon$applyReverb(1.6f, 0.2f, 0.1f, 0.9f)
((ChannelDuck) channel).cobblemon$applyReverb(1.8f, 0.25f, 0.1f, 0.9f)
);
}