mirror of
https://gitlab.com/cable-mc/cobblemon.git
synced 2026-11-19 06:38:53 -05:00
Converted Oshawott to json poser
This commit is contained in:
1 parent
f0c0bb2521
commit
cd827eccbf
4 files changed
+90
-226
No files matched your search
-112
@@ -1,112 +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.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.BimanualSwingAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.BipedWalkAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.createTransformation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BimanualFrame
|
||||
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.CryProvider
|
||||
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.entity.PoseType
|
||||
import com.cobblemon.mod.common.util.isBattling
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class OshawottHisuiBiasModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame, BipedFrame, BimanualFrame {
|
||||
override val rootPart = root.registerChildWithAllChildren("oshawott_hisui_bias")
|
||||
override val head = getPart("head")
|
||||
override val rightArm = getPart("arm_right")
|
||||
override val leftArm = getPart("arm_left")
|
||||
override val rightLeg = getPart("leg_right")
|
||||
override val leftLeg = getPart("leg_left")
|
||||
val scalchop = getPart("scalchop_hand")
|
||||
val scalchopbody = getPart("scalchop_torso")
|
||||
|
||||
override var portraitScale = 2.0F
|
||||
override var portraitTranslation = Vec3(-0.2, -0.15, 0.0)
|
||||
override var profileScale = 0.7F
|
||||
override var profileTranslation = Vec3(0.0, 0.69, 0.0)
|
||||
|
||||
lateinit var battleidle: CobblemonPose
|
||||
lateinit var sleep: CobblemonPose
|
||||
lateinit var standing: CobblemonPose
|
||||
lateinit var walk: CobblemonPose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("oshawott_hisui_bias", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("oshawott_hisui_bias", "blink") }
|
||||
|
||||
sleep = registerPose(
|
||||
poseType = PoseType.SLEEP,
|
||||
transformTicks = 10,
|
||||
transformedParts = arrayOf(
|
||||
scalchop.createTransformation().withVisibility(visibility = false),
|
||||
scalchopbody.createTransformation().withVisibility(visibility = true),
|
||||
rootPart.createTransformation().addPosition(ModelPartTransformation.Y_AXIS, -7)
|
||||
),
|
||||
animations = arrayOf(bedrock("oshawott_hisui_bias", "sleep"))
|
||||
)
|
||||
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = setOf(PoseType.NONE, PoseType.STAND, PoseType.PORTRAIT, PoseType.PROFILE),
|
||||
transformTicks = 10,
|
||||
quirks = arrayOf(blink),
|
||||
condition = { !it.isBattling },
|
||||
transformedParts = arrayOf(
|
||||
scalchop.createTransformation().withVisibility(visibility = false),
|
||||
scalchopbody.createTransformation().withVisibility(visibility = true)
|
||||
),
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("oshawott_hisui_bias", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walking",
|
||||
poseTypes = setOf(PoseType.SWIM, PoseType.WALK),
|
||||
transformTicks = 10,
|
||||
quirks = arrayOf(blink),
|
||||
condition = { !it.isBattling },
|
||||
transformedParts = arrayOf(
|
||||
scalchop.createTransformation().withVisibility(visibility = false),
|
||||
scalchopbody.createTransformation().withVisibility(visibility = true)
|
||||
),
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("oshawott_hisui_bias", "ground_idle"),
|
||||
BipedWalkAnimation(this, periodMultiplier = 0.6F, amplitudeMultiplier = 0.9F),
|
||||
BimanualSwingAnimation(this, swingPeriodMultiplier = 0.6F, amplitudeMultiplier = 0.9F)
|
||||
)
|
||||
)
|
||||
|
||||
battleidle = registerPose(
|
||||
poseName = "battle_idle",
|
||||
poseTypes = PoseType.STATIONARY_POSES + PoseType.FLOAT,
|
||||
transformTicks = 10,
|
||||
quirks = arrayOf(blink),
|
||||
condition = { it.isBattling },
|
||||
transformedParts = arrayOf(
|
||||
scalchop.createTransformation().withVisibility(visibility = true),
|
||||
scalchopbody.createTransformation().withVisibility(visibility = false)
|
||||
),
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("oshawott_hisui_bias", "ground_idle")
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
-112
@@ -1,112 +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.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.BimanualSwingAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.BipedWalkAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.createTransformation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BimanualFrame
|
||||
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.CryProvider
|
||||
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.entity.PoseType
|
||||
import com.cobblemon.mod.common.util.isBattling
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class OshawottModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame, BipedFrame, BimanualFrame {
|
||||
override val rootPart = root.registerChildWithAllChildren("oshawott")
|
||||
override val head = getPart("head")
|
||||
override val rightArm = getPart("arm_right")
|
||||
override val leftArm = getPart("arm_left")
|
||||
override val rightLeg = getPart("leg_right")
|
||||
override val leftLeg = getPart("leg_left")
|
||||
val scalchop = getPart("scalchop_hand")
|
||||
val scalchopbody = getPart("scalchop_torso")
|
||||
|
||||
override var portraitScale = 2.0F
|
||||
override var portraitTranslation = Vec3(-0.2, -0.15, 0.0)
|
||||
override var profileScale = 0.7F
|
||||
override var profileTranslation = Vec3(0.0, 0.69, 0.0)
|
||||
|
||||
lateinit var battleidle: CobblemonPose
|
||||
lateinit var sleep: CobblemonPose
|
||||
lateinit var standing: CobblemonPose
|
||||
lateinit var walk: CobblemonPose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("oshawott", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("oshawott", "blink") }
|
||||
|
||||
sleep = registerPose(
|
||||
poseType = PoseType.SLEEP,
|
||||
transformTicks = 10,
|
||||
transformedParts = arrayOf(
|
||||
scalchop.createTransformation().withVisibility(visibility = false),
|
||||
scalchopbody.createTransformation().withVisibility(visibility = true),
|
||||
rootPart.createTransformation().addPosition(ModelPartTransformation.Y_AXIS, -7)
|
||||
),
|
||||
animations = arrayOf(bedrock("oshawott", "sleep"))
|
||||
)
|
||||
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = setOf(PoseType.NONE, PoseType.STAND, PoseType.PORTRAIT, PoseType.PROFILE),
|
||||
transformTicks = 10,
|
||||
quirks = arrayOf(blink),
|
||||
condition = { !it.isBattling },
|
||||
transformedParts = arrayOf(
|
||||
scalchop.createTransformation().withVisibility(visibility = false),
|
||||
scalchopbody.createTransformation().withVisibility(visibility = true)
|
||||
),
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("oshawott", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walking",
|
||||
poseTypes = setOf(PoseType.SWIM, PoseType.WALK),
|
||||
transformTicks = 10,
|
||||
quirks = arrayOf(blink),
|
||||
condition = { !it.isBattling },
|
||||
transformedParts = arrayOf(
|
||||
scalchop.createTransformation().withVisibility(visibility = false),
|
||||
scalchopbody.createTransformation().withVisibility(visibility = true)
|
||||
),
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("oshawott", "ground_idle"),
|
||||
BipedWalkAnimation(this, periodMultiplier = 0.6F, amplitudeMultiplier = 0.9F),
|
||||
BimanualSwingAnimation(this, swingPeriodMultiplier = 0.6F, amplitudeMultiplier = 0.9F)
|
||||
)
|
||||
)
|
||||
|
||||
battleidle = registerPose(
|
||||
poseName = "battle_idle",
|
||||
poseTypes = PoseType.STATIONARY_POSES + PoseType.FLOAT,
|
||||
transformTicks = 10,
|
||||
quirks = arrayOf(blink),
|
||||
condition = { it.isBattling },
|
||||
transformedParts = arrayOf(
|
||||
scalchop.createTransformation().withVisibility(visibility = true),
|
||||
scalchopbody.createTransformation().withVisibility(visibility = false)
|
||||
),
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("oshawott", "ground_idle")
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
-2
@@ -356,7 +356,6 @@ object VaryingModelRepository {
|
||||
inbuilt("grookey", ::GrookeyModel)
|
||||
inbuilt("thwackey", ::ThwackeyModel)
|
||||
inbuilt("rillaboom", ::RillaboomModel)
|
||||
inbuilt("oshawott", ::OshawottModel)
|
||||
inbuilt("samurott", ::SamurottModel)
|
||||
inbuilt("snivy", ::SnivyModel)
|
||||
inbuilt("servine", ::ServineModel)
|
||||
@@ -549,7 +548,6 @@ object VaryingModelRepository {
|
||||
inbuilt("morgrem", ::MorgremModel)
|
||||
inbuilt("grimmsnarl", ::GrimmsnarlModel)
|
||||
inbuilt("klefki", ::KlefkiModel)
|
||||
inbuilt("oshawott_hisui_bias", ::OshawottHisuiBiasModel)
|
||||
inbuilt("dewott_hisui_bias", ::DewottHisuiBiasModel)
|
||||
inbuilt("samurott_hisuian", ::SamurottHisuianModel)
|
||||
inbuilt("cyndaquil_hisui_bias", ::CyndaquilHisuiBiasModel)
|
||||
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"portraitScale": 2.0,
|
||||
"portraitTranslation": [-0.2, -0.15, 0],
|
||||
"profileScale": 0.7,
|
||||
"profileTranslation": [0, 0.69, 0],
|
||||
"rootBone": "oshawott",
|
||||
"animations": {
|
||||
"cry": "q.bedrock_stateful('oshawott', 'cry')"
|
||||
},
|
||||
"poses": {
|
||||
"battle_idle": {
|
||||
"poseTypes": ["STAND", "FLOAT"],
|
||||
"isBattle": true,
|
||||
"animations": [
|
||||
"q.look('head')",
|
||||
"q.bedrock('oshawott', 'ground_idle')"
|
||||
],
|
||||
"transformTicks": 10,
|
||||
"quirks": [
|
||||
"q.bedrock_quirk('oshawott', 'blink')"
|
||||
],
|
||||
"transformedParts": [
|
||||
{
|
||||
"part": "scalchop_torso",
|
||||
"isVisible": false
|
||||
},
|
||||
{
|
||||
"part": "scalchop_hand",
|
||||
"isVisible": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"standing": {
|
||||
"poseTypes": ["STAND", "NONE", "PORTRAIT", "PROFILE", "FLOAT"],
|
||||
"isBattle": false,
|
||||
"animations": ["q.look('head')", "q.bedrock('oshawott', 'ground_idle')"],
|
||||
"quirks": ["q.bedrock_quirk('oshawott', 'blink')"],
|
||||
"transformedParts": [
|
||||
{
|
||||
"part": "scalchop_torso",
|
||||
"isVisible": true
|
||||
},
|
||||
{
|
||||
"part": "scalchop_hand",
|
||||
"isVisible": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"walking": {
|
||||
"poseTypes": ["WALK", "SWIM"],
|
||||
"animations": [
|
||||
"q.look('head')",
|
||||
"q.bedrock('oshawott', 'ground_idle')",
|
||||
"q.biped_walk(0.66, 1.4, 'leg_left', 'leg_right')"
|
||||
],
|
||||
"quirks": ["q.bedrock_quirk('oshawott', 'blink')"],
|
||||
"transformedParts": [
|
||||
{
|
||||
"part": "scalchop_torso",
|
||||
"isVisible": true
|
||||
},
|
||||
{
|
||||
"part": "scalchop_hand",
|
||||
"isVisible": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"sleep": {
|
||||
"poseTypes": ["SLEEP"],
|
||||
"namedAnimations": {
|
||||
"cry": "q.bedrock_stateful('dummy', 'cry')"
|
||||
},
|
||||
"animations": ["q.bedrock('oshawott', 'sleep')"],
|
||||
"transformedParts": [
|
||||
{
|
||||
"part": "scalchop_torso",
|
||||
"isVisible": true
|
||||
},
|
||||
{
|
||||
"part": "scalchop_hand",
|
||||
"isVisible": false
|
||||
},
|
||||
{
|
||||
"part": "body",
|
||||
"position": [0, -7, 0]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user