Package journeymap.api.v2.client.event
Class RegistryEvent.InfoSlotRegistryEvent
java.lang.Object
journeymap.api.v2.common.event.impl.JourneyMapEvent
journeymap.api.v2.client.event.ClientEvent
journeymap.api.v2.client.event.RegistryEvent
journeymap.api.v2.client.event.RegistryEvent.InfoSlotRegistryEvent
- Enclosing class:
RegistryEvent
Used for creating your own info slots.
This event is fired before the
RegistryEvent.OptionsRegistryEvent as the info slots are need for the configs.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceNested classes/interfaces inherited from class journeymap.api.v2.client.event.RegistryEvent
RegistryEvent.InfoSlotRegistryEvent, RegistryEvent.OptionsRegistryEvent, RegistryEvent.RegistryType -
Field Summary
Fields inherited from class journeymap.api.v2.client.event.ClientEvent
dimensionFields inherited from class journeymap.api.v2.common.event.impl.JourneyMapEvent
timestamp -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Methods inherited from class journeymap.api.v2.client.event.RegistryEvent
getRegistryTypeMethods inherited from class journeymap.api.v2.common.event.impl.JourneyMapEvent
cancel, isCancellable, isCancelled
-
Constructor Details
-
InfoSlotRegistryEvent
-
-
Method Details
-
register
Registers an infoslot.Please supply a key.tooltip in your lang files so that the dropdown item has a tool tip.
- Parameters:
modId- - The ModIdkey- - The i18n key or Label for the InfoSlot dropdown in the options menu.updateTime- - How often in milliseconds to update.supplier- - The supplier that gets the value to be displayed.
-
register
public void register(String modId, net.minecraft.network.chat.Component key, long updateTime, Supplier<net.minecraft.network.chat.Component> supplier) Registers an infoslot.Please supply a key.tooltip in your lang files so that the dropdown item has a tool tip.
For key please use Component.translateable("key") here will also only render as white and does not support param arguments at this time. In the future, the dropdown will fully support Components and formatting.
- Parameters:
modId- - The ModIdkey- - The i18n key for the InfoSlot dropdown in the options menu.updateTime- - How often in milliseconds to update.supplier- - The supplier that gets the value to be displayed.
-