Record Class ModelRenderer

java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.renderer.ModelRenderer
Record Components:
name - name
type - type
rendererGroups - group map
animations - 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.
  • Constructor Details

  • Method Details

    • groupByTree

      @Nullable public @Nullable RendererGroup groupByTree(@NotNull @NotNull BoneName name)
      Gets a renderer group by tree
      Parameters:
      name - part name
      Returns:
      group or null
    • flatten

      @NotNull public @NotNull Stream<RendererGroup> flatten()
      Gets flatten groups.
      Returns:
      flatten groups
    • animation

      @NotNull public @NotNull Optional<BlueprintAnimation> animation(@NotNull @NotNull String name)
      Gets blueprint animation by name
      Parameters:
      name - name
      Returns:
      optional animation
    • create

      @NotNull public @NotNull DummyTracker create(@NotNull @NotNull PlatformLocation location)
      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 - location
      modifier - 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 - location
      modifier - modifier
      preUpdateConsumer - 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 - location
      profile - 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 - location
      profile - profile
      modifier - 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 - location
      profile - profile
      modifier - modifier
      preUpdateConsumer - 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 - location
      profile - 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 - location
      profile - profile
      modifier - 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 - location
      profile - profile
      modifier - modifier
      preUpdateConsumer - task on pre-update
      Returns:
      empty tracker
    • create

      @NotNull public @NotNull EntityTracker create(@NotNull @NotNull PlatformEntity entity)
      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 - entity
      modifier - 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 - entity
      modifier - modifier
      preUpdateConsumer - 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 - entity
      profile - 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 - entity
      profile - profile
      modifier - 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 - entity
      profile - skin
      modifier - modifier
      preUpdateConsumer - task on pre-update
      Returns:
      entity tracker
    • getOrCreate

      @NotNull public @NotNull EntityTracker getOrCreate(@NotNull @NotNull PlatformEntity entity)
      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 - entity
      modifier - 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 - entity
      modifier - modifier
      preUpdateConsumer - 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 - entity
      profile - 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 - entity
      profile - profile
      modifier - 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 - entity
      profile - skin
      modifier - modifier
      preUpdateConsumer - 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 - entity
      profile - 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 - entity
      profile - profile
      modifier - 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 - entity
      profile - skin
      modifier - modifier
      preUpdateConsumer - task on pre-update
      Returns:
      entity tracker
    • create

      @NotNull public @NotNull EntityTracker create(@NotNull @NotNull BaseEntity entity)
      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 - entity
      modifier - 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 - entity
      modifier - modifier
      preUpdateConsumer - 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 - entity
      profile - 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 - entity
      profile - profile
      modifier - 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 - entity
      profile - profile
      modifier - modifier
      preUpdateConsumer - 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 - entity
      profile - 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 - entity
      profile - profile
      modifier - 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 - entity
      profile - profile
      modifier - modifier
      preUpdateConsumer - task on pre-update
      Returns:
      entity tracker
    • getOrCreate

      @NotNull public @NotNull EntityTracker getOrCreate(@NotNull @NotNull BaseEntity entity)
      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 - entity
      modifier - 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 - entity
      modifier - modifier
      preUpdateConsumer - 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 - entity
      profile - 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 - entity
      profile - profile
      modifier - 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 - entity
      profile - profile
      modifier - modifier
      preUpdateConsumer - 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 - entity
      profile - 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 - entity
      profile - profile
      modifier - 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 - entity
      profile - profile
      modifier - modifier
      preUpdateConsumer - task on pre-update
      Returns:
      entity tracker
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      @NotNull public @NotNull String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • type

      @NotNull public @NotNull ModelRenderer.Type type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • rendererGroups

      @NotNull public @NotNull @Unmodifiable SequencedMap<BoneName,RendererGroup> rendererGroups()
      Returns the value of the rendererGroups record component.
      Returns:
      the value of the rendererGroups record component
    • animations

      @NotNull public @NotNull @Unmodifiable Map<String,BlueprintAnimation> animations()
      Returns the value of the animations record component.
      Returns:
      the value of the animations record component