Class SBossBarRegistry
java.lang.Object
net.lcc.sollib.api.client.ui.bossbar.SBossBarRegistry
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.sounds.MusicgetModifiedTextState(net.minecraft.world.BossEvent bossEvent, BossBarTextState initialState, net.minecraft.client.gui.GuiGraphics guiGraphics) Processes custom text modifiers registered byregisterTextModifier(Predicate, IBossBarTextModifier)to alter the rendered boss bar text propertiesnet.minecraft.sounds.MusicgetMusic(net.minecraft.world.BossEvent bossEvent) getRenderer(net.minecraft.world.BossEvent bossEvent) Processes custom renderers registered byregister(Predicate, IBossBarRenderer)and used byBossHealthOverlayMixinvoidregister(Predicate<net.minecraft.world.BossEvent> condition, IBossBarRenderer renderer) Manages registration of custom boss bar render introduced in SolLibvoidregister(Predicate<net.minecraft.world.BossEvent> condition, net.minecraft.resources.ResourceLocation texture) Variant ofregister(Predicate, IBossBarRenderer)of boss bar render registration with default placement Processes only custom texture to render for boss barvoidregisterMusic(Predicate<net.minecraft.world.BossEvent> condition, net.minecraft.sounds.Music music) Registers a music type to be played on active boss event.voidregisterTextModifier(Predicate<net.minecraft.world.BossEvent> condition, IBossBarTextModifier modifier) Registers a modifier to change the text displayed above a boss bar.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
SBossBarRegistry
public SBossBarRegistry()
-
-
Method Details
-
register
Manages registration of custom boss bar render introduced in SolLib- Parameters:
condition- Filters the actual boss bar event to be processed byIBossBarRendererrenderer- Management of how custom boss bar should be rendered- Since:
- 1.0
-
register
public void register(Predicate<net.minecraft.world.BossEvent> condition, net.minecraft.resources.ResourceLocation texture) Variant ofregister(Predicate, IBossBarRenderer)of boss bar render registration with default placement Processes only custom texture to render for boss bar- Since:
- 1.0
-
getRenderer
Processes custom renderers registered byregister(Predicate, IBossBarRenderer)and used byBossHealthOverlayMixin- Since:
- 1.0
-
registerTextModifier
public void registerTextModifier(Predicate<net.minecraft.world.BossEvent> condition, IBossBarTextModifier modifier) Registers a modifier to change the text displayed above a boss bar.- Parameters:
condition- Filters the actual boss bar event.modifier- The modifier logic that supplies the new Component.- Since:
- 1.4
-
getModifiedTextState
@Internal public BossBarTextState getModifiedTextState(net.minecraft.world.BossEvent bossEvent, BossBarTextState initialState, net.minecraft.client.gui.GuiGraphics guiGraphics) Processes custom text modifiers registered byregisterTextModifier(Predicate, IBossBarTextModifier)to alter the rendered boss bar text properties- Since:
- 1.4
-
registerMusic
public void registerMusic(Predicate<net.minecraft.world.BossEvent> condition, net.minecraft.sounds.Music music) Registers a music type to be played on active boss event.- Parameters:
condition- Filters the actual boss bar event.music- The music type to be played on active boss event.- Since:
- 1.4
-
getCustomBossMusic
-
getMusic
@Internal public net.minecraft.sounds.Music getMusic(net.minecraft.world.BossEvent bossEvent)
-