Record Class FluidModel
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.block.FluidModel
public record FluidModel(ChunkSectionLayer layer, Material.Baked stillMaterial, Material.Baked flowingMaterial, @Nullable Material.Baked overlayMaterial, @Nullable FluidTintSource fluidTintSource, @Nullable CustomFluidRenderer customRenderer)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @Nullable CustomFluidRendererThe field for thecustomRendererrecord component.private final Material.BakedThe field for theflowingMaterialrecord component.private final @Nullable FluidTintSourceThe field for thefluidTintSourcerecord component.private final ChunkSectionLayerThe field for thelayerrecord component.private final @Nullable Material.BakedThe field for theoverlayMaterialrecord component.private final Material.BakedThe field for thestillMaterialrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionFluidModel(ChunkSectionLayer layer, Material.Baked stillMaterial, Material.Baked flowingMaterial, @Nullable Material.Baked overlayMaterial, @Nullable BlockTintSource tintSource) Deprecated.FluidModel(ChunkSectionLayer layer, Material.Baked stillMaterial, Material.Baked flowingMaterial, @Nullable Material.Baked overlayMaterial, @Nullable FluidTintSource fluidTintSource) FluidModel(ChunkSectionLayer layer, Material.Baked stillMaterial, Material.Baked flowingMaterial, @Nullable Material.Baked overlayMaterial, @Nullable FluidTintSource fluidTintSource, @Nullable CustomFluidRenderer customRenderer) Creates an instance of aFluidModelrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable CustomFluidRendererReturns the value of thecustomRendererrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theflowingMaterialrecord component.@Nullable FluidTintSourceReturns the value of thefluidTintSourcerecord component.final inthashCode()Returns a hash code value for this object.layer()Returns the value of thelayerrecord component.@Nullable Material.BakedReturns the value of theoverlayMaterialrecord component.Returns the value of thestillMaterialrecord component.@Nullable BlockTintSourceDeprecated.Neo: usefluidTintSource()insteadfinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
layer
The field for thelayerrecord component. -
stillMaterial
The field for thestillMaterialrecord component. -
flowingMaterial
The field for theflowingMaterialrecord component. -
overlayMaterial
The field for theoverlayMaterialrecord component. -
fluidTintSource
The field for thefluidTintSourcerecord component. -
customRenderer
The field for thecustomRendererrecord component.
-
-
Constructor Details
-
FluidModel
public FluidModel(ChunkSectionLayer layer, Material.Baked stillMaterial, Material.Baked flowingMaterial, @Nullable Material.Baked overlayMaterial, @Nullable FluidTintSource fluidTintSource) -
FluidModel
@Deprecated public FluidModel(ChunkSectionLayer layer, Material.Baked stillMaterial, Material.Baked flowingMaterial, @Nullable Material.Baked overlayMaterial, @Nullable BlockTintSource tintSource) -
FluidModel
public FluidModel(ChunkSectionLayer layer, Material.Baked stillMaterial, Material.Baked flowingMaterial, @Nullable Material.Baked overlayMaterial, @Nullable FluidTintSource fluidTintSource, @Nullable CustomFluidRenderer customRenderer) Creates an instance of aFluidModelrecord class.- Parameters:
layer- the value for thelayerrecord componentstillMaterial- the value for thestillMaterialrecord componentflowingMaterial- the value for theflowingMaterialrecord componentoverlayMaterial- the value for theoverlayMaterialrecord componentfluidTintSource- the value for thefluidTintSourcerecord componentcustomRenderer- the value for thecustomRendererrecord component
-
-
Method Details
-
tintSource
Deprecated.Neo: usefluidTintSource()instead -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
layer
Returns the value of thelayerrecord component.- Returns:
- the value of the
layerrecord component
-
stillMaterial
Returns the value of thestillMaterialrecord component.- Returns:
- the value of the
stillMaterialrecord component
-
flowingMaterial
Returns the value of theflowingMaterialrecord component.- Returns:
- the value of the
flowingMaterialrecord component
-
overlayMaterial
Returns the value of theoverlayMaterialrecord component.- Returns:
- the value of the
overlayMaterialrecord component
-
fluidTintSource
Returns the value of thefluidTintSourcerecord component.- Returns:
- the value of the
fluidTintSourcerecord component
-
customRenderer
Returns the value of thecustomRendererrecord component.- Returns:
- the value of the
customRendererrecord component
-
FluidModel(ChunkSectionLayer, Material.Baked, Material.Baked, Material.Baked, net.neoforged.neoforge.client.fluid.FluidTintSource)instead