Interface RenderSource.Entity
- All Superinterfaces:
RenderSource<EntityTracker>
- All Known Subinterfaces:
RenderSource.Player
- All Known Implementing Classes:
RenderSource.DelegatedEntity, RenderSource.DelegatedPlayer, RenderSource.ProfiledEntity, RenderSource.ProfiledPlayer
- Enclosing interface:
RenderSource<T extends Tracker>
public static sealed interface RenderSource.Entity
extends RenderSource<EntityTracker>
permits RenderSource.Player, RenderSource.DelegatedEntity, RenderSource.ProfiledEntity
Represents a render source attached to an entity.
- Since:
- 1.15.2
-
Nested Class Summary
Nested classes/interfaces inherited from interface RenderSource
RenderSource.DelegatedDummy, RenderSource.DelegatedEntity, RenderSource.DelegatedPlayer, RenderSource.Dummy, RenderSource.Entity, RenderSource.Player, RenderSource.ProfiledDummy, RenderSource.ProfiledEntity, RenderSource.ProfiledPlayer -
Method Summary
Modifier and TypeMethodDescriptiondefault @NotNull EntityTrackercreate(@NotNull RenderPipeline pipeline, @NotNull TrackerModifier modifier, @NotNull Consumer<EntityTracker> preUpdateConsumer) Creates a new tracker for this render source.@NotNull BaseEntityentity()Returns the entity associated with this source.default @NotNull EntityTrackergetOrCreate(@NotNull String name, @NotNull Function<RenderSource.Entity, RenderPipeline> function, @NotNull TrackerModifier modifier, @NotNull Consumer<EntityTracker> preUpdateConsumer) Gets or creates an entity tracker for this source.default @NotNull PlatformLocationlocation()Returns the location of this render source.Methods inherited from interface RenderSource
completeContext, fallbackContext
-
Method Details
-
entity
Returns the entity associated with this source.- Returns:
- the entity
- Since:
- 1.15.2
-
location
Description copied from interface:RenderSourceReturns the location of this render source.- Specified by:
locationin interfaceRenderSource<EntityTracker>- Returns:
- the location
-
create
@NotNull default @NotNull EntityTracker create(@NotNull @NotNull RenderPipeline pipeline, @NotNull @NotNull TrackerModifier modifier, @NotNull @NotNull Consumer<EntityTracker> preUpdateConsumer) Description copied from interface:RenderSourceCreates a new tracker for this render source.- Specified by:
createin interfaceRenderSource<EntityTracker>- Parameters:
pipeline- the render pipeline to usemodifier- the tracker modifierpreUpdateConsumer- a consumer to run before updates- Returns:
- the created tracker
-
getOrCreate
@NotNull default @NotNull EntityTracker getOrCreate(@NotNull @NotNull String name, @NotNull @NotNull Function<RenderSource.Entity, RenderPipeline> function, @NotNull @NotNull TrackerModifier modifier, @NotNull @NotNull Consumer<EntityTracker> preUpdateConsumer) Gets or creates an entity tracker for this source.- Parameters:
name- the name of the trackerfunction- a function for the render pipelinemodifier- the tracker modifierpreUpdateConsumer- a consumer to run before updates- Returns:
- the entity tracker
- Since:
- 1.15.2
-