use of top.theillusivec4.curios.api.type.capability.ICurioItem in project relics by SSKirillSS.
the class TooltipDescriptionHandler method getSlotTooltip.
private static List<ITextComponent> getSlotTooltip(ItemStack stack) {
List<String> tags = new ArrayList<>(CuriosApi.getCuriosHelper().getCurioTags(stack.getItem()));
List<ITextComponent> tooltip = new ArrayList<>();
if (!(stack.getItem() instanceof ICurioItem) || tags.isEmpty())
return tooltip;
StringTextComponent component = new StringTextComponent("");
component.append((new StringTextComponent(" ◆ ").withStyle(TextFormatting.GREEN)).append((new TranslationTextComponent("tooltip.relics.shift.stats.slot")).withStyle(TextFormatting.YELLOW)).append(" "));
for (int i = 0; i < tags.size(); i++) {
String tag = tags.get(i);
component.append((new TranslationTextComponent("curios.identifier." + tag).withStyle(TextFormatting.WHITE)).append((new StringTextComponent(i + 1 < tags.size() ? ", " : "").withStyle(TextFormatting.GRAY))));
}
tooltip.add(component);
return tooltip;
}
Aggregations