Record Class ModelRenderer

java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.renderer.ModelRenderer
Record Components:
parent - parent blueprint
rendererGroupMap - group map
animationMap - animation map

public record ModelRenderer(@NotNull ModelBlueprint parent, @NotNull @Unmodifiable Map<BoneName,RendererGroup> rendererGroupMap, @NotNull @Unmodifiable Map<String,BlueprintAnimation> animationMap) 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()
    • animations

      @NotNull public @NotNull @Unmodifiable Set<String> animations()
      Gets all names of animation.
      Returns:
      names
    • animation

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

      @NotNull public @NotNull String name()
      Gets model's name.
      Returns:
      name
    • create

      @NotNull public @NotNull DummyTracker create(@NotNull @NotNull org.bukkit.Location location)
      Creates tracker by location
      Parameters:
      location - location
      Returns:
      empty tracker
    • create

      @NotNull public @NotNull DummyTracker create(@NotNull @NotNull org.bukkit.Location 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 org.bukkit.Location 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 org.bukkit.Location location, @NotNull @NotNull org.bukkit.entity.Player player)
      Creates tracker by location and player
      Parameters:
      location - location
      player - player
      Returns:
      empty tracker
    • create

      @NotNull public @NotNull DummyTracker create(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull com.mojang.authlib.GameProfile profile)
      Creates tracker by location and profile
      Parameters:
      location - location
      profile - profile
      Returns:
      empty tracker
    • create

      @NotNull public @NotNull DummyTracker create(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull com.mojang.authlib.GameProfile profile, boolean slim)
      Creates tracker by location and profile
      Parameters:
      location - location
      profile - profile
      slim - slim
      Returns:
      empty tracker
    • create

      @NotNull public @NotNull DummyTracker create(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull TrackerModifier modifier)
      Creates tracker by location and player
      Parameters:
      location - location
      player - player
      modifier - modifier
      Returns:
      empty tracker
    • create

      @NotNull public @NotNull DummyTracker create(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull com.mojang.authlib.GameProfile profile, @NotNull @NotNull TrackerModifier modifier)
      Creates tracker by location and profile
      Parameters:
      location - location
      profile - profile
      modifier - modifier
      Returns:
      empty tracker
    • create

      @NotNull public @NotNull DummyTracker create(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull com.mojang.authlib.GameProfile profile, boolean slim, @NotNull @NotNull TrackerModifier modifier)
      Creates tracker by location and profile
      Parameters:
      location - location
      profile - profile
      slim - slim
      modifier - modifier
      Returns:
      empty tracker
    • create

      @NotNull public @NotNull DummyTracker create(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull com.mojang.authlib.GameProfile profile, boolean slim, @NotNull @NotNull TrackerModifier modifier, @NotNull @NotNull Consumer<DummyTracker> preUpdateConsumer)
      Creates tracker by location and profile
      Parameters:
      location - location
      profile - profile
      slim - slim
      modifier - modifier
      preUpdateConsumer - task on pre-update
      Returns:
      empty tracker
    • create

      @NotNull public @NotNull EntityTracker create(@NotNull @NotNull org.bukkit.entity.Entity entity)
      Creates tracker by entity
      Parameters:
      entity - entity
      Returns:
      entity tracker
    • getOrCreate

      @NotNull public @NotNull EntityTracker getOrCreate(@NotNull @NotNull org.bukkit.entity.Entity entity)
      Gets or creates tracker by entity
      Parameters:
      entity - entity
      Returns:
      entity tracker
    • create

      @NotNull public @NotNull EntityTracker create(@NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull TrackerModifier modifier)
      Creates tracker by entity
      Parameters:
      entity - entity
      modifier - modifier
      Returns:
      entity tracker
    • getOrCreate

      @NotNull public @NotNull EntityTracker getOrCreate(@NotNull @NotNull org.bukkit.entity.Entity entity, @NotNull @NotNull TrackerModifier modifier)
      Gets or creates tracker by entity
      Parameters:
      entity - entity
      modifier - modifier
      Returns:
      entity tracker
    • create

      @NotNull public @NotNull EntityTracker create(@NotNull @NotNull org.bukkit.entity.Entity 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
    • getOrCreate

      @NotNull public @NotNull EntityTracker getOrCreate(@NotNull @NotNull org.bukkit.entity.Entity 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
    • 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.
    • parent

      @NotNull public @NotNull ModelBlueprint parent()
      Returns the value of the parent record component.
      Returns:
      the value of the parent record component
    • rendererGroupMap

      @NotNull public @NotNull @Unmodifiable Map<BoneName,RendererGroup> rendererGroupMap()
      Returns the value of the rendererGroupMap record component.
      Returns:
      the value of the rendererGroupMap record component
    • animationMap

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