Compare commits

..
Author SHA1 Message Date
JazzMcNade c5cc57a298 Fixed issues with pokemon drops 2024-06-02 03:18:22 -05:00
19 changed files with 20 additions and 101 deletions
-8
View File
@@ -4,22 +4,14 @@
### Fixes
- Scaled down Amaura's fetus model to avoid clipping through the tank while animating
- Added Polished Tumblestone and Tumblestone Brick block sets from Tumblestone, Black Tumblestone, and Sky Tumblestone.
- Fixed Cubone's cry not having a sound.
- Fixed the Seafloor spawning context not being a usable context.
- Fixed Pokemon spawning in non-full blocks like slabs.
- Fixed Gilded Chests not dropping the chest itself when broken, only the contents.
- Fixed Pokémon losing their Hidden Ability through evolution if the middle stage did not have a Hidden Ability.
- Fixed Crumbling Arch not blending in with the world.
- Fixed Energy Root applying being usable on a fainted Pokemon.
- Fixed Pokémon entity not spawning when starting a battle while recalling said Pokémon
### Additions
- Added extra visuals to early berry growth stages
### Added cries to the following Pokémon
- Timburr, Gurdurr, Conkeldurr
- Golett, Golurk
### Changes
- Altered the item model for Medicinal Leeks and Roasted Leeks to be held like sticks and other rod items.
- Adjusted some berry balance values like yield and growth times
@@ -47,16 +47,7 @@ class SwitchInstruction(val instructionSet: InstructionSet, val battleActor: Bat
if (!battle.started) {
activePokemon.battlePokemon = pokemon
activePokemon.illusion = illusion
val pokemonEntity = pokemon.entity?.let {
// If a Pokémon entity is being recalled with an animation,
// wrap up the animation and recall the Pokémon immediately.
if (it.beamMode == 3) {
pokemon.effectedPokemon.recall()
return@let null
}
pokemon.entity
}
val pokemonEntity = pokemon.entity
if (pokemonEntity == null && entity != null) {
val targetPos = battleActor.getSide().getOppositeSide().actors.filterIsInstance<EntityBackedBattleActor<*>>().firstOrNull()?.entity?.pos?.let { pos ->
val offset = pos.subtract(entity.pos)
@@ -36,7 +36,6 @@ class ConkeldurrModel (root: ModelPart) : PokemonPoseableModel(), HeadedFrame, B
lateinit var battleidle: PokemonPose
override val cryAnimation = CryProvider { _, _ -> bedrockStateful("conkeldurr", "cry") }
override fun registerPoses() {
val blink = quirk { bedrockStateful("conkeldurr", "blink") }
@@ -14,7 +14,6 @@ import com.cobblemon.mod.common.client.render.models.blockbench.frame.BimanualFr
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.frame.ModelFrame
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPose
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPoseableModel
import com.cobblemon.mod.common.entity.PoseType
@@ -41,8 +40,6 @@ class GolettModel (root: ModelPart) : PokemonPoseableModel(), HeadedFrame, Biped
lateinit var walk: PokemonPose
lateinit var sleep: PokemonPose
override val cryAnimation = CryProvider { _, _ -> bedrockStateful("golett", "cry") }
override fun registerPoses() {
val blink = quirk { bedrockStateful("golett", "blink") }
standing = registerPose(
@@ -12,7 +12,6 @@ import com.cobblemon.mod.common.client.render.models.blockbench.PoseableEntitySt
import com.cobblemon.mod.common.client.render.models.blockbench.animation.StatefulAnimation
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
import com.cobblemon.mod.common.client.render.models.blockbench.frame.ModelFrame
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPose
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPoseableModel
import com.cobblemon.mod.common.entity.PoseType
@@ -34,8 +33,6 @@ class GolurkModel (root: ModelPart) : PokemonPoseableModel(), HeadedFrame {
lateinit var walk: PokemonPose
lateinit var sleep: PokemonPose
override val cryAnimation = CryProvider { _, _ -> bedrockStateful("golurk", "cry") }
override fun registerPoses() {
val blink = quirk { bedrockStateful("golurk", "blink") }
@@ -20,6 +20,7 @@ import com.cobblemon.mod.common.api.events.pokemon.ShoulderMountEvent
import com.cobblemon.mod.common.api.interaction.PokemonEntityInteraction
import com.cobblemon.mod.common.api.net.serializers.PoseTypeDataSerializer
import com.cobblemon.mod.common.api.net.serializers.StringSetDataSerializer
import com.cobblemon.mod.common.api.pokemon.PokemonProperties
import com.cobblemon.mod.common.api.pokemon.feature.ChoiceSpeciesFeatureProvider
import com.cobblemon.mod.common.api.pokemon.feature.FlagSpeciesFeature
import com.cobblemon.mod.common.api.pokemon.feature.SpeciesFeatures
@@ -104,8 +105,11 @@ import net.minecraft.sound.SoundEvents
import net.minecraft.text.Text
import net.minecraft.text.TextContent
import net.minecraft.util.ActionResult
import net.minecraft.util.Colors
import net.minecraft.util.DyeColor
import net.minecraft.util.Hand
import net.minecraft.util.Identifier
import net.minecraft.util.Util
import net.minecraft.util.math.BlockPos
import net.minecraft.util.math.Box
import net.minecraft.util.math.Vec3d
@@ -117,7 +121,7 @@ import java.util.*
@Suppress("unused")
open class PokemonEntity(
world: World,
pokemon: Pokemon = Pokemon().apply { isClient = world.isClient },
pokemon: Pokemon = Pokemon(),
type: EntityType<out PokemonEntity> = CobblemonEntities.POKEMON,
) : TameableShoulderEntity(type, world), Poseable, Shearable, Schedulable {
companion object {
@@ -159,7 +163,6 @@ open class PokemonEntity(
var pokemon: Pokemon = pokemon
set(value) {
value.isClient = this.world.isClient
field = value
delegate.changePokemon(value)
stepHeight = behaviour.moving.stepHeight
@@ -494,15 +497,15 @@ open class PokemonEntity(
entityId = id // Doesn't really matter on the entity
)
} else {
pokemon = this.createSidedPokemon()
pokemon = Pokemon()
health = 0F
}
} else {
pokemon = try {
this.createSidedPokemon().loadFromNBT(nbt.getCompound(DataKeys.POKEMON))
Pokemon().loadFromNBT(nbt.getCompound(DataKeys.POKEMON))
} catch (_: InvalidSpeciesException) {
health = 0F
this.createSidedPokemon()
Pokemon()
}
}
@@ -1217,6 +1220,8 @@ open class PokemonEntity(
return !this.isBusy && !this.pokemon.isFainted() && !feature.enabled
}
override fun canUsePortals() = false
override fun setAir(air: Int) {
@@ -1251,11 +1256,4 @@ open class PokemonEntity(
/** Retrieves the battle theme associated with this Pokemon's Species/Form, or the default PVW theme if not found. */
fun getBattleTheme() = Registries.SOUND_EVENT.get(this.form.battleTheme) ?: CobblemonSounds.PVW_BATTLE
/**
* A utility method to instance a [Pokemon] aware if the [world] is client sided or not.
*
* @return The side safe [Pokemon] with the [Pokemon.isClient] set.
*/
private fun createSidedPokemon(): Pokemon = Pokemon().apply { isClient = this@PokemonEntity.world.isClient }
}
@@ -235,7 +235,7 @@ class PokemonServerDelegate : PokemonSideDelegate {
}
if (entity.deathTime == 60) {
if (entity.owner == null) {
if (entity.pokemon.isWild()) {
entity.world.sendEntityStatus(entity, 60.toByte()) // Sends smoke effect
if(entity.world.gameRules.getBoolean(CobblemonGameRules.DO_POKEMON_LOOT)) {
(entity.drops ?: entity.pokemon.form.drops).drop(entity, entity.world as ServerWorld, entity.pos, entity.killer)
@@ -43,7 +43,7 @@ class EnergyRootItem(block: EnergyRootBlock, settings: Settings) : AliasedBlockI
fun getHealAmount() = CobblemonMechanics.remedies.getHealingAmount("root", runtime, 150)
override fun canUseOnPokemon(pokemon: Pokemon) = !pokemon.isFullHealth() && !pokemon.isFainted()
override fun canUseOnPokemon(pokemon: Pokemon) = !pokemon.isFullHealth()
override fun applyToPokemon(player: ServerPlayerEntity, stack: ItemStack, pokemon: Pokemon): TypedActionResult<ItemStack> {
return if (this.canUseOnPokemon(pokemon)) {
@@ -835,9 +835,9 @@ open class Pokemon : ShowdownIdentifiable {
experience = nbt.getInt(DataKeys.POKEMON_EXPERIENCE).takeIf { experienceGroup.getLevel(it) == level } ?: experienceGroup.getExperience(level)
friendship = nbt.getShort(DataKeys.POKEMON_FRIENDSHIP).toInt().coerceIn(0, if (this.isClient) Int.MAX_VALUE else Cobblemon.config.maxPokemonFriendship)
gender = Gender.valueOf(nbt.getString(DataKeys.POKEMON_GENDER).takeIf { it.isNotBlank() } ?: Gender.MALE.name)
currentHealth = nbt.getShort(DataKeys.POKEMON_HEALTH).toInt()
ivs.loadFromNBT(nbt.getCompound(DataKeys.POKEMON_IVS))
evs.loadFromNBT(nbt.getCompound(DataKeys.POKEMON_EVS))
currentHealth = nbt.getShort(DataKeys.POKEMON_HEALTH).toInt()
moveSet.loadFromNBT(nbt)
scaleModifier = nbt.getFloat(DataKeys.POKEMON_SCALE_MODIFIER)
if (nbt.contains(DataKeys.POKEMON_ABILITY, COMPOUND_TYPE.toInt())) {
@@ -169,11 +169,6 @@
},
"animation.cubone.cry": {
"animation_length": 1.16667,
"sound_effects": {
"0.04": {
"effect": "pokemon.cubone.cry"
}
},
"bones": {
"upper_torso": {
"rotation": {
@@ -445,11 +445,6 @@
},
"animation.golett.cry": {
"animation_length": 1.5,
"sound_effects": {
"0.0417": {
"effect": "pokemon.golett.cry"
}
},
"bones": {
"neck": {
"rotation": {
@@ -782,11 +782,6 @@
},
"animation.golurk.cry": {
"animation_length": 1.5,
"sound_effects": {
"0.0417": {
"effect": "pokemon.golurk.cry"
}
},
"bones": {
"neck": {
"rotation": {
@@ -354,56 +354,12 @@
},
{
"content": 8,
"item": "minecraft:tube_coral"
},
{
"content": 8,
"item": "minecraft:brain_coral"
},
{
"content": 8,
"item": "minecraft:bubble_coral"
},
{
"content": 8,
"item": "minecraft:fire_coral"
},
{
"content": 8,
"item": "minecraft:horn_coral"
},
{
"content": 8,
"item": "minecraft:tube_coral_fan"
},
{
"content": 8,
"item": "minecraft:brain_coral_fan"
},
{
"content": 8,
"item": "minecraft:bubble_coral_fan"
},
{
"content": 8,
"item": "minecraft:fire_coral_fan"
},
{
"content": 8,
"item": "minecraft:horn_coral_fan"
"tag": "#minecraft:corals"
},
{
"content": 4,
"tag": "#minecraft:mushrooms"
},
{
"content": 4,
"item": "minecraft:brown_mushroom"
},
{
"content": 4,
"item": "minecraft:red_mushroom"
},
{
"content": 16,
"item": "minecraft:cake"
+5 -1
View File
@@ -9,6 +9,8 @@ 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/"
# Download the CSV file
ASSETS_CSV_URL = "https://docs.google.com/spreadsheets/d/e/2PACX-1vSTisDTkJvV0GzKV1zKjAPdMAQAO7znWxjEWXrM1gZPUVmsTU91oy54aJGMpbbvOqAOg03ER1wl7eeA/pub?gid=0&single=true&output=csv"
@@ -61,7 +63,6 @@ def main(print_missing_models=True, print_missing_animations=True):
cries_in_game,
pokemon_in_game,
cries_on_repo):
# Skip pokemon that are not in the game yet
if this_pokemon_in_game == "❌":
continue
cry_in_game = str(cry_in_game).strip() # remove whitespace
@@ -87,6 +88,9 @@ def main(print_missing_models=True, print_missing_animations=True):
'sound_effects_and_keyframes': False,
}
# Construct the path to the model file
if pokemon_name == "Rattata [Alolan]":
print(pokemon_name)
# Try to convert gen_number to an integer and handle ValueError
try:
if pokemon_form:
# Check if the form is a regional form or F or M, if not, use the default model file