Class HbmFluidRegistry

java.lang.Object
com.hbm_m.api.fluids.HbmFluidRegistry

public final class HbmFluidRegistry extends Object
Registry for fluid identifier GUI: ordered list of fluids and lookup by ResourceLocation. Fluids are in "nice order" for display (basic, oils, gases, etc.).
  • Method Details

    • getOrderedFluids

      public static List<ModFluids.FluidEntry> getOrderedFluids()
      Returns fluids in display order for GUI. Excludes NONE.
    • getFluidByIndex

      public static Optional<net.minecraft.world.level.material.Fluid> getFluidByIndex(int index)
      Returns fluid by index in ordered list, or empty.
    • getEntryByIndex

      public static Optional<ModFluids.FluidEntry> getEntryByIndex(int index)
      Returns FluidEntry by index.
    • getFluidByLocation

      public static Optional<net.minecraft.world.level.material.Fluid> getFluidByLocation(net.minecraft.resources.ResourceLocation loc)
      Resolves fluid by ResourceLocation (e.g. "hbm_m:water_source").
    • getFluidLocation

      public static net.minecraft.resources.ResourceLocation getFluidLocation(net.minecraft.world.level.material.Fluid fluid)
      Gets ResourceLocation for fluid (source form).
    • getFluidName

      public static String getFluidName(net.minecraft.world.level.material.Fluid fluid)
      Имя жидкости (без суффикса _source) для хранения в NBT. Делегирует в FluidType.getName() — единый источник правды.
    • getTintColor

      public static int getTintColor(String fluidName)
      Тинт-цвет жидкости по её внутреннему имени; единственное место хранения — ModFluids.
    • getTintColor

      public static int getTintColor(net.minecraft.world.level.material.Fluid fluid)
      Тинт-цвет жидкости. Делегирует в FluidType.getTint().
    • getIndex

      public static int getIndex(net.minecraft.world.level.material.Fluid fluid)
      Index of fluid in ordered list, or -1.
    • search

      public static List<ModFluids.FluidEntry> search(String query)
      Filter fluids by search substring (case-insensitive). Matches fluid internal name. ModFluids.NONE is prepended when the query is empty or when the internal name none matches.