public static class RegistryEvent.InfoSlotRegistryEvent extends RegistryEvent
RegistryEvent.OptionsRegistryEvent as the info slots are need for the configs.| Modifier and Type | Class and Description |
|---|---|
static interface |
RegistryEvent.InfoSlotRegistryEvent.InfoSlotRegistrar |
RegistryEvent.InfoSlotRegistryEvent, RegistryEvent.OptionsRegistryEvent, RegistryEvent.RegistryTypedimensiontimestamp| Constructor and Description |
|---|
InfoSlotRegistryEvent(RegistryEvent.InfoSlotRegistryEvent.InfoSlotRegistrar registrar) |
| Modifier and Type | Method and Description |
|---|---|
void |
register(java.lang.String modId,
net.minecraft.network.chat.Component key,
long updateTime,
java.util.function.Supplier<net.minecraft.network.chat.Component> supplier)
Registers an infoslot.
|
void |
register(java.lang.String modId,
java.lang.String key,
long updateTime,
java.util.function.Supplier<java.lang.String> supplier)
Registers an infoslot.
|
getRegistryTypecancel, isCancellable, isCancelledpublic InfoSlotRegistryEvent(RegistryEvent.InfoSlotRegistryEvent.InfoSlotRegistrar registrar)
public void register(java.lang.String modId,
java.lang.String key,
long updateTime,
java.util.function.Supplier<java.lang.String> supplier)
Please supply a key.tooltip in your lang files so that the dropdown item has a tool tip.
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.public void register(java.lang.String modId,
net.minecraft.network.chat.Component key,
long updateTime,
java.util.function.Supplier<net.minecraft.network.chat.Component> supplier)
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.
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.