Class FluidContentsTint
java.lang.Object
net.neoforged.neoforge.client.color.item.FluidContentsTint
- All Implemented Interfaces:
ItemTintSource
Returns the tint color of the fluid contained in the item stack.
Notably, this is used internally by
DynamicFluidContainerModel.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FluidContentsTintstatic final com.mojang.serialization.MapCodec<FluidContentsTint> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcalculate(ItemStack stack, @Nullable ClientLevel level, @Nullable LivingEntity entity) com.mojang.serialization.MapCodec<? extends ItemTintSource> type()
-
Field Details
-
INSTANCE
-
MAP_CODEC
-
-
Constructor Details
-
FluidContentsTint
private FluidContentsTint()
-
-
Method Details
-
calculate
public int calculate(ItemStack stack, @Nullable @Nullable ClientLevel level, @Nullable @Nullable LivingEntity entity) - Specified by:
calculatein interfaceItemTintSource
-
type
- Specified by:
typein interfaceItemTintSource
-