diff --git a/common/src/main/kotlin/com/cobblemon/mod/common/client/render/models/blockbench/pokemon/gen2/SmeargleModel.kt b/common/src/main/kotlin/com/cobblemon/mod/common/client/render/models/blockbench/pokemon/gen2/SmeargleModel.kt index e4e8f6a9a2..836c7772d9 100644 --- a/common/src/main/kotlin/com/cobblemon/mod/common/client/render/models/blockbench/pokemon/gen2/SmeargleModel.kt +++ b/common/src/main/kotlin/com/cobblemon/mod/common/client/render/models/blockbench/pokemon/gen2/SmeargleModel.kt @@ -9,6 +9,7 @@ package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen2 import com.cobblemon.mod.common.client.render.models.blockbench.animation.BipedWalkAnimation +import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider import com.cobblemon.mod.common.client.render.models.blockbench.frame.BipedFrame import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel @@ -34,7 +35,7 @@ class SmeargleModel(root: ModelPart) : PokemonPosableModel(root), HeadedFrame, B lateinit var standing: Pose lateinit var walk: Pose - //override val cryAnimation = CryProvider { _, _ -> bedrockStateful("smeargle", "cry") } + override val cryAnimation = CryProvider { bedrockStateful("smeargle", "cry") } override fun registerPoses() { val blink = quirk { bedrockStateful("smeargle", "blink") } diff --git a/common/src/main/kotlin/com/cobblemon/mod/common/item/PokeBallItem.kt b/common/src/main/kotlin/com/cobblemon/mod/common/item/PokeBallItem.kt index d94e38cad1..a4f4f82546 100644 --- a/common/src/main/kotlin/com/cobblemon/mod/common/item/PokeBallItem.kt +++ b/common/src/main/kotlin/com/cobblemon/mod/common/item/PokeBallItem.kt @@ -8,6 +8,7 @@ package com.cobblemon.mod.common.item +import com.cobblemon.mod.common.api.pokeball.PokeBalls import com.cobblemon.mod.common.entity.pokeball.EmptyPokeBallEntity import com.cobblemon.mod.common.pokeball.PokeBall import com.cobblemon.mod.common.util.isServerSide @@ -21,8 +22,13 @@ import net.minecraft.world.level.Level import kotlin.math.cos class PokeBallItem( - val pokeBall : PokeBall -) : CobblemonItem(Properties()) { + val pokeBall: PokeBall +) : CobblemonItem(Properties().apply { + if (pokeBall.name == PokeBalls.MASTER_BALL.name) { + // Master balls are a netherite product and should be fire immune + fireResistant() + } +}) { override fun use(world: Level, player: Player, usedHand: InteractionHand): InteractionResultHolder { val itemStack = player.getItemInHand(usedHand) @@ -49,12 +55,4 @@ class PokeBallItem( } world.addFreshEntity(pokeBallEntity) } - - /* - override fun isFireproof(): Boolean { - return pokeBall.name == PokeBalls.MASTER_BALL.name || super.isFireproof() - } - - */ - } \ No newline at end of file diff --git a/common/src/main/resources/assets/cobblemon/bedrock/pokemon/animations/0165_ledyba/ledyba.animation.json b/common/src/main/resources/assets/cobblemon/bedrock/pokemon/animations/0165_ledyba/ledyba.animation.json index 578fc4120a..b506dac3ac 100644 --- a/common/src/main/resources/assets/cobblemon/bedrock/pokemon/animations/0165_ledyba/ledyba.animation.json +++ b/common/src/main/resources/assets/cobblemon/bedrock/pokemon/animations/0165_ledyba/ledyba.animation.json @@ -720,7 +720,7 @@ }, "sound_effects": { "0.0": { - "effect": "165" + "effect": "pokemon.ledyba.cry" } } } diff --git a/common/src/main/resources/assets/cobblemon/bedrock/pokemon/animations/0166_ledian/ledian.animation.json b/common/src/main/resources/assets/cobblemon/bedrock/pokemon/animations/0166_ledian/ledian.animation.json index 3c582e2bbd..408c5c55d9 100644 --- a/common/src/main/resources/assets/cobblemon/bedrock/pokemon/animations/0166_ledian/ledian.animation.json +++ b/common/src/main/resources/assets/cobblemon/bedrock/pokemon/animations/0166_ledian/ledian.animation.json @@ -767,7 +767,7 @@ }, "sound_effects": { "0.0": { - "effect": "166" + "effect": "pokemon.ledian.cry" } } } diff --git a/common/src/main/resources/assets/cobblemon/bedrock/pokemon/animations/0191_sunkern/sunkern.animation.json b/common/src/main/resources/assets/cobblemon/bedrock/pokemon/animations/0191_sunkern/sunkern.animation.json index 7c37d2314a..5e1a83788f 100644 --- a/common/src/main/resources/assets/cobblemon/bedrock/pokemon/animations/0191_sunkern/sunkern.animation.json +++ b/common/src/main/resources/assets/cobblemon/bedrock/pokemon/animations/0191_sunkern/sunkern.animation.json @@ -312,7 +312,7 @@ }, "sound_effects": { "0.0833": { - "effect": "191" + "effect": "pokemon.sunkern.cry" } } } diff --git a/common/src/main/resources/assets/cobblemon/bedrock/pokemon/animations/0192_sunflora/sunflora.animation.json b/common/src/main/resources/assets/cobblemon/bedrock/pokemon/animations/0192_sunflora/sunflora.animation.json index 6f9fd5277d..223a405faa 100644 --- a/common/src/main/resources/assets/cobblemon/bedrock/pokemon/animations/0192_sunflora/sunflora.animation.json +++ b/common/src/main/resources/assets/cobblemon/bedrock/pokemon/animations/0192_sunflora/sunflora.animation.json @@ -874,7 +874,7 @@ }, "sound_effects": { "0.125": { - "effect": "192" + "effect": "pokemon.sunflora.cry" } } } diff --git a/common/src/main/resources/assets/cobblemon/bedrock/pokemon/animations/0235_smeargle/smeargle.animation.json b/common/src/main/resources/assets/cobblemon/bedrock/pokemon/animations/0235_smeargle/smeargle.animation.json index b25df2e6bf..cfc19286ca 100644 --- a/common/src/main/resources/assets/cobblemon/bedrock/pokemon/animations/0235_smeargle/smeargle.animation.json +++ b/common/src/main/resources/assets/cobblemon/bedrock/pokemon/animations/0235_smeargle/smeargle.animation.json @@ -144,6 +144,14 @@ } } } + }, + "animation.smeargle.cry": { + "animation_length": 1.2, + "sound_effects": { + "0.04": { + "effect": "pokemon.smeargle.cry" + } + } } } } \ No newline at end of file diff --git a/common/src/main/resources/assets/cobblemon/bedrock/pokemon/posers/0595_joltik/joltik.json b/common/src/main/resources/assets/cobblemon/bedrock/pokemon/posers/0595_joltik/joltik.json index 903e920be8..f6f395430a 100644 --- a/common/src/main/resources/assets/cobblemon/bedrock/pokemon/posers/0595_joltik/joltik.json +++ b/common/src/main/resources/assets/cobblemon/bedrock/pokemon/posers/0595_joltik/joltik.json @@ -28,7 +28,10 @@ "q.bedrock('joltik', 'ground_idle')", "q.quadruped_walk(1, 1, 'leg_front_left', 'leg_front_right', 'leg_back_left', 'leg_back_right')" ], - "quirks": ["q.bedrock_quirk('joltik', 'blink')"] + "quirks": [ + "q.bedrock_quirk('joltik', 'blink1')", + "q.bedrock_quirk('joltik', 'blink2')" + ] } } } diff --git a/common/src/main/resources/assets/cobblemon/sounds/pokemon/ledian/ledian_cry.ogg b/common/src/main/resources/assets/cobblemon/sounds/pokemon/ledian/ledian_cry.ogg index d73c436e64..adac38d631 100644 Binary files a/common/src/main/resources/assets/cobblemon/sounds/pokemon/ledian/ledian_cry.ogg and b/common/src/main/resources/assets/cobblemon/sounds/pokemon/ledian/ledian_cry.ogg differ diff --git a/common/src/main/resources/assets/cobblemon/sounds/pokemon/ledyba/ledyba_cry.ogg b/common/src/main/resources/assets/cobblemon/sounds/pokemon/ledyba/ledyba_cry.ogg index d73c436e64..27896276a2 100644 Binary files a/common/src/main/resources/assets/cobblemon/sounds/pokemon/ledyba/ledyba_cry.ogg and b/common/src/main/resources/assets/cobblemon/sounds/pokemon/ledyba/ledyba_cry.ogg differ diff --git a/common/src/main/resources/assets/cobblemon/sounds/pokemon/smeargle/smeargle_cry.ogg b/common/src/main/resources/assets/cobblemon/sounds/pokemon/smeargle/smeargle_cry.ogg index d73c436e64..8b24a93b8f 100644 Binary files a/common/src/main/resources/assets/cobblemon/sounds/pokemon/smeargle/smeargle_cry.ogg and b/common/src/main/resources/assets/cobblemon/sounds/pokemon/smeargle/smeargle_cry.ogg differ diff --git a/common/src/main/resources/assets/cobblemon/sounds/pokemon/sunflora/sunflora_cry.ogg b/common/src/main/resources/assets/cobblemon/sounds/pokemon/sunflora/sunflora_cry.ogg index d73c436e64..c842091a79 100644 Binary files a/common/src/main/resources/assets/cobblemon/sounds/pokemon/sunflora/sunflora_cry.ogg and b/common/src/main/resources/assets/cobblemon/sounds/pokemon/sunflora/sunflora_cry.ogg differ diff --git a/common/src/main/resources/assets/cobblemon/sounds/pokemon/sunkern/sunkern_cry.ogg b/common/src/main/resources/assets/cobblemon/sounds/pokemon/sunkern/sunkern_cry.ogg index d73c436e64..38391c1d20 100644 Binary files a/common/src/main/resources/assets/cobblemon/sounds/pokemon/sunkern/sunkern_cry.ogg and b/common/src/main/resources/assets/cobblemon/sounds/pokemon/sunkern/sunkern_cry.ogg differ diff --git a/utilityscripts/cobblemon_cry_checker.py b/utilityscripts/cobblemon_cry_checker.py index 31f254516e..129ef9daa2 100644 --- a/utilityscripts/cobblemon_cry_checker.py +++ b/utilityscripts/cobblemon_cry_checker.py @@ -9,6 +9,7 @@ from scriptutils import printCobblemonHeader, print_list_filtered, print_cobblem print_cobblemon_script_footer, print_problems_and_paths, print_warning, sanitize_pokemon, print_separator DEFAULT_POKEMON_MODELS_PATH = "../common/src/main/kotlin/com/cobblemon/mod/common/client/render/models/blockbench/pokemon/" +DEFAULT_POKEMON_POSER_PATH = "../common/src/main/resources/assets/cobblemon/bedrock/pokemon/posers/" # Download the CSV file ASSETS_CSV_URL = "https://docs.google.com/spreadsheets/d/e/2PACX-1vSTisDTkJvV0GzKV1zKjAPdMAQAO7znWxjEWXrM1gZPUVmsTU91oy54aJGMpbbvOqAOg03ER1wl7eeA/pub?gid=0&single=true&output=csv" @@ -141,6 +142,7 @@ def main(print_missing_models=True, print_missing_animations=True): animations = None # Check if the Model.kt file exists and contains the required import and cryAnimation override + json_poser_path = os.path.join(DEFAULT_POKEMON_POSER_PATH, dex_number + "_" + sanitized_pokemon_name_lower, sanitized_pokemon_name_lower + ".json") if os.path.isfile(model_file_path): content = read_file_ignore_comments(model_file_path) if "import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider" in content: @@ -165,10 +167,19 @@ def main(print_missing_models=True, print_missing_animations=True): content_between_braces, pokemon_name, all_warnings_combined)) + elif os.path.isfile(json_poser_path): + try: + with open(json_poser_path, 'r', encoding="utf-8-sig") as file: + data = json.load(file) + if "animations" in data and "cry" in data["animations"] and sanitized_pokemon_name_lower in data["animations"]["cry"]: + checks["override_correct"] = True + checks["import_correct"] = True + + except json.decoder.JSONDecodeError: + print_warning("Invalid JSON poser in " + dex_number + "_" + sanitized_pokemon_name_lower + "/" + sanitized_pokemon_name_lower + ".json") else: all_warnings_combined.append( - (pokemon_name, - f"⚠️ Warning: Model.kt file not found at: {model_file_path.replace(DEFAULT_POKEMON_MODELS_PATH, '...')}")) + (pokemon_name, f"⚠️ Warning: Model.kt file or JSON poser not found for: {sanitized_pokemon_name_lower}")) # Ignore the checks for this file checks["override_correct"] = True checks["import_correct"] = True