forked from mirrors/cobblemon
Compare commits
17
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fde8a03c5f | ||
|
|
df273a0075 | ||
|
|
f6124d7474 | ||
|
|
a0300ccd18 | ||
|
|
486056d7f0 | ||
|
|
03ca6a4396 | ||
|
|
b2d26abc4b | ||
|
|
ebb677cc9c | ||
|
|
f181aabb3c | ||
|
|
4df5e987c7 | ||
|
|
3026e5c66f | ||
|
|
f2310d8979 | ||
|
|
65971386f2 | ||
|
|
5b52fe5479 | ||
|
|
13ca5871cb | ||
|
|
54ba99a002 | ||
|
|
b40f47b00d |
@@ -9,6 +9,9 @@
|
||||
- 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
|
||||
|
||||
+10
-1
@@ -47,7 +47,16 @@ class SwitchInstruction(val instructionSet: InstructionSet, val battleActor: Bat
|
||||
if (!battle.started) {
|
||||
activePokemon.battlePokemon = pokemon
|
||||
activePokemon.illusion = illusion
|
||||
val pokemonEntity = pokemon.entity
|
||||
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
|
||||
}
|
||||
|
||||
if (pokemonEntity == null && entity != null) {
|
||||
val targetPos = battleActor.getSide().getOppositeSide().actors.filterIsInstance<EntityBackedBattleActor<*>>().firstOrNull()?.entity?.pos?.let { pos ->
|
||||
val offset = pos.subtract(entity.pos)
|
||||
|
||||
@@ -20,7 +20,6 @@ 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
|
||||
@@ -105,11 +104,8 @@ 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
|
||||
@@ -121,7 +117,7 @@ import java.util.*
|
||||
@Suppress("unused")
|
||||
open class PokemonEntity(
|
||||
world: World,
|
||||
pokemon: Pokemon = Pokemon(),
|
||||
pokemon: Pokemon = Pokemon().apply { isClient = world.isClient },
|
||||
type: EntityType<out PokemonEntity> = CobblemonEntities.POKEMON,
|
||||
) : TameableShoulderEntity(type, world), Poseable, Shearable, Schedulable {
|
||||
companion object {
|
||||
@@ -163,6 +159,7 @@ open class PokemonEntity(
|
||||
|
||||
var pokemon: Pokemon = pokemon
|
||||
set(value) {
|
||||
value.isClient = this.world.isClient
|
||||
field = value
|
||||
delegate.changePokemon(value)
|
||||
stepHeight = behaviour.moving.stepHeight
|
||||
@@ -497,15 +494,15 @@ open class PokemonEntity(
|
||||
entityId = id // Doesn't really matter on the entity
|
||||
)
|
||||
} else {
|
||||
pokemon = Pokemon()
|
||||
pokemon = this.createSidedPokemon()
|
||||
health = 0F
|
||||
}
|
||||
} else {
|
||||
pokemon = try {
|
||||
Pokemon().loadFromNBT(nbt.getCompound(DataKeys.POKEMON))
|
||||
this.createSidedPokemon().loadFromNBT(nbt.getCompound(DataKeys.POKEMON))
|
||||
} catch (_: InvalidSpeciesException) {
|
||||
health = 0F
|
||||
Pokemon()
|
||||
this.createSidedPokemon()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1220,8 +1217,6 @@ open class PokemonEntity(
|
||||
return !this.isBusy && !this.pokemon.isFainted() && !feature.enabled
|
||||
}
|
||||
|
||||
|
||||
|
||||
override fun canUsePortals() = false
|
||||
|
||||
override fun setAir(air: Int) {
|
||||
@@ -1256,4 +1251,11 @@ 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 }
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
override fun canUseOnPokemon(pokemon: Pokemon) = !pokemon.isFullHealth() && !pokemon.isFainted()
|
||||
|
||||
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())) {
|
||||
|
||||
@@ -354,7 +354,43 @@
|
||||
},
|
||||
{
|
||||
"content": 8,
|
||||
"tag": "#minecraft:corals"
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"content": 4,
|
||||
|
||||
@@ -9,8 +9,6 @@ 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"
|
||||
|
||||
|
||||
@@ -63,6 +61,7 @@ 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
|
||||
@@ -88,9 +87,6 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user