Merge branch 'implement_pokemon' into 'main'

poser tweaks + jellicent placeholders

See merge request cable-mc/cobblemon!2474
This commit is contained in:
Polymeta
2026-10-10 12:15:04 +00:00
11 changed files with 2647 additions and 328 deletions
@@ -1,98 +0,0 @@
/*
* Copyright (C) 2023 Cobblemon Contributors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen1
import com.cobblemon.mod.common.client.render.models.blockbench.PosableState
import com.cobblemon.mod.common.client.render.models.blockbench.createTransformation
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
import com.cobblemon.mod.common.client.render.models.blockbench.pose.CobblemonPose
import com.cobblemon.mod.common.client.render.models.blockbench.pose.ModelPartTransformation
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
import com.cobblemon.mod.common.entity.PoseType
import com.cobblemon.mod.common.entity.PoseType.Companion.MOVING_POSES
import com.cobblemon.mod.common.entity.PoseType.Companion.STATIONARY_POSES
import com.cobblemon.mod.common.entity.PoseType.Companion.UI_POSES
import net.minecraft.client.model.geom.ModelPart
import net.minecraft.world.phys.Vec3
class CaterpieModel(root: ModelPart) : PokemonPosableModel(root), HeadedFrame {
override val rootPart = root.registerChildWithAllChildren("caterpie")
override val head = getPart("head")
override var portraitScale = 2.1F
override var portraitTranslation = Vec3(-0.55, -1.55, 0.0)
override var profileScale = 0.8F
override var profileTranslation = Vec3(0.0, 0.55, 0.0)
lateinit var sleep: Pose
lateinit var standing: Pose
lateinit var walk: Pose
lateinit var shoulderLeft: CobblemonPose
lateinit var shoulderRight: CobblemonPose
val shoulderOffset = 3
override val cryAnimation = CryProvider { bedrockStateful("caterpie", "cry") }
override fun registerPoses() {
val blink = quirk { bedrockStateful("caterpie", "blink")}
sleep = registerPose(
poseType = PoseType.SLEEP,
transformTicks = 10,
animations = arrayOf(bedrock("caterpie", "sleep"))
)
standing = registerPose(
poseName = "standing",
poseTypes = STATIONARY_POSES + UI_POSES,
quirks = arrayOf(blink),
animations = arrayOf(
singleBoneLook(),
bedrock("caterpie", "ground_idle")
)
)
walk = registerPose(
poseName = "walking",
poseTypes = MOVING_POSES,
quirks = arrayOf(blink),
animations = arrayOf(
singleBoneLook(),
bedrock("caterpie", "ground_walk")
)
)
shoulderLeft = registerPose(
poseType = PoseType.SHOULDER_LEFT,
quirks = arrayOf(blink),
animations = arrayOf(
bedrock("caterpie", "ground_idle")
),
transformedParts = arrayOf(
rootPart.createTransformation().addPosition(ModelPartTransformation.X_AXIS, shoulderOffset)
)
)
shoulderRight = registerPose(
poseType = PoseType.SHOULDER_RIGHT,
quirks = arrayOf(blink),
animations = arrayOf(
bedrock("caterpie", "ground_idle")
),
transformedParts = arrayOf(
rootPart.createTransformation().addPosition(ModelPartTransformation.X_AXIS, -shoulderOffset)
)
)
}
override fun getFaintAnimation(state: PosableState) = bedrockStateful("caterpie", "faint")
}
@@ -1,98 +0,0 @@
/*
* Copyright (C) 2023 Cobblemon Contributors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen1
import com.cobblemon.mod.common.client.render.models.blockbench.PosableState
import com.cobblemon.mod.common.client.render.models.blockbench.createTransformation
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
import com.cobblemon.mod.common.client.render.models.blockbench.pose.ModelPartTransformation
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
import com.cobblemon.mod.common.entity.PoseType
import com.cobblemon.mod.common.entity.PoseType.Companion.MOVING_POSES
import com.cobblemon.mod.common.entity.PoseType.Companion.STATIONARY_POSES
import com.cobblemon.mod.common.entity.PoseType.Companion.UI_POSES
import net.minecraft.client.model.geom.ModelPart
import net.minecraft.world.phys.Vec3
class WeedleModel(root: ModelPart) : PokemonPosableModel(root), HeadedFrame {
override val rootPart = root.registerChildWithAllChildren("weedle")
override val head = getPart("head")
override var portraitScale = 2.2F
override var portraitTranslation = Vec3(-0.31, -1.83, 0.0)
override var profileScale = 0.8F
override var profileTranslation = Vec3(0.1, 0.6, 0.0)
lateinit var sleep: Pose
lateinit var standing: Pose
lateinit var walk: Pose
lateinit var shoulderLeft: Pose
lateinit var shoulderRight: Pose
val shoulderOffset = 3.8
val shoulderZOffset = -3
override val cryAnimation = CryProvider { bedrockStateful("weedle", "cry") }
override fun registerPoses() {
val blink = quirk { bedrockStateful("weedle", "blink")}
sleep = registerPose(
poseType = PoseType.SLEEP,
animations = arrayOf(bedrock("weedle", "sleep"))
)
standing = registerPose(
poseName = "standing",
poseTypes = STATIONARY_POSES + UI_POSES,
quirks = arrayOf(blink),
animations = arrayOf(
singleBoneLook(),
bedrock("weedle", "ground_idle2")
)
)
walk = registerPose(
poseName = "walk",
poseTypes = MOVING_POSES,
quirks = arrayOf(blink),
animations = arrayOf(
singleBoneLook(),
bedrock("weedle", "ground_walk")
)
)
shoulderLeft = registerPose(
poseType = PoseType.SHOULDER_LEFT,
quirks = arrayOf(blink),
animations = arrayOf(
bedrock("weedle", "ground_idle")
),
transformedParts = arrayOf(
rootPart.createTransformation().addPosition(ModelPartTransformation.X_AXIS, shoulderOffset),
rootPart.createTransformation().addPosition(ModelPartTransformation.Z_AXIS, shoulderZOffset)
)
)
shoulderRight = registerPose(
poseType = PoseType.SHOULDER_RIGHT,
quirks = arrayOf(blink),
animations = arrayOf(
bedrock("weedle", "ground_idle")
),
transformedParts = arrayOf(
rootPart.createTransformation().addPosition(ModelPartTransformation.X_AXIS, -shoulderOffset),
rootPart.createTransformation().addPosition(ModelPartTransformation.Z_AXIS, shoulderZOffset)
)
)
}
override fun getFaintAnimation(state: PosableState) = bedrockStateful("weedle", "faint")
}
@@ -1,59 +0,0 @@
/*
* Copyright (C) 2023 Cobblemon Contributors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen5
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
import com.cobblemon.mod.common.client.render.models.blockbench.pose.CobblemonPose
import com.cobblemon.mod.common.entity.PoseType
import net.minecraft.client.model.geom.ModelPart
import net.minecraft.world.phys.Vec3
class JellicentModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame {
override val rootPart = root.registerChildWithAllChildren("jellicent")
override val head = getPart("head")
override var portraitScale = 1.13F
override var portraitTranslation = Vec3(-0.56, 1.64, 0.0)
override var profileScale = 0.51F
override var profileTranslation = Vec3(0.0, 1.05, 0.0)
lateinit var standing: CobblemonPose
lateinit var walk: CobblemonPose
override fun registerPoses() {
val blink = quirk { bedrockStateful("jellicent", "blink") }
standing = registerPose(
poseName = "standing",
poseTypes = PoseType.STATIONARY_POSES + PoseType.UI_POSES,
quirks = arrayOf(blink),
animations = arrayOf(
singleBoneLook(),
bedrock("jellicent", "render")
)
)
walk = registerPose(
poseName = "walk",
poseTypes = PoseType.MOVING_POSES,
quirks = arrayOf(blink),
animations = arrayOf(
singleBoneLook(),
bedrock("jellicent", "render")
)
)
}
// override fun getFaintAnimation(
// pokemonEntity: PokemonEntity,
// state: PosableState<PokemonEntity>
// ) = if (state.isPosedIn(standing, walk)) bedrockStateful("jellicent", "faint") else null
}
@@ -1,57 +0,0 @@
/*
* Copyright (C) 2023 Cobblemon Contributors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen7
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
import com.cobblemon.mod.common.entity.PoseType
import com.cobblemon.mod.common.entity.PoseType.Companion.UI_POSES
import net.minecraft.client.model.geom.ModelPart
import net.minecraft.world.phys.Vec3
class CrabominableModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame {
override val rootPart = root.registerChildWithAllChildren("crabominable")
override val head = getPart("head")
override var portraitScale = 1.0F
override var portraitTranslation = Vec3(-0.55, 1.65, 0.0)
override var profileScale = 0.3F
override var profileTranslation = Vec3(0.0, 1.2, 0.0)
lateinit var standing: Pose
lateinit var walk: Pose
override fun registerPoses() {
standing = registerPose(
poseName = "standing",
poseTypes = PoseType.STATIONARY_POSES + UI_POSES,
animations = arrayOf(
singleBoneLook(),
bedrock("crabominable", "ground_idle")
)
)
walk = registerPose(
poseName = "walk",
poseTypes = PoseType.MOVING_POSES,
animations = arrayOf(
singleBoneLook(),
bedrock("crabominable", "ground_idle"),
bedrock("crabominable", "ground_walk")
)
)
}
// override fun getFaintAnimation(
// pokemonEntity: PokemonEntity,
// state: PosableState<PokemonEntity>
// ) = if (state.isPosedIn(standing, walk)) bedrockStateful("crabominable", "faint") else null
}
@@ -220,10 +220,8 @@ object VaryingModelRepository {
inbuilt("squirtle", ::SquirtleModel)
inbuilt("wartortle", ::WartortleModel)
inbuilt("caterpie", ::CaterpieModel)
inbuilt("metapod", ::MetapodModel)
inbuilt("butterfree", ::ButterfreeModel)
inbuilt("weedle", ::WeedleModel)
inbuilt("beedrill", ::BeedrillModel)
inbuilt("raticate", ::RaticateModel)
inbuilt("raticate_alolan", ::RaticateAlolanModel)
@@ -446,7 +444,6 @@ object VaryingModelRepository {
inbuilt("bayleef", ::BayleefModel)
inbuilt("meganium", ::MeganiumModel)
inbuilt("crabrawler", ::CrabrawlerModel)
inbuilt("crabominable", ::CrabominableModel)
inbuilt("wimpod", ::WimpodModel)
inbuilt("golisopod", ::GolisopodModel)
inbuilt("ralts", ::RaltsModel)
@@ -502,7 +499,6 @@ object VaryingModelRepository {
inbuilt("woobat", ::WoobatModel)
inbuilt("swoobat", ::SwoobatModel)
inbuilt("frillish", ::FrillishModel)
inbuilt("jellicent", ::JellicentModel)
inbuilt("cubchoo", ::CubchooModel)
inbuilt("beartic", ::BearticModel)
inbuilt("dreepy", ::DreepyModel)
@@ -0,0 +1,69 @@
{
"portraitScale": 2.1,
"portraitTranslation": [ -0.55, -1.55, 0 ],
"profileScale": 0.80,
"profileTranslation": [ 0, 0.55, 0 ],
"rootBone": "caterpie",
"animations": {
"cry": "q.bedrock_stateful('caterpie', 'cry')",
"faint": "q.bedrock_primary('caterpie', 'faint', q.curve('one'))"
},
"poses": {
"standing": {
"poseTypes": ["STAND", "NONE", "FLOAT", "PORTRAIT", "PROFILE"],
"animations": [
"q.look('head')",
"q.bedrock('caterpie', 'ground_idle')"
],
"quirks": ["q.bedrock_quirk('caterpie', 'blink')"]
},
"walking": {
"poseTypes": ["WALK"],
"animations": [
"q.look('head')",
"q.bedrock('caterpie', 'ground_walk')"
],
"quirks": ["q.bedrock_quirk('caterpie', 'blink')"]
},
"swimming": {
"poseTypes": ["WALK","SWIM"],
"isTouchingWater": true,
"animations": [
"q.pitch_tilt('body')",
"q.look('head')",
"q.bedrock('caterpie', 'ground_walk')"
],
"quirks": ["q.bedrock_quirk('caterpie', 'blink')"]
},
"sleep": {
"poseTypes": ["SLEEP"],
"namedAnimations": {
"cry": "q.bedrock_stateful('dummy', 'cry')"
},
"animations": ["q.bedrock('caterpie', 'sleep')"]
},
"shoulder_left": {
"poseTypes": ["SHOULDER_LEFT"],
"animations": ["q.look('head')", "q.bedrock('caterpie', 'ground_idle')"],
"quirks": ["q.bedrock_quirk('caterpie', 'blink')"],
"transformedParts": [
{
"part": "body",
"position": [3, 0, 0]
}
]
},
"shoulder_right": {
"poseTypes": ["SHOULDER_RIGHT"],
"animations": ["q.look('head')", "q.bedrock('caterpie', 'ground_idle')"],
"quirks": ["q.bedrock_quirk('caterpie', 'blink')"],
"transformedParts": [
{
"part": "body",
"position": [-3, 0, 0]
}
]
}
}
}
@@ -0,0 +1,69 @@
{
"portraitScale": 2.3,
"portraitTranslation": [-0.53, -1.9, 0],
"profileScale": 0.80,
"profileTranslation": [0, 0.51, 0],
"rootBone": "weedle",
"animations": {
"cry": "q.bedrock_stateful('weedle', 'cry')",
"faint": "q.bedrock_primary('weedle', 'faint', q.curve('one'))"
},
"poses": {
"standing": {
"poseTypes": ["STAND", "NONE", "FLOAT", "PORTRAIT", "PROFILE"],
"animations": [
"q.look('head')",
"q.bedrock('weedle', 'ground_idle2')"
],
"quirks": ["q.bedrock_quirk('weedle', 'blink')"]
},
"walking": {
"poseTypes": ["WALK"],
"animations": [
"q.look('head')",
"q.bedrock('weedle', 'ground_walk')"
],
"quirks": ["q.bedrock_quirk('weedle', 'blink')"]
},
"swimming": {
"poseTypes": ["WALK","SWIM"],
"isTouchingWater": true,
"animations": [
"q.pitch_tilt('body')",
"q.look('head')",
"q.bedrock('weedle', 'ground_walk')"
],
"quirks": ["q.bedrock_quirk('weedle', 'blink')"]
},
"sleep": {
"poseTypes": ["SLEEP"],
"namedAnimations": {
"cry": "q.bedrock_stateful('dummy', 'cry')"
},
"animations": ["q.bedrock('weedle', 'sleep')"]
},
"shoulder_left": {
"poseTypes": ["SHOULDER_LEFT"],
"animations": ["q.look('head')", "q.bedrock('weedle', 'ground_idle')"],
"quirks": ["q.bedrock_quirk('weedle', 'blink')"],
"transformedParts": [
{
"part": "body",
"position": [3.8, 0, -3]
}
]
},
"shoulder_right": {
"poseTypes": ["SHOULDER_RIGHT"],
"animations": ["q.look('head')", "q.bedrock('weedle', 'ground_idle')"],
"quirks": ["q.bedrock_quirk('weedle', 'blink')"],
"transformedParts": [
{
"part": "body",
"position": [-3.8, 0, -3]
}
]
}
}
}
@@ -0,0 +1,42 @@
{
"portraitScale": 1.13,
"portraitTranslation": [-0.56, 1.64, 0],
"profileScale": 0.51,
"profileTranslation": [0, 1.05, 0],
"rootBone": "jellicent",
"animations": {
"recoil": "q.bedrock_stateful('jellicent', 'recoil')"
},
"poses": {
"standing": {
"poseTypes": ["STAND", "NONE", "FLOAT", "PORTRAIT", "PROFILE"],
"animations": [
"q.look('head')",
"q.bedrock('jellicent', 'water_idle')"
],
"quirks": ["q.bedrock_quirk('jellicent', 'blink')"]
},
"walking": {
"poseTypes": ["WALK"],
"animations": [
"q.look('head')",
"q.bedrock('jellicent', 'water_swim')"
],
"quirks": ["q.bedrock_quirk('jellicent', 'blink')"]
},
"flying": {
"poseTypes": ["FLY", "SWIM"],
"animations": [
"q.pitch_tilt('body')",
"q.look('head')",
"q.bedrock('jellicent', 'water_swim')"
],
"quirks": ["q.bedrock_quirk('jellicent', 'blink')"]
},
"sleep": {
"poseTypes": ["SLEEP"],
"animations": ["q.bedrock('jellicent', 'sleep')"]
}
}
}
@@ -39,7 +39,7 @@
"isBattle": true,
"isTouchingWater": false,
"animations": [
"q.look('head_ai')",
"q.look('head_ai', -1, 1, 0, 0, 45, -45)",
"q.look('tongue1', -1, 1, 70, -45, 0, 0)",
"q.bedrock('greninja', 'battle_idle')"
],
@@ -0,0 +1,28 @@
{
"portraitScale": 1.0,
"portraitTranslation": [-0.55, 1.65, 0],
"profileScale": 0.3,
"profileTranslation": [0, 1.2, 0],
"rootBone": "crabominable",
"animations": {
"cry": "q.bedrock_stateful('crabominable', 'cry')"
},
"poses": {
"standing": {
"poseTypes": ["STAND", "NONE", "FLOAT", "PORTRAIT", "PROFILE"],
"animations": [
"q.bedrock('crabominable', 'ground_idle')"
],
"quirks": ["q.bedrock_quirk('crabominable', 'blink')"]
},
"walking": {
"poseTypes": ["WALK", "SWIM"],
"animations": [
"q.bedrock('crabominable', 'ground_idle')",
"q.bedrock('crabominable', 'ground_walk')"
],
"quirks": ["q.bedrock_quirk('crabominable', 'blink')"]
}
}
}