forked from mirrors/cobblemon
Merge branch 'Ghimmighoul' into 'main'
Made forcebattle identify pokemon See merge request cable-mc/cobblemon!2288
This commit is contained in:
@@ -337,6 +337,7 @@
|
||||
- Fixed wild and trainer battle AI refusing to select moves with the `adjacentAlly` target type, even when it's their only option
|
||||
- Fixed Guilded chests being more accessible than intended
|
||||
- Fixed fished up Pokémon not being added as "seen" to the Pokedex
|
||||
- Fixed surprised Gimmighoul encounters not being added as "seen" to the Pokedex
|
||||
|
||||
### Developer
|
||||
- Added `PokeSnackSpawnerFactory` which allows influence registration on PokeSnack encounters
|
||||
|
||||
+1
-4
@@ -876,10 +876,7 @@ class PokeRodFishingBobberEntity(type: EntityType<out PokeRodFishingBobberEntity
|
||||
if (player !in player.level().players()) {
|
||||
return@afterOnServer
|
||||
}
|
||||
spawnedPokemon?.let {
|
||||
it.forceBattle(player)
|
||||
CobblemonEvents.POKEMON_SEEN.post(PokemonSeenEvent(uuid, it.pokemon))
|
||||
}
|
||||
spawnedPokemon?.forceBattle(player)
|
||||
}
|
||||
|
||||
return true
|
||||
|
||||
@@ -21,6 +21,7 @@ import com.cobblemon.mod.common.api.events.CobblemonEvents
|
||||
import com.cobblemon.mod.common.api.events.entity.PokemonEntityLoadEvent
|
||||
import com.cobblemon.mod.common.api.events.entity.PokemonEntitySaveEvent
|
||||
import com.cobblemon.mod.common.api.events.entity.PokemonEntitySaveToWorldEvent
|
||||
import com.cobblemon.mod.common.api.events.pokemon.PokemonSeenEvent
|
||||
import com.cobblemon.mod.common.api.events.pokemon.RidePokemonEvent
|
||||
import com.cobblemon.mod.common.api.events.pokemon.ShoulderMountEvent
|
||||
import com.cobblemon.mod.common.api.interaction.PokemonEntityInteraction
|
||||
@@ -2087,7 +2088,7 @@ open class PokemonEntity(
|
||||
return false
|
||||
}
|
||||
val lead = player.party().firstOrNull { it.entity != null }?.uuid
|
||||
return BattleBuilder.pve(player, this, lead) is SuccessfulBattleStart
|
||||
return BattleBuilder.pve(player, this, lead).ifSuccessful { CobblemonEvents.POKEMON_SEEN.post(PokemonSeenEvent(player.uuid, this.pokemon)) } is SuccessfulBattleStart
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user