Class OrechidUIHelper
java.lang.Object
vazkii.botania.client.integration.shared.OrechidUIHelper
Shared helper methods for the various recipe display mod plugins.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull Stream<net.minecraft.network.chat.Component> getBiomeChanceAndRatioTooltipComponents(double chance, OrechidRecipe recipe) static @NotNull net.minecraft.network.chat.ComponentgetBiomeChanceTooltipComponent(double chance, @NotNull String biomeTranslationKey) static <T extends OrechidRecipe>
@Nullable DoublegetChance(T recipe, @Nullable net.minecraft.core.BlockPos pos) static @NotNull net.minecraft.network.chat.ComponentgetPercentageComponent(double chance) static @Nullable Stringstatic @NotNull it.unimi.dsi.fastutil.ints.IntIntPairgetRatioForChance(double actualRatio) Determines a "visually pleasing" ratio to be expected between input and output that is not too far off the precise ratio.static @NotNull net.minecraft.network.chat.ComponentgetRatioTooltipComponent(@NotNull it.unimi.dsi.fastutil.ints.IntIntPair ratio)
-
Constructor Details
-
OrechidUIHelper
public OrechidUIHelper()
-
-
Method Details
-
getPercentageComponent
@NotNull public static @NotNull net.minecraft.network.chat.Component getPercentageComponent(double chance) -
getRatioTooltipComponent
@NotNull public static @NotNull net.minecraft.network.chat.Component getRatioTooltipComponent(@NotNull @NotNull it.unimi.dsi.fastutil.ints.IntIntPair ratio) -
getBiomeChanceTooltipComponent
@NotNull public static @NotNull net.minecraft.network.chat.Component getBiomeChanceTooltipComponent(double chance, @NotNull @NotNull String biomeTranslationKey) -
getBiomeChanceAndRatioTooltipComponents
@NotNull public static @NotNull Stream<net.minecraft.network.chat.Component> getBiomeChanceAndRatioTooltipComponents(double chance, OrechidRecipe recipe) -
getChance
@Nullable public static <T extends OrechidRecipe> @Nullable Double getChance(T recipe, @Nullable @Nullable net.minecraft.core.BlockPos pos) -
getRatioForChance
@NotNull public static @NotNull it.unimi.dsi.fastutil.ints.IntIntPair getRatioForChance(double actualRatio) Determines a "visually pleasing" ratio to be expected between input and output that is not too far off the precise ratio.- Parameters:
actualRatio- The actual ratio.- Returns:
- A pair of ints, first int being the number of input blocks, and second int being the expected number of output blocks.
-
getPlayerBiomeTranslationKey
-