use of com.tangykiwi.kiwiclient.util.tooltip.ContainerTooltipComponent in project KiwiClient by TangyKiwi.
the class Tooltips method getTooltipData.
@Subscribe
@AllowConcurrentEvents
public void getTooltipData(TooltipDataEvent event) {
// Shulker Box
if (hasItems(event.itemStack) && getSetting(3).asToggle().state) {
NbtCompound compoundTag = event.itemStack.getSubNbt("BlockEntityTag");
DefaultedList<ItemStack> itemStacks = DefaultedList.ofSize(27, ItemStack.EMPTY);
Inventories.readNbt(compoundTag, itemStacks);
event.tooltipData = new ContainerTooltipComponent(itemStacks, getShulkerColor(event.itemStack));
} else // EChest
if (event.itemStack.getItem() == Items.ENDER_CHEST && getSetting(4).asToggle().state) {
event.tooltipData = new ContainerTooltipComponent(EChestMemory.ITEMS, new Color(0, 50, 50));
}
}
Aggregations