Package com.hbm_m.api.fluids
Class HbmFluidRegistry
java.lang.Object
com.hbm_m.api.fluids.HbmFluidRegistry
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 Summary
Modifier and TypeMethodDescriptionstatic Optional<ModFluids.FluidEntry>getEntryByIndex(int index) Returns FluidEntry by index.static Optional<net.minecraft.world.level.material.Fluid>getFluidByIndex(int index) Returns fluid by index in ordered list, or empty.static Optional<net.minecraft.world.level.material.Fluid>getFluidByLocation(net.minecraft.resources.ResourceLocation loc) Resolves fluid by ResourceLocation (e.g.static net.minecraft.resources.ResourceLocationgetFluidLocation(net.minecraft.world.level.material.Fluid fluid) Gets ResourceLocation for fluid (source form).static StringgetFluidName(net.minecraft.world.level.material.Fluid fluid) Имя жидкости (без суффикса_source) для хранения в NBT.static intgetIndex(net.minecraft.world.level.material.Fluid fluid) Index of fluid in ordered list, or -1.static List<ModFluids.FluidEntry>Returns fluids in display order for GUI.static intgetTintColor(String fluidName) Тинт-цвет жидкости по её внутреннему имени; единственное место хранения —ModFluids.static intgetTintColor(net.minecraft.world.level.material.Fluid fluid) Тинт-цвет жидкости.static List<ModFluids.FluidEntry>Filter fluids by search substring (case-insensitive).
-
Method Details
-
getOrderedFluids
Returns fluids in display order for GUI. Excludes NONE. -
getFluidByIndex
Returns fluid by index in ordered list, or empty. -
getEntryByIndex
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
Имя жидкости (без суффикса_source) для хранения в NBT. Делегирует вFluidType.getName()— единый источник правды. -
getTintColor
Тинт-цвет жидкости по её внутреннему имени; единственное место хранения —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
Filter fluids by search substring (case-insensitive). Matches fluid internal name.ModFluids.NONEis prepended when the query is empty or when the internal namenonematches.
-