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 ComponentTypeitemComponentType@Nonnull final ComponentTypeboundingBoxComponentType@Nonnull final ComponentTypevelocityComponentType@Nonnull final ComponentTypetransformComponentType@Nonnull final ComponentTypephysicsValuesComponentType
isParallel
public
boolean
isParallel
(final int archetypeChunkSize, final int taskCount)
Method isParallel.
- Parameters:
final intarchetypeChunkSizefinal inttaskCount
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 floatdtfinal intindex@Nonnull final ArchetypeChunkarchetypeChunk@Nonnull final Storestore@Nonnull final CommandBuffercommandBuffer
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 WorldChunkchunk@Nonnull final Vector3dposition@Nonnull final VelocityvelocityComponent@Nonnull final BoxboundingBox
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 floatdt@Nullable final BoxboundingBox@Nonnull final PhysicsValuesvalues@Nonnull final Vector3dposition@Nonnull final Velocityvelocity
if
public
else
if
(velocity.getY()
Method if.
- Parameters:
velocity.getY(velocity.getY(