Record Class ModelRenderer
java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.renderer.ModelRenderer
- Record Components:
parent- parent blueprintrendererGroupMap- group mapanimationMap- 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 Summary
ConstructorsConstructorDescriptionModelRenderer(@NotNull ModelBlueprint parent, @NotNull @Unmodifiable Map<BoneName, RendererGroup> rendererGroupMap, @NotNull @Unmodifiable Map<String, BlueprintAnimation> animationMap) 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 theanimationMaprecord component.Gets all names of animation.@NotNull DummyTrackercreate(@NotNull org.bukkit.Location location) Creates tracker by location@NotNull DummyTrackercreate(@NotNull org.bukkit.Location location, @NotNull com.mojang.authlib.GameProfile profile) Creates tracker by location and profile@NotNull DummyTrackercreate(@NotNull org.bukkit.Location location, @NotNull com.mojang.authlib.GameProfile profile, boolean slim) Creates tracker by location and profile@NotNull DummyTrackercreate(@NotNull org.bukkit.Location location, @NotNull com.mojang.authlib.GameProfile profile, boolean slim, @NotNull TrackerModifier modifier) Creates tracker by location and profile@NotNull DummyTrackercreate(@NotNull org.bukkit.Location location, @NotNull com.mojang.authlib.GameProfile profile, boolean slim, @NotNull TrackerModifier modifier, @NotNull Consumer<DummyTracker> preUpdateConsumer) Creates tracker by location and profile@NotNull DummyTrackercreate(@NotNull org.bukkit.Location location, @NotNull com.mojang.authlib.GameProfile profile, @NotNull TrackerModifier modifier) Creates tracker by location and profile@NotNull DummyTrackercreate(@NotNull org.bukkit.Location location, @NotNull TrackerModifier modifier) Creates tracker by location@NotNull DummyTrackercreate(@NotNull org.bukkit.Location location, @NotNull TrackerModifier modifier, @NotNull Consumer<DummyTracker> preUpdateConsumer) Creates tracker by location@NotNull DummyTrackercreate(@NotNull org.bukkit.Location location, @NotNull org.bukkit.entity.Player player) Creates tracker by location and player@NotNull DummyTrackercreate(@NotNull org.bukkit.Location location, @NotNull org.bukkit.entity.Player player, @NotNull TrackerModifier modifier) Creates tracker by location and player@NotNull EntityTrackercreate(@NotNull org.bukkit.entity.Entity entity) Creates tracker by entity@NotNull EntityTrackercreate(@NotNull org.bukkit.entity.Entity entity, @NotNull TrackerModifier modifier) Creates tracker by entity@NotNull EntityTrackercreate(@NotNull org.bukkit.entity.Entity entity, @NotNull TrackerModifier modifier, @NotNull Consumer<EntityTracker> preUpdateConsumer) Creates tracker by entityfinal booleanIndicates whether some other object is "equal to" this one.@NotNull Stream<RendererGroup> flatten()@NotNull EntityTrackergetOrCreate(@NotNull org.bukkit.entity.Entity entity) Gets or creates tracker by entity@NotNull EntityTrackergetOrCreate(@NotNull org.bukkit.entity.Entity entity, @NotNull TrackerModifier modifier) Gets or creates tracker by entity@NotNull EntityTrackergetOrCreate(@NotNull org.bukkit.entity.Entity 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()Gets model's name.@NotNull ModelBlueprintparent()Returns the value of theparentrecord component.@NotNull @Unmodifiable Map<BoneName, RendererGroup> Returns the value of therendererGroupMaprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ModelRenderer
public ModelRenderer(@NotNull @NotNull ModelBlueprint parent, @NotNull @NotNull @Unmodifiable Map<BoneName, RendererGroup> rendererGroupMap, @NotNull @NotNull @Unmodifiable Map<String, BlueprintAnimation> animationMap) Creates an instance of aModelRendererrecord class.- Parameters:
parent- the value for theparentrecord componentrendererGroupMap- the value for therendererGroupMaprecord componentanimationMap- the value for theanimationMaprecord component
-
-
Method Details
-
groupByTree
Gets a renderer group by tree- Parameters:
name- part name- Returns:
- group or null
-
flatten
-
animations
Gets all names of animation.- Returns:
- names
-
animation
Gets blueprint animation by name- Parameters:
name- name- Returns:
- optional animation
-
name
Gets model's name.- Returns:
- name
-
create
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- locationmodifier- 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- locationmodifier- modifierpreUpdateConsumer- 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- locationplayer- 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- locationprofile- 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- locationprofile- profileslim- 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- locationplayer- playermodifier- 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- locationprofile- profilemodifier- 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- locationprofile- profileslim- slimmodifier- 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- locationprofile- profileslim- slimmodifier- modifierpreUpdateConsumer- task on pre-update- Returns:
- empty tracker
-
create
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- entitymodifier- 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- entitymodifier- 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- entitymodifier- modifierpreUpdateConsumer- 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- entitymodifier- 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). -
parent
Returns the value of theparentrecord component.- Returns:
- the value of the
parentrecord component
-
rendererGroupMap
Returns the value of therendererGroupMaprecord component.- Returns:
- the value of the
rendererGroupMaprecord component
-
animationMap
Returns the value of theanimationMaprecord component.- Returns:
- the value of the
animationMaprecord component
-