public interface BallLogic
PokeBall
for capture purposes.
The methods here are generally called by CaptureMethod
in order to facilitate the capture calculation.
You can determine if the capture attempt is in a battle by checking the PokeBallMode
, or checking if a
PixelmonWrapper
is present in the Pokemon
parameter.
Instances of this are not registered - PokeBall
creates new instances of this class from a provided classpath.Modifier and Type | Method and Description |
---|---|
default void |
doAfterEffect(PokeBall type,
PokeBallEntity entity,
PixelmonEntity pixelmon)
|
default void |
doFailEffect(PokeBall type,
PokeBallEntity entity,
PixelmonEntity pixelmon)
|
default double |
getCatchBonus(PokeBall type,
PokeBallEntity entity,
net.minecraft.entity.player.PlayerEntity thrower,
Pokemon pokemon,
PokeBallMode mode)
Get the ball bonus of this ball logic.
|
default int |
modifyCaptureRate(PokeBall type,
PokeBallEntity entity,
Pokemon pokemon,
int catchRate)
|
default double getCatchBonus(PokeBall type, @Nullable PokeBallEntity entity, net.minecraft.entity.player.PlayerEntity thrower, Pokemon pokemon, PokeBallMode mode)
type
- The PokeBall
being used.entity
- The PokeBallEntity
being thrown, if one is present.thrower
- The player throwing the ball.pokemon
- The Pokemon
being caught.mode
- The mode this capture attempt is in.default void doAfterEffect(PokeBall type, @Nullable PokeBallEntity entity, PixelmonEntity pixelmon)
type
- The PokeBall
being used.entity
- The PokeBallEntity
being thrown, if one is present.pixelmon
- The PixelmonEntity
caught.default int modifyCaptureRate(PokeBall type, @Nullable PokeBallEntity entity, Pokemon pokemon, int catchRate)
type
- The PokeBall
being used.entity
- The PokeBallEntity
being thrown, if one is present.pokemon
- The Pokemon
being caught.catchRate
- The base catch rate of the Pokemon
being caught.Pokemon
being caught.default void doFailEffect(PokeBall type, @Nullable PokeBallEntity entity, PixelmonEntity pixelmon)
type
- The PokeBall
being used.entity
- The PokeBallEntity
being thrown, if one is present.pixelmon
- The PixelmonEntity
that failed to be caught.