Package net.minecraftforge.client.event
Class RegisterClientTooltipComponentFactoriesEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.RegisterClientTooltipComponentFactoriesEvent
- All Implemented Interfaces:
IModBusEvent
public class RegisterClientTooltipComponentFactoriesEvent
extends net.minecraftforge.eventbus.api.Event
implements IModBusEvent
Allows users to register custom
ClientTooltipComponent
factories for their TooltipComponent
types.
This event is not cancellable, and does not have a result.
This event is fired on the mod-specific event bus, only on the logical client.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Map
<Class<? extends TooltipComponent>, Function<TooltipComponent, ClientTooltipComponent>> -
Constructor Summary
ConstructorDescriptionRegisterClientTooltipComponentFactoriesEvent
(Map<Class<? extends TooltipComponent>, Function<TooltipComponent, ClientTooltipComponent>> factories) -
Method Summary
Modifier and TypeMethodDescription<T extends TooltipComponent>
voidregister
(Class<T> type, Function<? super T, ? extends ClientTooltipComponent> factory) Registers aClientTooltipComponent
factory for aTooltipComponent
.Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
factories
private final Map<Class<? extends TooltipComponent>,Function<TooltipComponent, factoriesClientTooltipComponent>>
-
-
Constructor Details
-
RegisterClientTooltipComponentFactoriesEvent
@Internal public RegisterClientTooltipComponentFactoriesEvent(Map<Class<? extends TooltipComponent>, Function<TooltipComponent, ClientTooltipComponent>> factories)
-
-
Method Details
-
register
public <T extends TooltipComponent> void register(Class<T> type, Function<? super T, ? extends ClientTooltipComponent> factory) Registers aClientTooltipComponent
factory for aTooltipComponent
.
-