Skip to content

1.17 Upgrading Guide

Registration

Some methods in IRegistrar are renamed: - registerStackProvider -> registerIconProvider - registerEntityStackProvider -> registerIconProvider

Component provider registration methods no longer accept interface or TileEntity classes. You can register with the base class and filter it inside the provider.

IRegistrar#registerTooltipRenderer is removed because you don't need to register your renderer any longer.

IRegistrar#registerOverrideEntityProvider is removed. Use WailaRayTraceEvent instead to have more flexible control to the target.

Component Providers

appendHead, appendBody and appendTail are now merged into one method appendTooltip. You can get current TooltipPosition using accessor.getTooltipPosition()

ItemStack getStack(IDataAccessor accessor, IPluginConfig config) is changed to IElement getIcon(BlockAccessor/EntityAccessor accessor, IPluginConfig config, IElement currentIcon), which means you can render anything as an icon, not only item.

UI Elements other than Text

RenderableTextComponent and ITooltipRenderer are removed. Instead of manipulating List<Component>, you are now manipulating IElements, and text component is a type of them.

For example, to display an item:

IElementHelper helper = tooltip.getElementHelper();
tooltip.add(helper.item(itemStack));

or render your own element:

tooltip.add(new MyElement());

Debug Your Elements

Open jade.json in config/jade folder. Set general.debug to true. Then press numpad 0 in game to refresh configuration. Then it will render outline for every element to show its exact position.

ITaggableList

ITaggableList is removed. Now the minimal taggable element is IElement.

For example, to tag a text element:

IElementHelper helper = tooltip.getElementHelper();
tooltip.add(helper.text(text).tag(identifier));

or use the simplified shorthand version:

tooltip.add(text, identifier);

Server Data

Due to security concerns, accessor.getServerData() will return an empty compound tag if the block entity or entity does not have a IServerDataProvider. You need to sync useful data by yourself.