use of hellfirepvp.astralsorcery.common.crafting.recipe.altar.AltarUpgradeRecipe in project AstralSorcery by HellFirePvP.
the class RenderPageRecipeTemplate method addAltarRecipeTooltip.
protected void addAltarRecipeTooltip(SimpleAltarRecipe altarRecipe, List<ITextProperties> toolTip) {
if (altarRecipe.getStarlightRequirement() > 0) {
AltarType highestPossible = null;
ProgressionTier reached = ResearchHelper.getClientProgress().getTierReached();
for (AltarType type : AltarType.values()) {
if ((highestPossible == null || !type.isThisLEThan(highestPossible)) && reached.isThisLaterOrEqual(type.getAssociatedTier().getRequiredProgress())) {
highestPossible = type;
}
}
if (highestPossible != null) {
long indexSel = (ClientScheduler.getClientTick() / 30) % (highestPossible.ordinal() + 1);
AltarType typeSelected = AltarType.values()[((int) indexSel)];
ITextProperties itemName = typeSelected.getAltarItemRepresentation().getDisplayName();
ITextProperties starlightRequired = getAltarStarlightAmountDescription(itemName, altarRecipe.getStarlightRequirement(), typeSelected.getStarlightCapacity());
ITextProperties starlightRequirementDescription = new TranslationTextComponent("astralsorcery.journal.recipe.altar.starlight.desc");
toolTip.add(starlightRequirementDescription);
toolTip.add(starlightRequired);
}
}
if (altarRecipe instanceof AltarUpgradeRecipe) {
toolTip.add(new TranslationTextComponent("astralsorcery.journal.recipe.altar.upgrade"));
}
}
Aggregations