SerenityJS
    Preparing search index...

    Class PlayerChunkRenderingTrait

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    chunks: Set<bigint> = ...

    The current chunk hashes that have been sent to the player.

    entity: Entity

    The entity that this trait is attached to.

    identifier: string = ...

    The identifier of the trait.

    player: Player = ...

    The player that this trait is attached to.

    viewDistance: number = ...

    The view distance of the player.

    components: string[] = []

    The entity component identifiers that this trait is compatible with by default. If empty, the trait will not be initialized by any component.

    identifier: "chunk_rendering"

    The identifier of the trait.

    types: EntityIdentifier[] = ...

    The entity type identifiers that this trait is compatible with by default.

    Accessors

    Methods

    • Gets the next set of chunk hashes to send to the player.

      Parameters

      • Optionaldistance: number

        The distance to calculate the chunks for.

      Returns Chunk[]

      An array of chunk hashes to send to the player.

      This method obtains the chunks that are within the player's view distance.