Class OrechidUIHelper

java.lang.Object
vazkii.botania.client.integration.shared.OrechidUIHelper

public class OrechidUIHelper extends Object
Shared helper methods for the various recipe display mod plugins.
  • 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

      @Nullable public static @Nullable String getPlayerBiomeTranslationKey()