TransformComponent

public class TransformComponent implements Component

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

java.lang.Object > TransformComponent

Field Summary

chunk

private WorldChunk chunk

Field chunk.

chunkRef

private Ref chunkRef

Field chunkRef.

x

final double x

Field x.

y

final double y

Field y.

z

final double z

Field z.

yaw

final float yaw

Field yaw.

pitch

final float pitch

Field pitch.

roll

final float roll

Field roll.

world

final World world

Field world.

chunkStore

final Store chunkStore

Field chunkStore.

worldChunkComponent

final WorldChunk worldChunkComponent

Field worldChunkComponent.

transformComponent

final TransformComponent transformComponent

Field transformComponent.

transform

final ModelTransform transform

Field transform.

Method Detail

getComponentType

public TransformComponent> getComponentType ()

Method getComponentType.

TransformComponent

public public TransformComponent ()

Method TransformComponent.

ModelTransform

public new ModelTransform (new Position()

Method ModelTransform.

Parameters:
new Position(

Direction

public new Direction ()

Method Direction.

getPosition

public Vector3d getPosition ()

Method getPosition.

setPosition

public void setPosition (@Nonnull final Vector3d position)

Method setPosition.

Parameters:
@Nonnull final Vector3d position

teleportPosition

public void teleportPosition (@Nonnull final Vector3d position)

Method teleportPosition.

Parameters:
@Nonnull final Vector3d position

getRotation

public Vector3f getRotation ()

Method getRotation.

setRotation

public void setRotation (@Nonnull final Vector3f rotation)

Method setRotation.

Parameters:
@Nonnull final Vector3f rotation

getTransform

public Transform getTransform ()

Method getTransform.

teleportRotation

public void teleportRotation (@Nonnull final Vector3f rotation)

Method teleportRotation.

Parameters:
@Nonnull final Vector3f rotation

getSentTransform

public ModelTransform getSentTransform ()

Method getSentTransform.

getChunk

public WorldChunk getChunk ()

Method getChunk.

getChunkRef

public Ref getChunkRef ()

Method getChunkRef.

markChunkDirty

public void markChunkDirty (@Nonnull final ComponentAccessor componentAccessor)

Method markChunkDirty.

Parameters:
@Nonnull final ComponentAccessor componentAccessor

setChunkLocation

public void setChunkLocation (@Nullable final Ref chunkRef, @Nullable final WorldChunk chunk)

Method setChunkLocation.

Parameters:
@Nullable final Ref chunkRef
@Nullable final WorldChunk chunk

clone

public TransformComponent clone ()

Method clone.

KeyedCodec

public new KeyedCodec ("Rotation", Vector3f.ROTATION)

Method KeyedCodec.

Parameters:
"Rotation" "Rotation"
Vector3f.ROTATION Vector3f.ROTATION