Record Class ModelRenderer
java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.renderer.ModelRenderer
- Record Components:
name- nametype- typerendererGroups- group mapanimations- animations
public record ModelRenderer(@NotNull String name, @NotNull ModelRenderer.Type type, @NotNull @Unmodifiable SequencedMap<BoneName,RendererGroup> rendererGroups, @NotNull @Unmodifiable Map<String,BlueprintAnimation> animations)
extends Record
A blueprint renderer.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionModelRenderer(@NotNull String name, @NotNull ModelRenderer.Type type, @NotNull @Unmodifiable SequencedMap<BoneName, RendererGroup> rendererGroups, @NotNull @Unmodifiable Map<String, BlueprintAnimation> animations) Creates an instance of aModelRendererrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Optional<BlueprintAnimation> Gets blueprint animation by name@NotNull @Unmodifiable Map<String, BlueprintAnimation> Returns the value of theanimationsrecord component.@NotNull EntityTrackercreate(@NotNull BaseEntity entity) Creates tracker by entity@NotNull EntityTrackercreate(@NotNull BaseEntity entity, @NotNull ModelProfile profile) Creates tracker by entity and completed profile@NotNull EntityTrackercreate(@NotNull BaseEntity entity, @NotNull ModelProfile profile, @NotNull TrackerModifier modifier) Creates tracker by entity and completed profile@NotNull EntityTrackercreate(@NotNull BaseEntity entity, @NotNull ModelProfile profile, @NotNull TrackerModifier modifier, @NotNull Consumer<EntityTracker> preUpdateConsumer) Creates tracker by entity and completed profile@NotNull EntityTrackercreate(@NotNull BaseEntity entity, ModelProfile.Uncompleted profile) Creates tracker by entity and uncompleted profile@NotNull EntityTrackercreate(@NotNull BaseEntity entity, ModelProfile.Uncompleted profile, @NotNull TrackerModifier modifier) Creates tracker by entity and uncompleted profile@NotNull EntityTrackercreate(@NotNull BaseEntity entity, ModelProfile.Uncompleted profile, @NotNull TrackerModifier modifier, @NotNull Consumer<EntityTracker> preUpdateConsumer) Creates tracker by entity and uncompleted profile@NotNull EntityTrackercreate(@NotNull BaseEntity entity, @NotNull TrackerModifier modifier) Creates tracker by entity@NotNull EntityTrackercreate(@NotNull BaseEntity entity, @NotNull TrackerModifier modifier, @NotNull Consumer<EntityTracker> preUpdateConsumer) Creates tracker by entity@NotNull EntityTrackercreate(@NotNull PlatformEntity entity) Creates tracker by entity@NotNull EntityTrackercreate(@NotNull PlatformEntity entity, ModelProfile.Uncompleted profile) Creates tracker by entity and uncompleted profile@NotNull EntityTrackercreate(@NotNull PlatformEntity entity, ModelProfile.Uncompleted profile, @NotNull TrackerModifier modifier) Creates tracker by entity and uncompleted profile@NotNull EntityTrackercreate(@NotNull PlatformEntity entity, ModelProfile.Uncompleted profile, @NotNull TrackerModifier modifier, @NotNull Consumer<EntityTracker> preUpdateConsumer) Creates tracker by entity and uncompleted profile@NotNull EntityTrackercreate(@NotNull PlatformEntity entity, @NotNull TrackerModifier modifier) Creates tracker by entity@NotNull EntityTrackercreate(@NotNull PlatformEntity entity, @NotNull TrackerModifier modifier, @NotNull Consumer<EntityTracker> preUpdateConsumer) Creates tracker by entity@NotNull DummyTrackercreate(@NotNull PlatformLocation location) Creates tracker by location@NotNull DummyTrackercreate(@NotNull PlatformLocation location, @NotNull ModelProfile profile) Creates tracker by location and completed profile@NotNull DummyTrackercreate(@NotNull PlatformLocation location, @NotNull ModelProfile profile, @NotNull TrackerModifier modifier, @NotNull Consumer<DummyTracker> preUpdateConsumer) Creates tracker by location and completed profile@NotNull DummyTrackercreate(@NotNull PlatformLocation location, ModelProfile.Uncompleted profile) Creates tracker by location and uncompleted profile@NotNull DummyTrackercreate(@NotNull PlatformLocation location, ModelProfile.Uncompleted profile, @NotNull TrackerModifier modifier) Creates tracker by location and uncompleted profile@NotNull DummyTrackercreate(@NotNull PlatformLocation location, ModelProfile.Uncompleted profile, @NotNull TrackerModifier modifier, @NotNull Consumer<DummyTracker> preUpdateConsumer) Creates tracker by location and uncompleted profile@NotNull DummyTrackercreate(@NotNull PlatformLocation location, ModelProfile profile, @NotNull TrackerModifier modifier) Creates tracker by location and completed profile@NotNull DummyTrackercreate(@NotNull PlatformLocation location, @NotNull TrackerModifier modifier) Creates tracker by location@NotNull DummyTrackercreate(@NotNull PlatformLocation location, @NotNull TrackerModifier modifier, @NotNull Consumer<DummyTracker> preUpdateConsumer) Creates tracker by locationfinal booleanIndicates whether some other object is "equal to" this one.@NotNull Stream<RendererGroup> flatten()Gets flatten groups.@NotNull EntityTrackergetOrCreate(@NotNull BaseEntity entity) Gets or creates tracker by entity@NotNull EntityTrackergetOrCreate(@NotNull BaseEntity entity, @NotNull ModelProfile profile) Gets or creates tracker by entity and completed profile@NotNull EntityTrackergetOrCreate(@NotNull BaseEntity entity, @NotNull ModelProfile profile, @NotNull TrackerModifier modifier, @NotNull Consumer<EntityTracker> preUpdateConsumer) Gets or creates tracker by entity and completed profile@NotNull EntityTrackergetOrCreate(@NotNull BaseEntity entity, ModelProfile.Uncompleted profile) Gets or creates tracker by entity and uncompleted profile@NotNull EntityTrackergetOrCreate(@NotNull BaseEntity entity, ModelProfile.Uncompleted profile, @NotNull TrackerModifier modifier) Gets or creates tracker by entity and uncompleted profile@NotNull EntityTrackergetOrCreate(@NotNull BaseEntity entity, ModelProfile.Uncompleted profile, @NotNull TrackerModifier modifier, @NotNull Consumer<EntityTracker> preUpdateConsumer) Gets or creates tracker by entity and uncompleted profile@NotNull EntityTrackergetOrCreate(@NotNull BaseEntity entity, ModelProfile profile, @NotNull TrackerModifier modifier) Gets or creates tracker by entity and completed profile@NotNull EntityTrackergetOrCreate(@NotNull BaseEntity entity, @NotNull TrackerModifier modifier) Gets or creates tracker by entity@NotNull EntityTrackergetOrCreate(@NotNull BaseEntity entity, @NotNull TrackerModifier modifier, @NotNull Consumer<EntityTracker> preUpdateConsumer) Gets or creates tracker by entity@NotNull EntityTrackergetOrCreate(@NotNull PlatformEntity entity) Gets or creates tracker by entity@NotNull EntityTrackergetOrCreate(@NotNull PlatformEntity entity, @NotNull ModelProfile profile) Gets or creates tracker by entity and completed profile@NotNull EntityTrackergetOrCreate(@NotNull PlatformEntity entity, @NotNull ModelProfile profile, @NotNull TrackerModifier modifier) Gets or creates tracker by entity and completed profile@NotNull EntityTrackergetOrCreate(@NotNull PlatformEntity entity, @NotNull ModelProfile profile, @NotNull TrackerModifier modifier, @NotNull Consumer<EntityTracker> preUpdateConsumer) Gets or creates tracker by entity and completed profile@NotNull EntityTrackergetOrCreate(@NotNull PlatformEntity entity, ModelProfile.Uncompleted profile) Gets or creates tracker by entity and uncompleted profile@NotNull EntityTrackergetOrCreate(@NotNull PlatformEntity entity, ModelProfile.Uncompleted profile, @NotNull TrackerModifier modifier) Gets or creates tracker by entity and uncompleted profile@NotNull EntityTrackergetOrCreate(@NotNull PlatformEntity entity, ModelProfile.Uncompleted profile, @NotNull TrackerModifier modifier, @NotNull Consumer<EntityTracker> preUpdateConsumer) Gets or creates tracker by entity and uncompleted profile@NotNull EntityTrackergetOrCreate(@NotNull PlatformEntity entity, @NotNull TrackerModifier modifier) Gets or creates tracker by entity@NotNull EntityTrackergetOrCreate(@NotNull PlatformEntity entity, @NotNull TrackerModifier modifier, @NotNull Consumer<EntityTracker> preUpdateConsumer) Gets or creates tracker by entity@Nullable RendererGroupgroupByTree(@NotNull BoneName name) Gets a renderer group by treefinal inthashCode()Returns a hash code value for this object.@NotNull Stringname()Returns the value of thenamerecord component.@NotNull @Unmodifiable SequencedMap<BoneName, RendererGroup> Returns the value of therendererGroupsrecord component.final StringtoString()Returns a string representation of this record class.@NotNull ModelRenderer.Typetype()Returns the value of thetyperecord component.
-
Constructor Details
-
ModelRenderer
public ModelRenderer(@NotNull @NotNull String name, @NotNull @NotNull ModelRenderer.Type type, @NotNull @NotNull @Unmodifiable SequencedMap<BoneName, RendererGroup> rendererGroups, @NotNull @NotNull @Unmodifiable Map<String, BlueprintAnimation> animations) Creates an instance of aModelRendererrecord class.- Parameters:
name- the value for thenamerecord componenttype- the value for thetyperecord componentrendererGroups- the value for therendererGroupsrecord componentanimations- the value for theanimationsrecord component
-
-
Method Details
-
groupByTree
Gets a renderer group by tree- Parameters:
name- part name- Returns:
- group or null
-
flatten
Gets flatten groups.- Returns:
- flatten groups
-
animation
Gets blueprint animation by name- Parameters:
name- name- Returns:
- optional animation
-
create
Creates tracker by location- Parameters:
location- location- Returns:
- empty tracker
-
create
@NotNull public @NotNull DummyTracker create(@NotNull @NotNull PlatformLocation location, @NotNull @NotNull TrackerModifier modifier) Creates tracker by location- Parameters:
location- locationmodifier- modifier- Returns:
- empty tracker
-
create
@NotNull public @NotNull DummyTracker create(@NotNull @NotNull PlatformLocation location, @NotNull @NotNull TrackerModifier modifier, @NotNull @NotNull Consumer<DummyTracker> preUpdateConsumer) Creates tracker by location- Parameters:
location- locationmodifier- modifierpreUpdateConsumer- task on pre-update- Returns:
- empty tracker
-
create
@NotNull public @NotNull DummyTracker create(@NotNull @NotNull PlatformLocation location, @NotNull @NotNull ModelProfile profile) Creates tracker by location and completed profile- Parameters:
location- locationprofile- profile- Returns:
- empty tracker
-
create
@NotNull public @NotNull DummyTracker create(@NotNull @NotNull PlatformLocation location, ModelProfile profile, @NotNull @NotNull TrackerModifier modifier) Creates tracker by location and completed profile- Parameters:
location- locationprofile- profilemodifier- modifier- Returns:
- empty tracker
-
create
@NotNull public @NotNull DummyTracker create(@NotNull @NotNull PlatformLocation location, @NotNull @NotNull ModelProfile profile, @NotNull @NotNull TrackerModifier modifier, @NotNull @NotNull Consumer<DummyTracker> preUpdateConsumer) Creates tracker by location and completed profile- Parameters:
location- locationprofile- profilemodifier- modifierpreUpdateConsumer- task on pre-update- Returns:
- empty tracker
-
create
@NotNull public @NotNull DummyTracker create(@NotNull @NotNull PlatformLocation location, @NotNull ModelProfile.Uncompleted profile) Creates tracker by location and uncompleted profile- Parameters:
location- locationprofile- profile- Returns:
- empty tracker
-
create
@NotNull public @NotNull DummyTracker create(@NotNull @NotNull PlatformLocation location, ModelProfile.Uncompleted profile, @NotNull @NotNull TrackerModifier modifier) Creates tracker by location and uncompleted profile- Parameters:
location- locationprofile- profilemodifier- modifier- Returns:
- empty tracker
-
create
@NotNull public @NotNull DummyTracker create(@NotNull @NotNull PlatformLocation location, @NotNull ModelProfile.Uncompleted profile, @NotNull @NotNull TrackerModifier modifier, @NotNull @NotNull Consumer<DummyTracker> preUpdateConsumer) Creates tracker by location and uncompleted profile- Parameters:
location- locationprofile- profilemodifier- modifierpreUpdateConsumer- task on pre-update- Returns:
- empty tracker
-
create
Creates tracker by entity- Parameters:
entity- entity- Returns:
- entity tracker
-
create
@NotNull public @NotNull EntityTracker create(@NotNull @NotNull PlatformEntity entity, @NotNull @NotNull TrackerModifier modifier) Creates tracker by entity- Parameters:
entity- entitymodifier- modifier- Returns:
- entity tracker
-
create
@NotNull public @NotNull EntityTracker create(@NotNull @NotNull PlatformEntity entity, @NotNull @NotNull TrackerModifier modifier, @NotNull @NotNull Consumer<EntityTracker> preUpdateConsumer) Creates tracker by entity- Parameters:
entity- entitymodifier- modifierpreUpdateConsumer- task on pre-update- Returns:
- entity tracker
-
create
@NotNull public @NotNull EntityTracker create(@NotNull @NotNull PlatformEntity entity, @NotNull ModelProfile.Uncompleted profile) Creates tracker by entity and uncompleted profile- Parameters:
entity- entityprofile- profile- Returns:
- entity tracker
-
create
@NotNull public @NotNull EntityTracker create(@NotNull @NotNull PlatformEntity entity, @NotNull ModelProfile.Uncompleted profile, @NotNull @NotNull TrackerModifier modifier) Creates tracker by entity and uncompleted profile- Parameters:
entity- entityprofile- profilemodifier- modifier- Returns:
- entity tracker
-
create
@NotNull public @NotNull EntityTracker create(@NotNull @NotNull PlatformEntity entity, @NotNull ModelProfile.Uncompleted profile, @NotNull @NotNull TrackerModifier modifier, @NotNull @NotNull Consumer<EntityTracker> preUpdateConsumer) Creates tracker by entity and uncompleted profile- Parameters:
entity- entityprofile- skinmodifier- modifierpreUpdateConsumer- task on pre-update- Returns:
- entity tracker
-
getOrCreate
Gets or creates tracker by entity- Parameters:
entity- entity- Returns:
- entity tracker
-
getOrCreate
@NotNull public @NotNull EntityTracker getOrCreate(@NotNull @NotNull PlatformEntity entity, @NotNull @NotNull TrackerModifier modifier) Gets or creates tracker by entity- Parameters:
entity- entitymodifier- modifier- Returns:
- entity tracker
-
getOrCreate
@NotNull public @NotNull EntityTracker getOrCreate(@NotNull @NotNull PlatformEntity entity, @NotNull @NotNull TrackerModifier modifier, @NotNull @NotNull Consumer<EntityTracker> preUpdateConsumer) Gets or creates tracker by entity- Parameters:
entity- entitymodifier- modifierpreUpdateConsumer- task on pre-update- Returns:
- entity tracker
-
getOrCreate
@NotNull public @NotNull EntityTracker getOrCreate(@NotNull @NotNull PlatformEntity entity, @NotNull @NotNull ModelProfile profile) Gets or creates tracker by entity and completed profile- Parameters:
entity- entityprofile- profile- Returns:
- entity tracker
-
getOrCreate
@NotNull public @NotNull EntityTracker getOrCreate(@NotNull @NotNull PlatformEntity entity, @NotNull @NotNull ModelProfile profile, @NotNull @NotNull TrackerModifier modifier) Gets or creates tracker by entity and completed profile- Parameters:
entity- entityprofile- profilemodifier- modifier- Returns:
- entity tracker
-
getOrCreate
@NotNull public @NotNull EntityTracker getOrCreate(@NotNull @NotNull PlatformEntity entity, @NotNull @NotNull ModelProfile profile, @NotNull @NotNull TrackerModifier modifier, @NotNull @NotNull Consumer<EntityTracker> preUpdateConsumer) Gets or creates tracker by entity and completed profile- Parameters:
entity- entityprofile- skinmodifier- modifierpreUpdateConsumer- task on pre-update- Returns:
- entity tracker
-
getOrCreate
@NotNull public @NotNull EntityTracker getOrCreate(@NotNull @NotNull PlatformEntity entity, @NotNull ModelProfile.Uncompleted profile) Gets or creates tracker by entity and uncompleted profile- Parameters:
entity- entityprofile- profile- Returns:
- entity tracker
-
getOrCreate
@NotNull public @NotNull EntityTracker getOrCreate(@NotNull @NotNull PlatformEntity entity, @NotNull ModelProfile.Uncompleted profile, @NotNull @NotNull TrackerModifier modifier) Gets or creates tracker by entity and uncompleted profile- Parameters:
entity- entityprofile- profilemodifier- modifier- Returns:
- entity tracker
-
getOrCreate
@NotNull public @NotNull EntityTracker getOrCreate(@NotNull @NotNull PlatformEntity entity, @NotNull ModelProfile.Uncompleted profile, @NotNull @NotNull TrackerModifier modifier, @NotNull @NotNull Consumer<EntityTracker> preUpdateConsumer) Gets or creates tracker by entity and uncompleted profile- Parameters:
entity- entityprofile- skinmodifier- modifierpreUpdateConsumer- task on pre-update- Returns:
- entity tracker
-
create
Creates tracker by entity- Parameters:
entity- entity- Returns:
- entity tracker
-
create
@NotNull public @NotNull EntityTracker create(@NotNull @NotNull BaseEntity entity, @NotNull @NotNull TrackerModifier modifier) Creates tracker by entity- Parameters:
entity- entitymodifier- modifier- Returns:
- entity tracker
-
create
@NotNull public @NotNull EntityTracker create(@NotNull @NotNull BaseEntity entity, @NotNull @NotNull TrackerModifier modifier, @NotNull @NotNull Consumer<EntityTracker> preUpdateConsumer) Creates tracker by entity- Parameters:
entity- entitymodifier- modifierpreUpdateConsumer- task on pre-update- Returns:
- entity tracker
-
create
@NotNull public @NotNull EntityTracker create(@NotNull @NotNull BaseEntity entity, @NotNull @NotNull ModelProfile profile) Creates tracker by entity and completed profile- Parameters:
entity- entityprofile- profile- Returns:
- entity tracker
-
create
@NotNull public @NotNull EntityTracker create(@NotNull @NotNull BaseEntity entity, @NotNull @NotNull ModelProfile profile, @NotNull @NotNull TrackerModifier modifier) Creates tracker by entity and completed profile- Parameters:
entity- entityprofile- profilemodifier- modifier- Returns:
- entity tracker
-
create
@NotNull public @NotNull EntityTracker create(@NotNull @NotNull BaseEntity entity, @NotNull @NotNull ModelProfile profile, @NotNull @NotNull TrackerModifier modifier, @NotNull @NotNull Consumer<EntityTracker> preUpdateConsumer) Creates tracker by entity and completed profile- Parameters:
entity- entityprofile- profilemodifier- modifierpreUpdateConsumer- task on pre-update- Returns:
- entity tracker
-
create
@NotNull public @NotNull EntityTracker create(@NotNull @NotNull BaseEntity entity, @NotNull ModelProfile.Uncompleted profile) Creates tracker by entity and uncompleted profile- Parameters:
entity- entityprofile- profile- Returns:
- entity tracker
-
create
@NotNull public @NotNull EntityTracker create(@NotNull @NotNull BaseEntity entity, @NotNull ModelProfile.Uncompleted profile, @NotNull @NotNull TrackerModifier modifier) Creates tracker by entity and uncompleted profile- Parameters:
entity- entityprofile- profilemodifier- modifier- Returns:
- entity tracker
-
create
@NotNull public @NotNull EntityTracker create(@NotNull @NotNull BaseEntity entity, @NotNull ModelProfile.Uncompleted profile, @NotNull @NotNull TrackerModifier modifier, @NotNull @NotNull Consumer<EntityTracker> preUpdateConsumer) Creates tracker by entity and uncompleted profile- Parameters:
entity- entityprofile- profilemodifier- modifierpreUpdateConsumer- task on pre-update- Returns:
- entity tracker
-
getOrCreate
Gets or creates tracker by entity- Parameters:
entity- entity- Returns:
- entity tracker
-
getOrCreate
@NotNull public @NotNull EntityTracker getOrCreate(@NotNull @NotNull BaseEntity entity, @NotNull @NotNull TrackerModifier modifier) Gets or creates tracker by entity- Parameters:
entity- entitymodifier- modifier- Returns:
- entity tracker
-
getOrCreate
@NotNull public @NotNull EntityTracker getOrCreate(@NotNull @NotNull BaseEntity entity, @NotNull @NotNull TrackerModifier modifier, @NotNull @NotNull Consumer<EntityTracker> preUpdateConsumer) Gets or creates tracker by entity- Parameters:
entity- entitymodifier- modifierpreUpdateConsumer- task on pre-update- Returns:
- entity tracker
-
getOrCreate
@NotNull public @NotNull EntityTracker getOrCreate(@NotNull @NotNull BaseEntity entity, @NotNull @NotNull ModelProfile profile) Gets or creates tracker by entity and completed profile- Parameters:
entity- entityprofile- profile- Returns:
- entity tracker
-
getOrCreate
@NotNull public @NotNull EntityTracker getOrCreate(@NotNull @NotNull BaseEntity entity, ModelProfile profile, @NotNull @NotNull TrackerModifier modifier) Gets or creates tracker by entity and completed profile- Parameters:
entity- entityprofile- profilemodifier- modifier- Returns:
- entity tracker
-
getOrCreate
@NotNull public @NotNull EntityTracker getOrCreate(@NotNull @NotNull BaseEntity entity, @NotNull @NotNull ModelProfile profile, @NotNull @NotNull TrackerModifier modifier, @NotNull @NotNull Consumer<EntityTracker> preUpdateConsumer) Gets or creates tracker by entity and completed profile- Parameters:
entity- entityprofile- profilemodifier- modifierpreUpdateConsumer- task on pre-update- Returns:
- entity tracker
-
getOrCreate
@NotNull public @NotNull EntityTracker getOrCreate(@NotNull @NotNull BaseEntity entity, @NotNull ModelProfile.Uncompleted profile) Gets or creates tracker by entity and uncompleted profile- Parameters:
entity- entityprofile- profile- Returns:
- entity tracker
-
getOrCreate
@NotNull public @NotNull EntityTracker getOrCreate(@NotNull @NotNull BaseEntity entity, ModelProfile.Uncompleted profile, @NotNull @NotNull TrackerModifier modifier) Gets or creates tracker by entity and uncompleted profile- Parameters:
entity- entityprofile- profilemodifier- modifier- Returns:
- entity tracker
-
getOrCreate
@NotNull public @NotNull EntityTracker getOrCreate(@NotNull @NotNull BaseEntity entity, @NotNull ModelProfile.Uncompleted profile, @NotNull @NotNull TrackerModifier modifier, @NotNull @NotNull Consumer<EntityTracker> preUpdateConsumer) Gets or creates tracker by entity and uncompleted profile- Parameters:
entity- entityprofile- profilemodifier- modifierpreUpdateConsumer- task on pre-update- Returns:
- entity tracker
-
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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
rendererGroups
Returns the value of therendererGroupsrecord component.- Returns:
- the value of the
rendererGroupsrecord component
-
animations
Returns the value of theanimationsrecord component.- Returns:
- the value of the
animationsrecord component
-