Compare commits

...
Author SHA1 Message Date
Waldleufer fde8a03c5f more cleanup [skip-ci] 2024-06-18 19:31:29 +02:00
Waldleufer df273a0075 cleanup [skip-ci] 2024-06-18 19:25:39 +02:00
Hiroku f6124d7474 Merge branch 'initiate_battle_while_recalling_bugfix' into 'main'
Fixes issue #872

Closes #872

See merge request cable-mc/cobblemon!1072
2024-06-16 08:07:16 +00:00
Notepadccino a0300ccd18 Update CHANGELOG.md 2024-06-16 08:05:22 +00:00
notepadccino 486056d7f0 Fixes issue #872 2024-06-14 16:52:12 +02:00
Hiroku 03ca6a4396 Merge branch 'tmetcalfe89/fix-energy-root-reviving' into 'main'
fixed energy root reviving

See merge request cable-mc/cobblemon!1065
2024-06-14 04:13:20 +00:00
Hiroku b2d26abc4b Merge branch 'Fixes901' into 'main'
Fix For 901

Closes #901

See merge request cable-mc/cobblemon!1069
2024-06-14 00:32:08 +00:00
JazzMcNade ebb677cc9c Don't read the current hp until you've fully calculated the max hp 2024-06-09 14:53:28 -05:00
Licious f181aabb3c Merge branch 'fix-898' into 'main'
Fix lack of side check when instancing Pokemon on PokemonEntity

Closes #898

See merge request cable-mc/cobblemon!1068
2024-06-09 17:43:34 +00:00
Licious 4df5e987c7 Fix lack of side check when instancing Pokemon on PokemonEntity 2024-06-09 17:43:33 +00:00
tmetcalfe89 3026e5c66f changelog 2024-06-09 10:39:43 -07:00
tmetcalfe89 f2310d8979 Merge branch 'main' of https://gitlab.com/cable-mc/cobblemon into tmetcalfe89/fix-energy-root-reviving 2024-06-09 10:39:22 -07:00
Hiroku 65971386f2 Merge branch 'Myslippy-main-patch-82434' into 'main'
Update CHANGELOG.md

See merge request cable-mc/cobblemon!1062
2024-06-08 21:27:17 +00:00
tmetcalfe89 5b52fe5479 fixed energy root reviving 2024-06-07 08:08:19 -07:00
Hiroku 13ca5871cb Merge branch 'corals_restoration_tank_bugfix' into 'main'
Fix issue #892

Closes #892

See merge request cable-mc/cobblemon!1064
2024-06-05 21:48:10 +00:00
notepadccino 54ba99a002 Fix issue #892
The #minecraft:corals tag seems to apply to blocks, not to items. For items you'd either need to trace back the tags of whichever block is placed by the item, or just specify the items one by one. I went with the simpler option, but if needed the former solution can always be implemented.
2024-06-05 19:11:08 +02:00
Myslippy b40f47b00d Update CHANGELOG.md 2024-06-03 03:00:34 +00:00
7 changed files with 65 additions and 19 deletions
+3
View File
@@ -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
@@ -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,
+1 -5
View File
@@ -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