Record Class DynamicFluidContainerModel.Unbaked
java.lang.Object
java.lang.Record
net.neoforged.neoforge.client.model.item.DynamicFluidContainerModel.Unbaked
- Record Components:
forceOpaqueFluid- Whether the fluid should always be rendered opaque regardless of its actual translucency. Disabling this may cause issues with translucent fluids on top of a base texture stitched to the item atlas
- All Implemented Interfaces:
ItemModel.Unbaked, ResolvableModel
- Enclosing class:
DynamicFluidContainerModel
public static record DynamicFluidContainerModel.Unbaked(DynamicFluidContainerModel.Textures textures, Fluid fluid, boolean flipGas, boolean coverIsMask, boolean applyFluidLuminosity, boolean forceOpaqueFluid)
extends Record
implements ItemModel.Unbaked
-
Nested Class Summary
Nested classes/interfaces inherited from interface ResolvableModel
ResolvableModel.Resolver -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for theapplyFluidLuminosityrecord component.private final booleanThe field for thecoverIsMaskrecord component.private final booleanThe field for theflipGasrecord component.private final FluidThe field for thefluidrecord component.private final booleanThe field for theforceOpaqueFluidrecord component.static final com.mojang.serialization.MapCodec<DynamicFluidContainerModel.Unbaked> private final DynamicFluidContainerModel.TexturesThe field for thetexturesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionUnbaked(DynamicFluidContainerModel.Textures textures, Fluid fluid, boolean flipGas, boolean coverIsMask, boolean applyFluidLuminosity) Unbaked(DynamicFluidContainerModel.Textures textures, Fluid fluid, boolean flipGas, boolean coverIsMask, boolean applyFluidLuminosity, boolean forceOpaqueFluid) Creates an instance of aUnbakedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theapplyFluidLuminosityrecord component.bake(ItemModel.BakingContext bakingContext, Matrix4fc transformation) booleanReturns the value of thecoverIsMaskrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanflipGas()Returns the value of theflipGasrecord component.fluid()Returns the value of thefluidrecord component.booleanReturns the value of theforceOpaqueFluidrecord component.final inthashCode()Returns a hash code value for this object.voidresolveDependencies(ResolvableModel.Resolver resolver) textures()Returns the value of thetexturesrecord component.final StringtoString()Returns a string representation of this record class.com.mojang.serialization.MapCodec<? extends ItemModel.Unbaked> type()
-
Field Details
-
textures
The field for thetexturesrecord component. -
fluid
The field for thefluidrecord component. -
flipGas
private final boolean flipGasThe field for theflipGasrecord component. -
coverIsMask
private final boolean coverIsMaskThe field for thecoverIsMaskrecord component. -
applyFluidLuminosity
private final boolean applyFluidLuminosityThe field for theapplyFluidLuminosityrecord component. -
forceOpaqueFluid
private final boolean forceOpaqueFluidThe field for theforceOpaqueFluidrecord component. -
MAP_CODEC
-
-
Constructor Details
-
Unbaked
public Unbaked(DynamicFluidContainerModel.Textures textures, Fluid fluid, boolean flipGas, boolean coverIsMask, boolean applyFluidLuminosity) -
Unbaked
public Unbaked(DynamicFluidContainerModel.Textures textures, Fluid fluid, boolean flipGas, boolean coverIsMask, boolean applyFluidLuminosity, boolean forceOpaqueFluid) Creates an instance of aUnbakedrecord class.- Parameters:
textures- the value for thetexturesrecord componentfluid- the value for thefluidrecord componentflipGas- the value for theflipGasrecord componentcoverIsMask- the value for thecoverIsMaskrecord componentapplyFluidLuminosity- the value for theapplyFluidLuminosityrecord componentforceOpaqueFluid- the value for theforceOpaqueFluidrecord component
-
-
Method Details
-
type
- Specified by:
typein interfaceItemModel.Unbaked
-
bake
- Specified by:
bakein interfaceItemModel.Unbaked
-
resolveDependencies
- Specified by:
resolveDependenciesin interfaceResolvableModel
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
textures
Returns the value of thetexturesrecord component.- Returns:
- the value of the
texturesrecord component
-
fluid
Returns the value of thefluidrecord component.- Returns:
- the value of the
fluidrecord component
-
flipGas
public boolean flipGas()Returns the value of theflipGasrecord component.- Returns:
- the value of the
flipGasrecord component
-
coverIsMask
public boolean coverIsMask()Returns the value of thecoverIsMaskrecord component.- Returns:
- the value of the
coverIsMaskrecord component
-
applyFluidLuminosity
public boolean applyFluidLuminosity()Returns the value of theapplyFluidLuminosityrecord component.- Returns:
- the value of the
applyFluidLuminosityrecord component
-
forceOpaqueFluid
public boolean forceOpaqueFluid()Returns the value of theforceOpaqueFluidrecord component.- Returns:
- the value of the
forceOpaqueFluidrecord component
-