Record Class RenderSource.ProfiledEntity
java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.renderer.RenderSource.ProfiledEntity
- Record Components:
entity- the entityprofile- the model profile
- All Implemented Interfaces:
RenderSource<EntityTracker>,RenderSource.Entity
- Enclosing interface:
RenderSource<T extends Tracker>
public static record RenderSource.ProfiledEntity(BaseEntity entity, ModelProfile.Uncompleted profile)
extends Record
implements RenderSource.Entity
A profiled implementation of
RenderSource.Entity wrapping a BaseEntity and a model profile.- Since:
- 1.15.2
-
Nested Class Summary
Nested classes/interfaces inherited from interface kr.toxicity.model.api.data.renderer.RenderSource
RenderSource.BaseDummy, RenderSource.BaseEntity, RenderSource.BasePlayer, RenderSource.Dummy, RenderSource.Entity, RenderSource.ProfiledDummy, RenderSource.ProfiledEntity, RenderSource.ProfiledPlayer -
Constructor Summary
ConstructorsConstructorDescriptionProfiledEntity(BaseEntity entity, ModelProfile.Uncompleted profile) Creates an instance of aProfiledEntityrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull CompletableFuture<BoneRenderContext> Asynchronously completes the bone render context for this source.@NotNull EntityTrackercreate(@NotNull RenderPipeline pipeline, @NotNull TrackerModifier modifier, @NotNull Consumer<EntityTracker> preUpdateConsumer) Creates a new tracker for this render source.entity()Returns the value of theentityrecord component.final booleanIndicates whether some other object is "equal to" this one.@NotNull EntityTrackergetOrCreate(@NotNull String name, @NotNull Supplier<RenderPipeline> supplier, @NotNull TrackerModifier modifier, @NotNull Consumer<EntityTracker> preUpdateConsumer) Gets or creates an entity tracker for this source.final inthashCode()Returns a hash code value for this object.@NotNull PlatformLocationlocation()Returns the location of this render source.profile()Returns the value of theprofilerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface kr.toxicity.model.api.data.renderer.RenderSource
fallbackContext
-
Constructor Details
-
Method Details
-
create
@NotNull public @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 public @NotNull EntityTracker getOrCreate(@NotNull @NotNull String name, @NotNull @NotNull Supplier<RenderPipeline> supplier, @NotNull @NotNull TrackerModifier modifier, @NotNull @NotNull Consumer<EntityTracker> preUpdateConsumer) Description copied from interface:RenderSource.EntityGets or creates an entity tracker for this source.- Specified by:
getOrCreatein interfaceRenderSource.Entity- Parameters:
name- the name of the trackersupplier- a supplier for the render pipelinemodifier- the tracker modifierpreUpdateConsumer- a consumer to run before updates- Returns:
- the entity tracker
-
location
Description copied from interface:RenderSourceReturns the location of this render source.- Specified by:
locationin interfaceRenderSource<EntityTracker>- Returns:
- the location
-
completeContext
Description copied from interface:RenderSourceAsynchronously completes the bone render context for this source.This method may involve fetching skin data or other resources.
- Specified by:
completeContextin interfaceRenderSource<EntityTracker>- Returns:
- a future completing with the bone render context
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
entity
Returns the value of theentityrecord component.- Specified by:
entityin interfaceRenderSource.Entity- Returns:
- the value of the
entityrecord component
-
profile
Returns the value of theprofilerecord component.- Returns:
- the value of the
profilerecord component
-