Package kr.toxicity.model.api.tracker
Interface TrackerUpdateAction
- All Superinterfaces:
BiPredicate<RenderedBone,BonePredicate>
- All Known Implementing Classes:
TrackerUpdateAction.Billboard,TrackerUpdateAction.Brightness,TrackerUpdateAction.Composite,TrackerUpdateAction.Enchant,TrackerUpdateAction.Glow,TrackerUpdateAction.GlowColor,TrackerUpdateAction.ItemMapping,TrackerUpdateAction.ItemStack,TrackerUpdateAction.MoveDuration,TrackerUpdateAction.None,TrackerUpdateAction.PerBone,TrackerUpdateAction.PreviousTint,TrackerUpdateAction.Tint,TrackerUpdateAction.TogglePart,TrackerUpdateAction.ViewRange
public sealed interface TrackerUpdateAction
extends BiPredicate<RenderedBone,BonePredicate>
permits TrackerUpdateAction.Brightness, TrackerUpdateAction.Glow, TrackerUpdateAction.GlowColor, TrackerUpdateAction.ViewRange, TrackerUpdateAction.Enchant, TrackerUpdateAction.Tint, TrackerUpdateAction.PreviousTint, TrackerUpdateAction.TogglePart, TrackerUpdateAction.ItemStack, TrackerUpdateAction.Billboard, TrackerUpdateAction.ItemMapping, TrackerUpdateAction.MoveDuration, TrackerUpdateAction.Composite, TrackerUpdateAction.PerBone, TrackerUpdateAction.None
Represents an action that updates the state of a
RenderedBone.
Actions can modify display properties like brightness, glow, item stack, and more. They are applied to bones matching a specific predicate.
- Since:
- 1.15.2
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordAction to update the billboard constraint.static final recordAction to update brightness.static final recordComposite action.static enumAction to update enchantment glint.static enumAction to update glow status.static final recordAction to update glow color.static enumAction to update item mapping.static final recordAction to update the item stack.static final recordAction to update movement duration.static enumNo-op action.static final recordPer-bone dynamic action.static enumAction to revert to previous tint.static final recordAction to apply a tint color.static enumAction to toggle part visibility.static final recordAction to update view range. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull TrackerUpdateAction.Billboardbillboard(@NotNull PlatformBillboard billboard) Creates an action to set the billboard constraint.static @NotNull TrackerUpdateAction.Brightnessbrightness(int block, int sky) Creates an action to update display brightness.static @NotNull TrackerUpdateActioncomposite(@NotNull TrackerUpdateAction... actions) Combines multiple actions into a single composite action.static @NotNull TrackerUpdateAction.Enchantenchant(boolean enchant) Creates an action to toggle the enchanted glint effect.static @NotNull TrackerUpdateAction.Glowglow(boolean glow) Creates an action to toggle the glowing effect.static @NotNull TrackerUpdateAction.GlowColorglowColor(int glowColor) Creates an action to set the glow color.static @NotNull TrackerUpdateAction.ItemMappingCreates an action to update the item mapping.static @NotNull TrackerUpdateAction.ItemStackitemStack(@NotNull TransformedItemStack itemStack) Creates an action to update the displayed item stack.static @NotNull TrackerUpdateAction.MoveDurationmoveDuration(int moveDuration) Creates an action to set the movement interpolation duration.static @NotNull TrackerUpdateAction.Nonenone()Returns a no-op action.static @NotNull TrackerUpdateAction.PerBoneperBone(@NotNull Function<RenderedBone, TrackerUpdateAction> builder) Creates an action that generates a specific action for each bone.static @NotNull TrackerUpdateAction.PreviousTintCreates an action to revert to the previous tint.default @NotNull Stream<TrackerUpdateAction> stream()Returns a stream of actions (useful for flattening composites).booleantest(@NotNull RenderedBone bone, @NotNull BonePredicate predicate) Applies the action to a bone if it matches the predicate.default @NotNull TrackerUpdateActionthen(@NotNull TrackerUpdateAction action) Chains this action with another action.static @NotNull TrackerUpdateAction.Tinttint(int rgb) Creates an action to apply a tint color.static @NotNull TrackerUpdateAction.ToggleParttogglePart(boolean toggle) Creates an action to toggle the visibility of a part.static @NotNull TrackerUpdateAction.ViewRangeviewRange(float viewRange) Creates an action to set the view range.Methods inherited from interface java.util.function.BiPredicate
and, negate, or
-
Method Details
-
brightness
Creates an action to update display brightness.- Parameters:
block- the block light levelsky- the skylight level- Returns:
- the action
- Since:
- 1.15.2
-
glow
Creates an action to toggle the glowing effect.- Parameters:
glow- true to enable glow- Returns:
- the action
- Since:
- 1.15.2
-
glowColor
Creates an action to set the glow color.- Parameters:
glowColor- the RGB glow color- Returns:
- the action
- Since:
- 1.15.2
-
viewRange
Creates an action to set the view range.- Parameters:
viewRange- the view range- Returns:
- the action
- Since:
- 1.15.2
-
tint
Creates an action to apply a tint color.- Parameters:
rgb- the RGB tint color- Returns:
- the action
- Since:
- 1.15.2
-
previousTint
Creates an action to revert to the previous tint.- Returns:
- the action
- Since:
- 1.15.2
-
enchant
Creates an action to toggle the enchanted glint effect.- Parameters:
enchant- true to enable glint- Returns:
- the action
- Since:
- 1.15.2
-
togglePart
Creates an action to toggle the visibility of a part.- Parameters:
toggle- true to show, false to hide- Returns:
- the action
- Since:
- 1.15.2
-
itemStack
@NotNull static @NotNull TrackerUpdateAction.ItemStack itemStack(@NotNull @NotNull TransformedItemStack itemStack) Creates an action to update the displayed item stack.- Parameters:
itemStack- the new item stack- Returns:
- the action
- Since:
- 1.15.2
-
billboard
@NotNull static @NotNull TrackerUpdateAction.Billboard billboard(@NotNull @NotNull PlatformBillboard billboard) Creates an action to set the billboard constraint.- Parameters:
billboard- the billboard type- Returns:
- the action
- Since:
- 1.15.2
-
itemMapping
Creates an action to update the item mapping.- Returns:
- the action
- Since:
- 1.15.2
-
moveDuration
Creates an action to set the movement interpolation duration.- Parameters:
moveDuration- the duration in ticks- Returns:
- the action
- Since:
- 1.15.2
-
composite
@NotNull static @NotNull TrackerUpdateAction composite(@NotNull @NotNull TrackerUpdateAction... actions) Combines multiple actions into a single composite action.- Parameters:
actions- the actions to combine- Returns:
- the composite action
- Since:
- 1.15.2
-
perBone
@NotNull static @NotNull TrackerUpdateAction.PerBone perBone(@NotNull @NotNull Function<RenderedBone, TrackerUpdateAction> builder) Creates an action that generates a specific action for each bone.- Parameters:
builder- the function to generate actions- Returns:
- the per-bone action
- Since:
- 1.15.2
-
none
Returns a no-op action.- Returns:
- the none action
- Since:
- 1.15.2
-
test
Applies the action to a bone if it matches the predicate.- Specified by:
testin interfaceBiPredicate<RenderedBone,BonePredicate> - Parameters:
bone- the target bonepredicate- the predicate to check against- Returns:
- true if the bone was updated
- Since:
- 1.15.2
-
then
Chains this action with another action.- Parameters:
action- the next action- Returns:
- the combined action
- Since:
- 1.15.2
-
stream
Returns a stream of actions (useful for flattening composites).- Returns:
- the stream
- Since:
- 1.15.2
-