use of com.tangykiwi.kiwiclient.event.TooltipDataEvent in project KiwiClient by TangyKiwi.
the class ItemMixin method onTooltipData.
@Inject(method = "getTooltipData", at = @At("HEAD"), cancellable = true)
private void onTooltipData(ItemStack stack, CallbackInfoReturnable<Optional<TooltipData>> cir) {
TooltipDataEvent event = new TooltipDataEvent(stack);
KiwiClient.eventBus.post(event);
if (event.tooltipData != null) {
cir.setReturnValue(Optional.of(event.tooltipData));
}
}
Aggregations