BlockMountComponent

public class BlockMountComponent implements Component

Component for tracking blockmount state. Attach this component to entities that need to track blockmount data.

java.lang.Object > BlockMountComponent

Field Summary

type

private BlockMountType type

Field type.

blockPos

private Vector3i blockPos

Field blockPos.

expectedBlockType

private BlockType expectedBlockType

Field expectedBlockType.

expectedRotation

private int expectedRotation

Field expectedRotation.

seat

final BlockMountPoint seat

Field seat.

seatInWorldSpace

final Vector3f seatInWorldSpace

Field seatInWorldSpace.

distSq

final double distSq

Field distSq.

Method Detail

getComponentType

public BlockMountComponent> getComponentType ()

Method getComponentType.

BlockMountComponent

public public BlockMountComponent ()

Method BlockMountComponent.

getType

public BlockMountType getType ()

Method getType.

getBlockPos

public Vector3i getBlockPos ()

Method getBlockPos.

getExpectedBlockType

public BlockType getExpectedBlockType ()

Method getExpectedBlockType.

getExpectedRotation

public int getExpectedRotation ()

Method getExpectedRotation.

isDead

public boolean isDead ()

Method isDead.

clean

private void clean ()

Method clean.

putSeatedEntity

public void putSeatedEntity (@Nonnull final BlockMountPoint mountPoint, @Nonnull final Ref seatedEntity)

Method putSeatedEntity.

Parameters:
@Nonnull final BlockMountPoint mountPoint
@Nonnull final Ref seatedEntity

removeSeatedEntity

public void removeSeatedEntity (@Nonnull final Ref seatedEntity)

Method removeSeatedEntity.

Parameters:
@Nonnull final Ref seatedEntity

getSeatBlockBySeatedEntity

public BlockMountPoint getSeatBlockBySeatedEntity (final Ref seatedEntity)

Method getSeatBlockBySeatedEntity.

Parameters:
final Ref seatedEntity

getSeatedEntities

public Ref> getSeatedEntities ()

Method getSeatedEntities.

findAvailableSeat

public BlockMountPoint findAvailableSeat (@Nonnull final Vector3i targetBlock, @Nonnull final BlockMountPoint[] choices, @Nonnull final Vector3f whereWasClicked)

Method findAvailableSeat.

Parameters:
@Nonnull final Vector3i targetBlock
@Nonnull final BlockMountPoint[] choices
@Nonnull final Vector3f whereWasClicked

clone

public Component clone ()

Method clone.