mirror of
https://gitlab.com/cable-mc/cobblemon.git
synced 2026-11-25 09:38:53 -05:00
refactor: Persian (+ alola) posers
This commit is contained in:
1 parent
49b62fff2b
commit
632bfea23e
5 files changed
+119
-157
No files matched your search
-76
@@ -1,76 +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.animation.QuadrupedWalkAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.QuadrupedFrame
|
||||
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.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 PersianAlolanModel(root: ModelPart) : PokemonPosableModel(root), HeadedFrame, QuadrupedFrame {
|
||||
override val rootPart = root.registerChildWithAllChildren("persian")
|
||||
override val head = getPart("head")
|
||||
|
||||
override val foreLeftLeg= getPart("leg_front_left1")
|
||||
override val foreRightLeg = getPart("leg_front_right1")
|
||||
override val hindLeftLeg = getPart("leg_back_left1")
|
||||
override val hindRightLeg = getPart("leg_back_right1")
|
||||
|
||||
override var portraitScale = 2.0F
|
||||
override var portraitTranslation = Vec3(-0.76, -0.11, 0.0)
|
||||
|
||||
override var profileScale = 0.9F
|
||||
override var profileTranslation = Vec3(0.0, 0.38, 0.0)
|
||||
|
||||
lateinit var sleep: Pose
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("persian_alolan", "blink")}
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = STATIONARY_POSES + UI_POSES,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("persian_alolan", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
sleep = registerPose(
|
||||
poseType = PoseType.SLEEP,
|
||||
animations = arrayOf(bedrock("persian_alolan", "sleep"))
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walk",
|
||||
poseTypes = MOVING_POSES,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
QuadrupedWalkAnimation(this, periodMultiplier = 0.5F, amplitudeMultiplier = 1.1F),
|
||||
singleBoneLook(),
|
||||
bedrock("persian_alolan", "ground_idle")
|
||||
//bedrock("persian_alolan", "ground_walk")
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
// override fun getFaintAnimation(
|
||||
// pokemonEntity: PokemonEntity,
|
||||
// state: PosableState<PokemonEntity>
|
||||
// ) = if (state.isPosedIn(standing, walk)) bedrockStateful("persian_alolan", "faint") else null
|
||||
}
|
||||
-79
@@ -1,79 +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.animation.QuadrupedWalkAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.QuadrupedFrame
|
||||
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.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 PersianModel(root: ModelPart) : PokemonPosableModel(root), HeadedFrame, QuadrupedFrame {
|
||||
override val rootPart = root.registerChildWithAllChildren("persian")
|
||||
override val head = getPart("neck")
|
||||
|
||||
override val foreLeftLeg= getPart("leg_front_left1")
|
||||
override val foreRightLeg = getPart("leg_front_right1")
|
||||
override val hindLeftLeg = getPart("leg_back_left1")
|
||||
override val hindRightLeg = getPart("leg_back_right1")
|
||||
|
||||
override var portraitScale = 2.0F
|
||||
override var portraitTranslation = Vec3(-0.8, 0.3, 0.0)
|
||||
|
||||
override var profileScale = 0.9F
|
||||
override var profileTranslation = Vec3(0.0, 0.38, 0.0)
|
||||
|
||||
lateinit var sleep: Pose
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("persian", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("persian", "blink")}
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = STATIONARY_POSES + UI_POSES,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("persian", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
sleep = registerPose(
|
||||
poseType = PoseType.SLEEP,
|
||||
animations = arrayOf(bedrock("persian", "sleep"))
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walk",
|
||||
poseTypes = MOVING_POSES,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
QuadrupedWalkAnimation(this, periodMultiplier = 0.5F, amplitudeMultiplier = 1.1F),
|
||||
singleBoneLook(),
|
||||
bedrock("persian", "ground_idle")
|
||||
//bedrock("persian", "ground_walk")
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
// override fun getFaintAnimation(
|
||||
// pokemonEntity: PokemonEntity,
|
||||
// state: PosableState<PokemonEntity>
|
||||
// ) = if (state.isPosedIn(standing, walk)) bedrockStateful("persian", "faint") else null
|
||||
}
|
||||
-2
@@ -246,7 +246,6 @@ object VaryingModelRepository {
|
||||
inbuilt("krabby", ::KrabbyModel)
|
||||
inbuilt("lickitung", ::LickitungModel)
|
||||
inbuilt("marowak", ::MarowakModel)
|
||||
inbuilt("persian", ::PersianModel)
|
||||
inbuilt("pinsir", ::PinsirModel)
|
||||
inbuilt("ponyta", ::PonytaModel)
|
||||
inbuilt("psyduck", ::PsyduckModel)
|
||||
@@ -409,7 +408,6 @@ object VaryingModelRepository {
|
||||
inbuilt("obstagoon", :: ObstagoonModel)
|
||||
inbuilt("wishiwashi_solo", :: WishiwashiSoloModel)
|
||||
inbuilt("wishiwashi_schooling", :: WishiwashiSchoolingModel)
|
||||
inbuilt("persian_alolan", ::PersianAlolanModel)
|
||||
inbuilt("perrserker", ::PerrserkerModel)
|
||||
inbuilt("komala", ::KomalaModel)
|
||||
inbuilt("phantump", ::PhantumpModel)
|
||||
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"rootBone": "persian",
|
||||
"portraitScale": 2,
|
||||
"portraitTranslation": [
|
||||
-0.8,
|
||||
0.3,
|
||||
0
|
||||
],
|
||||
"animations": {
|
||||
"cry": "q.bedrock_stateful('persian', 'cry')"
|
||||
},
|
||||
"profileScale": 0.9,
|
||||
"profileTranslation": [
|
||||
0,
|
||||
0.38,
|
||||
0
|
||||
],
|
||||
"poses": {
|
||||
"standing": {
|
||||
"poseTypes": [
|
||||
"STAND",
|
||||
"FLOAT",
|
||||
"HOVER",
|
||||
"PROFILE",
|
||||
"PORTRAIT"
|
||||
],
|
||||
"animations": [
|
||||
"q.look('neck')",
|
||||
"q.bedrock('persian', 'ground_idle')"
|
||||
],
|
||||
"quirks": [
|
||||
"q.bedrock_quirk('persian', 'blink')"
|
||||
]
|
||||
},
|
||||
"sleep": {
|
||||
"poseTypes": [
|
||||
"SLEEP"
|
||||
],
|
||||
"animations": [
|
||||
"q.bedrock('persian', 'sleep')"
|
||||
]
|
||||
},
|
||||
"walk": {
|
||||
"poseTypes": [
|
||||
"WALK",
|
||||
"SWIM",
|
||||
"FLY"
|
||||
],
|
||||
"animations": [
|
||||
"q.look('neck')",
|
||||
"q.bedrock('persian', 'ground_idle')",
|
||||
"q.quadruped_walk(0.5, 1.1, 'leg_front_left1', 'leg_front_right1', 'leg_back_left1', 'leg_back_right1')"
|
||||
],
|
||||
"quirks": [
|
||||
"q.bedrock_quirk('persian', 'blink')"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"rootBone": "persian",
|
||||
"portraitScale": 2,
|
||||
"portraitTranslation": [
|
||||
-0.76,
|
||||
-0.11,
|
||||
0
|
||||
],
|
||||
"profileScale": 0.9,
|
||||
"profileTranslation": [
|
||||
0,
|
||||
0.38,
|
||||
0
|
||||
],
|
||||
"animations": {
|
||||
"cry": "q.bedrock_stateful('persian_alolan', 'cry')"
|
||||
},
|
||||
"poses": {
|
||||
"standing": {
|
||||
"poseTypes": [
|
||||
"STAND",
|
||||
"FLOAT",
|
||||
"HOVER",
|
||||
"PROFILE",
|
||||
"PORTRAIT"
|
||||
],
|
||||
"animations": [
|
||||
"q.look('head')",
|
||||
"q.bedrock('persian_alolan', 'ground_idle')"
|
||||
],
|
||||
"quirks": [
|
||||
"q.bedrock_quirk('persian_alolan', 'blink')"
|
||||
]
|
||||
},
|
||||
"sleep": {
|
||||
"poseTypes": [
|
||||
"SLEEP"
|
||||
],
|
||||
"animations": [
|
||||
"q.bedrock('persian_alolan', 'sleep')"
|
||||
]
|
||||
},
|
||||
"walk": {
|
||||
"poseName": "walk",
|
||||
"poseTypes": [
|
||||
"WALK",
|
||||
"SWIM",
|
||||
"FLY"
|
||||
],
|
||||
"animations": [
|
||||
"q.look('head')",
|
||||
"q.bedrock('persian_alolan', 'ground_idle')",
|
||||
"q.quadruped_walk(0.5, 1.1, 'leg_front_left1', 'leg_front_right1', 'leg_back_left1', 'leg_back_right1')"
|
||||
],
|
||||
"quirks": [
|
||||
"q.bedrock_quirk('persian_alolan', 'blink')"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user