Class FluidTooltipContext
java.lang.Object
alexiil.mc.lib.attributes.fluid.volume.FluidTooltipContext
Stores various options for creating tooltips for fluids. This is meant to wrap a 
TooltipContext, but has a
 lot more options specific to fluids and isn't limited to the client side only.- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic FluidTooltipContextThe default context, that lets the user decide how they want to see tooltips.
- 
Method SummaryModifier and TypeMethodDescriptionforceAdvanced(boolean enable)forceDisableEmphasisColours(boolean disable)forceDisableFluidColours(boolean disable)forceJoinedName(boolean enable)forceShortDesc(boolean enable)forceSymbols(boolean enable)forceTicks(boolean enable)static FluidTooltipContextfromMinecraft(net.minecraft.client.item.TooltipContext ctx)intbooleanbooleanbooleanbooleanbooleanbooleanbooleannet.minecraft.text.TextstripFluidColours(net.minecraft.text.Text fluidName)Strips any colours from the given name ifshouldStripFluidColours()is true, otherwise returns the fluid name as-is.
- 
Field Details- 
USE_CONFIGThe default context, that lets the user decide how they want to see tooltips.
 
- 
- 
Method Details- 
fromMinecraft
- 
isAdvancedpublic boolean isAdvanced()- Returns:
- True to add advanced details, or false otherwise. Note that this returns
         GameOptions#advancedItemTooltipsby default.
 
- 
shouldUseSymbolspublic boolean shouldUseSymbols()
- 
shouldUseTickspublic boolean shouldUseTicks()
- 
getTimeGappublic int getTimeGap()- Returns:
- The number of ticks between each unit of time. (so 1 for ticks, and 20 for seconds).
 
- 
shouldUseShortDescriptionpublic boolean shouldUseShortDescription()
- 
shouldStripFluidColourspublic boolean shouldStripFluidColours()
- 
shouldDisableEmphasisColourspublic boolean shouldDisableEmphasisColours()
- 
shouldJoinNameWithAmountpublic boolean shouldJoinNameWithAmount()
- 
usingMcAdvanced- Returns:
- A FluidTooltipContextwhich usesMinecraftClient.options.advancedItemTooltipsforisAdvanced().
 
- 
forceAdvanced- Returns:
- A FluidTooltipContextwhich uses the given value forisAdvanced().
 
- 
usingConfigForSymbols- Returns:
- A FluidTooltipContextwhich uses the LBA fluids config file forshouldUseSymbols().
 
- 
forceSymbols
- 
usingConfigForTicks- Returns:
- A FluidTooltipContextwhich uses the LBA fluids config file forshouldUseTicks().
 
- 
forceTicks
- 
usingConfigForShortDesc- Returns:
- A FluidTooltipContextwhich uses the LBA fluids config file forshouldUseTicks().
 
- 
forceShortDesc
- 
usingConfigForFluidColours- Returns:
- A FluidTooltipContextwhich uses the LBA fluids config file forshouldStripFluidColours().
 
- 
forceDisableFluidColours
- 
usingConfigForEmphasisColours- Returns:
- A FluidTooltipContextwhich uses the LBA fluids config file forshouldDisableEmphasisColours().
 
- 
forceDisableEmphasisColours
- 
usingConfigForJoinedName- Returns:
- A FluidTooltipContextwhich uses the LBA fluids config file forshouldJoinNameWithAmount().
 
- 
forceJoinedName
- 
stripFluidColourspublic net.minecraft.text.Text stripFluidColours(net.minecraft.text.Text fluidName)Strips any colours from the given name ifshouldStripFluidColours()is true, otherwise returns the fluid name as-is.
 
-