ItemPrePhysicsSystem

public class ItemPrePhysicsSystem extends EntityTickingSystem

System for handling itemprephysics mechanics. Systems contain game logic that operates on entities with specific component types.

java.lang.Object > EntityTickingSystem > ItemPrePhysicsSystem

Field Summary

velocityComponent

final Velocity velocityComponent

Field velocityComponent.

transformComponent

final TransformComponent transformComponent

Field transformComponent.

physicsValuesComponent

final PhysicsValues physicsValuesComponent

Field physicsValuesComponent.

boundingBoxComponent

final BoundingBox boundingBoxComponent

Field boundingBoxComponent.

boundingBox

final Box boundingBox

Field boundingBox.

world

final World world

Field world.

chunkStore

final ChunkStore chunkStore

Field chunkStore.

chunkRef

final Ref chunkRef

Field chunkRef.

x

final int x

Field x.

y

final int y

Field y.

z

final int z

Field z.

blockType

final BlockType blockType

Field blockType.

rotation

final int rotation

Field rotation.

blockBoundingBoxes

final BlockBoundingBoxes.RotatedVariantBoxes blockBoundingBoxes

Field blockBoundingBoxes.

nearestBlock

final Vector3i nearestBlock

Field nearestBlock.

density

final double density

Field density.

Method Detail

ItemPrePhysicsSystem

public public ItemPrePhysicsSystem (@Nonnull final ComponentType itemComponentType, @Nonnull final ComponentType boundingBoxComponentType, @Nonnull final ComponentType velocityComponentType, @Nonnull final ComponentType transformComponentType, @Nonnull final ComponentType physicsValuesComponentType)

Method ItemPrePhysicsSystem.

Parameters:
@Nonnull final ComponentType itemComponentType
@Nonnull final ComponentType boundingBoxComponentType
@Nonnull final ComponentType velocityComponentType
@Nonnull final ComponentType transformComponentType
@Nonnull final ComponentType physicsValuesComponentType

getQuery

public Query getQuery ()

Method getQuery.

isParallel

public boolean isParallel (final int archetypeChunkSize, final int taskCount)

Method isParallel.

Parameters:
final int archetypeChunkSize
final int taskCount

tick

public void tick (final float dt, final int index, @Nonnull final ArchetypeChunk archetypeChunk, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)

Method tick.

Parameters:
final float dt
final int index
@Nonnull final ArchetypeChunk archetypeChunk
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer

moveOutOfBlock

static void moveOutOfBlock (@Nullable final WorldChunk chunk, @Nonnull final Vector3d position, @Nonnull final Velocity velocityComponent, @Nonnull final Box boundingBox)

Method moveOutOfBlock.

Parameters:
@Nullable final WorldChunk chunk
@Nonnull final Vector3d position
@Nonnull final Velocity velocityComponent
@Nonnull final Box boundingBox

applyGravity

static void applyGravity (final float dt, @Nullable final Box boundingBox, @Nonnull final PhysicsValues values, @Nonnull final Vector3d position, @Nonnull final Velocity velocity)

Method applyGravity.

Parameters:
final float dt
@Nullable final Box boundingBox
@Nonnull final PhysicsValues values
@Nonnull final Vector3d position
@Nonnull final Velocity velocity

if

public else if (velocity.getY()

Method if.

Parameters:
velocity.getY( velocity.getY(