public class KnockbackPredictionSystems
Class KnockbackPredictionSystems. Provides knockbackpredictionsystems functionality for the Hytale server.
java.lang.Object > KnockbackPredictionSystems
Field Summary
knockbackSimulationComponent
Field knockbackSimulationComponent.
playerInputComponent
Field playerInputComponent.
queue
Field queue.
client
Field client.
clientLast
Field clientLast.
relativeMovement
Field relativeMovement.
update
Field update.
movementStates
Field movementStates.
transformComponent
Field transformComponent.
movementStatesComponent
Field movementStatesComponent.
playerComponent
Field playerComponent.
clientPosition
Field clientPosition.
world
Field world.
particlePosition
Field particlePosition.
color
Field color.
clientStates
Field clientStates.
rel
Field rel.
requestedVelocity
Field requestedVelocity.
simPos
Field simPos.
velocity
Field velocity.
movementManagerComponent
Field movementManagerComponent.
movementManagerSettings
Field movementManagerSettings.
boundingBoxComponent
Field boundingBoxComponent.
hitBox
Field hitBox.
invertedGravityModifier
Field invertedGravityModifier.
terminalVelocity
Field terminalVelocity.
gravityStep
Field gravityStep.
clone
Field clone.
checkPosition
Field checkPosition.
friction
Field friction.
playerRefComponent
Field playerRefComponent.
movementOffset
Field movementOffset.
converter
Field converter.
ref
Field ref.
move
Field move.
horizontalSpeed
Field horizontalSpeed.
vector3d
Field vector3d.
vector3d2
Field vector3d2.
newValue
Field newValue.
moveCycles
Field moveCycles.
cycleMovementOffset
Field cycleMovementOffset.
collisionResult
Field collisionResult.
hasCollidedY
Field hasCollidedY.
vector3d3
Field vector3d3.
vector3d4
Field vector3d4.
vector3d5
Field vector3d5.
hasCollidedX
Field hasCollidedX.
vector3d6
Field vector3d6.
vector3d7
Field vector3d7.
hasCollidedZ
Field hasCollidedZ.
vector3d8
Field vector3d8.
tempPosition
Field tempPosition.
Method Detail
componentType
Teleport>
componentType
()
Method componentType.
onComponentAdded
void
onComponentAdded
(@Nonnull final Ref ref, @Nonnull final Teleport component, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)
Method onComponentAdded.
- Parameters:
@Nonnull final Refref@Nonnull final Teleportcomponent@Nonnull final Storestore@Nonnull final CommandBuffercommandBuffer
onComponentSet
void
onComponentSet
(@Nonnull final Ref ref, final Teleport oldComponent, @Nonnull final Teleport newComponent, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)
Method onComponentSet.
- Parameters:
@Nonnull final Refreffinal TeleportoldComponent@Nonnull final TeleportnewComponent@Nonnull final Storestore@Nonnull final CommandBuffercommandBuffer
onComponentRemoved
void
onComponentRemoved
(@Nonnull final Ref ref, @Nonnull final Teleport component, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)
Method onComponentRemoved.
- Parameters:
@Nonnull final Refref@Nonnull final Teleportcomponent@Nonnull final Storestore@Nonnull final CommandBuffercommandBuffer
onEntityAdded
void
onEntityAdded
(@Nonnull final Ref ref, @Nonnull final AddReason reason, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)
Method onEntityAdded.
- Parameters:
@Nonnull final Refref@Nonnull final AddReasonreason@Nonnull final Storestore@Nonnull final CommandBuffercommandBuffer
onEntityRemove
void
onEntityRemove
(@Nonnull final Ref ref, @Nonnull final RemoveReason reason, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)
Method onEntityRemove.
- Parameters:
@Nonnull final Refref@Nonnull final RemoveReasonreason@Nonnull final Storestore@Nonnull final CommandBuffercommandBuffer
getDependencies
Set>
getDependencies
()
Method getDependencies.
tick
void
tick
(final float dt, final int index, @Nonnull final ArchetypeChunk archetypeChunk, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)
Method tick.
- Parameters:
final floatdtfinal intindex@Nonnull final ArchetypeChunkarchetypeChunk@Nonnull final Storestore@Nonnull final CommandBuffercommandBuffer
if
else
if
(update instanceof final PlayerInput.RelativeMovement rel)
Method if.
- Parameters:
update instanceof final PlayerInput.RelativeMovementrel
SystemDependency
new
SystemDependency
(Order.BEFORE, PlayerSystems.ProcessPlayerInput.class)
Method SystemDependency.
- Parameters:
Order.BEFOREOrder.BEFOREPlayerSystems.ProcessPlayerInput.classPlayerSystems.ProcessPlayerInput.class
MovementStates
new
MovementStates
(movementStatesComponent.getMovementStates()
Method MovementStates.
- Parameters:
movementStatesComponent.getMovementStates(movementStatesComponent.getMovementStates(
Color
new
Color
((byte)
Method Color.
- Parameters:
(byte(byte
CollisionResult
new
CollisionResult
()
Method CollisionResult.
ApplyKnockback
new
ApplyKnockback
(PositionUtil.toPositionPacket(transformComponent.getPosition()
Method ApplyKnockback.
- Parameters:
PositionUtil.toPositionPacket(transformComponent.getPosition(PositionUtil.toPositionPacket(transformComponent.getPosition(
convertWishMovement
float
convertWishMovement
(@Nonnull final KnockbackSimulation simulation, @Nonnull final MovementStates movementStates, @Nonnull final MovementSettings movementSettings)
Method convertWishMovement.
- Parameters:
@Nonnull final KnockbackSimulationsimulation@Nonnull final MovementStatesmovementStates@Nonnull final MovementSettingsmovementSettings
convertToNewRange
?
convertToNewRange
(horizontalSpeed, movementSettings.airDragMinSpeed, movementSettings.airDragMaxSpeed, movementSettings.airDragMin, movementSettings.airDragMax)
Method convertToNewRange.
- Parameters:
horizontalSpeedhorizontalSpeedmovementSettings.airDragMinSpeedmovementSettings.airDragMinSpeedmovementSettings.airDragMaxSpeedmovementSettings.airDragMaxSpeedmovementSettings.airDragMinmovementSettings.airDragMinmovementSettings.airDragMaxmovementSettings.airDragMax
computeMoveForce
float
computeMoveForce
(@Nonnull final KnockbackSimulation simulation, @Nonnull final MovementStates movementStates, @Nonnull final MovementSettings movementSettings)
Method computeMoveForce.
- Parameters:
@Nonnull final KnockbackSimulationsimulation@Nonnull final MovementStatesmovementStates@Nonnull final MovementSettingsmovementSettings
applyMovementOffset
void
applyMovementOffset
(@Nonnull final World world, @Nonnull final Box hitBox, @Nonnull final KnockbackSimulation simulation, @Nonnull final MovementStates movementStates, @Nonnull final Vector3d movementOffset)
Method applyMovementOffset.
- Parameters:
@Nonnull final Worldworld@Nonnull final BoxhitBox@Nonnull final KnockbackSimulationsimulation@Nonnull final MovementStatesmovementStates@Nonnull final Vector3dmovementOffset
doMoveCycle
void
doMoveCycle
(@Nonnull final World world, @Nonnull final Box hitBox, @Nonnull final KnockbackSimulation simulation, @Nonnull final MovementStates movementStates, @Nonnull final Vector3d offset)
Method doMoveCycle.
- Parameters:
@Nonnull final Worldworld@Nonnull final BoxhitBox@Nonnull final KnockbackSimulationsimulation@Nonnull final MovementStatesmovementStates@Nonnull final Vector3doffset
checkCollision
boolean
checkCollision
(@Nonnull final KnockbackSimulation simulation, @Nonnull final World world, @Nonnull final Box hitBox, @Nonnull final Vector3d position, final Vector3d moveOffset, final CollisionAxis axis, @Nonnull final CollisionResult result)
Method checkCollision.
- Parameters:
@Nonnull final KnockbackSimulationsimulation@Nonnull final Worldworld@Nonnull final BoxhitBox@Nonnull final Vector3dpositionfinal Vector3dmoveOffsetfinal CollisionAxisaxis@Nonnull final CollisionResultresult