Class MountedFlyingParameters
java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.species.parameters.mounted.MountedFlyingParameters
- All Implemented Interfaces:
ControlledMovementLogic
Represents the parameters for an entities' mounted flying movement & AI & animation
-
Field Summary
-
Constructor Summary
ConstructorDescriptionMountedFlyingParameters
(float upperAngleLimit, float lowerAngleLimit, float maxFlySpeed, float decelerationRate, float hoverDecelerationRate, float accelerationRate, float strafeAccelerationRate, float strafeRollConversion, float turnRate, float pitchRate, boolean staysHorizontalFlying, float gravityDropPerTick, boolean continuousForwardMotion, int continuousForwardMotionTicks, int flyingStaminaCharges, int hoverTicks) Constructor providing all the modifiable values -
Method Summary
Modifier and TypeMethodDescriptionvoid
calcMoveSpeed
(AbstractMovesEntity entity) void
calculateRoll
(AbstractMovesEntity pixelmon, float strafe) com.mojang.serialization.Codec<? extends ControlledMovementLogic>
codec()
boolean
float
boolean
int
float
int
float
float
int
float
float
float
boolean
float
float
float
float
void
handleKeybindMovement
(List<EnumMovement> movements, AbstractMovesEntity pixelmon) void
handleMovement
(List<EnumKeybinds> movements, AbstractMovesEntity pixelmon) void
handleMovementLogic
(PixelmonEntity pixelmon, net.minecraft.world.entity.player.Player ridingPlayer) void
handleRiderJump
(PixelmonEntity pixelmon, net.minecraft.world.entity.player.Player ridingPlayer, int power) int
hashCode()
boolean
void
travelCustom
(AbstractMovesEntity pixelmon, PixelmonMovementFlying pixelmonMovementFlying)
-
Field Details
-
CODEC
-
-
Constructor Details
-
MountedFlyingParameters
public MountedFlyingParameters(float upperAngleLimit, float lowerAngleLimit, float maxFlySpeed, float decelerationRate, float hoverDecelerationRate, float accelerationRate, float strafeAccelerationRate, float strafeRollConversion, float turnRate, float pitchRate, boolean staysHorizontalFlying, float gravityDropPerTick, boolean continuousForwardMotion, int continuousForwardMotionTicks, int flyingStaminaCharges, int hoverTicks) Constructor providing all the modifiable values- Parameters:
upperAngleLimit
- The upper angle limitlowerAngleLimit
- The lower angle limitmaxFlySpeed
- The maximum speed for flightdecelerationRate
- The rate of decelerationhoverDecelerationRate
- The deceleration rate when hoveringaccelerationRate
- The rate of accelerationstrafeAccelerationRate
- The rate of acceleration when strafingstrafeRollConversion
- The conversion rate for strafing and rollingturnRate
- The turn ratepitchRate
- The pitch ratestaysHorizontalFlying
- If the flying is only horizontalgravityDropPerTick
- The amount per tick the pokemon drops naturally when flyingcontinuousForwardMotion
- If the pokemon's forward motion cannot be stopped once flyingcontinuousForwardMotionTicks
- How many ticks between occurances of forward motionflyingStaminaCharges
- The amount of times you can 'takeoff' or 'boost' into the airhoverTicks
- The amount of ticks you can hover for (Resets on stamina charge use)
-
MountedFlyingParameters
public MountedFlyingParameters()
-
-
Method Details
-
getUpperAngleLimit
public float getUpperAngleLimit() -
getLowerAngleLimit
public float getLowerAngleLimit() -
getMaxFlySpeed
public float getMaxFlySpeed() -
getDecelerationRate
public float getDecelerationRate() -
getHoverDecelerationRate
public float getHoverDecelerationRate() -
getAccelerationRate
public float getAccelerationRate() -
getStrafeAccelerationRate
public float getStrafeAccelerationRate() -
getStrafeRollConversion
public float getStrafeRollConversion() -
getTurnRate
public float getTurnRate() -
getPitchRate
public float getPitchRate() -
isStaysHorizontalFlying
public boolean isStaysHorizontalFlying() -
getGravityDropPerTick
public float getGravityDropPerTick() -
getContinuousForwardMotion
public boolean getContinuousForwardMotion() -
getContinuousForwardMotionTicks
public int getContinuousForwardMotionTicks() -
getFlyingStaminaCharges
public int getFlyingStaminaCharges() -
getHoverTicks
public int getHoverTicks() -
equals
-
hashCode
public int hashCode() -
codec
- Specified by:
codec
in interfaceControlledMovementLogic
-
handleMovementLogic
public void handleMovementLogic(PixelmonEntity pixelmon, net.minecraft.world.entity.player.Player ridingPlayer) - Specified by:
handleMovementLogic
in interfaceControlledMovementLogic
-
handleRiderJump
public void handleRiderJump(PixelmonEntity pixelmon, net.minecraft.world.entity.player.Player ridingPlayer, int power) - Specified by:
handleRiderJump
in interfaceControlledMovementLogic
-
calcMoveSpeed
- Specified by:
calcMoveSpeed
in interfaceControlledMovementLogic
-
getStaysHorizontalInRender
- Specified by:
getStaysHorizontalInRender
in interfaceControlledMovementLogic
-
calculateRoll
- Specified by:
calculateRoll
in interfaceControlledMovementLogic
-
handleMovement
- Specified by:
handleMovement
in interfaceControlledMovementLogic
-
travelCustom
public void travelCustom(AbstractMovesEntity pixelmon, PixelmonMovementFlying pixelmonMovementFlying) - Specified by:
travelCustom
in interfaceControlledMovementLogic
-
handleKeybindMovement
- Specified by:
handleKeybindMovement
in interfaceControlledMovementLogic
-