Record Class FluidResource
java.lang.Object
java.lang.Record
com.refinedmods.refinedstorage.common.support.resource.FluidResource
- All Implemented Interfaces:
ResourceKey
,FuzzyModeNormalizer
,PlatformResourceKey
@API(status=INTERNAL)
public record FluidResource(net.minecraft.world.level.material.Fluid fluid, net.minecraft.core.component.DataComponentPatch components)
extends Record
implements PlatformResourceKey, FuzzyModeNormalizer
-
Constructor Summary
ConstructorsConstructorDescriptionFluidResource
(net.minecraft.world.level.material.Fluid fluid) FluidResource
(net.minecraft.world.level.material.Fluid fluid, net.minecraft.core.component.DataComponentPatch components) Creates an instance of aFluidResource
record class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.core.component.DataComponentPatch
Returns the value of thecomponents
record component.final boolean
Indicates whether some other object is "equal to" this one.net.minecraft.world.level.material.Fluid
fluid()
Returns the value of thefluid
record component.long
long
getTags()
final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
FluidResource
public FluidResource(net.minecraft.world.level.material.Fluid fluid) -
FluidResource
public FluidResource(net.minecraft.world.level.material.Fluid fluid, net.minecraft.core.component.DataComponentPatch components) Creates an instance of aFluidResource
record class.- Parameters:
fluid
- the value for thefluid
record componentcomponents
- the value for thecomponents
record component
-
-
Method Details
-
normalize
- Specified by:
normalize
in interfaceFuzzyModeNormalizer
-
getInterfaceExportLimit
public long getInterfaceExportLimit()- Specified by:
getInterfaceExportLimit
in interfacePlatformResourceKey
-
getProcessingPatternLimit
public long getProcessingPatternLimit()- Specified by:
getProcessingPatternLimit
in interfacePlatformResourceKey
-
getTags
- Specified by:
getTags
in interfacePlatformResourceKey
-
getResourceType
- Specified by:
getResourceType
in interfacePlatformResourceKey
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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)
. -
fluid
public net.minecraft.world.level.material.Fluid fluid()Returns the value of thefluid
record component.- Returns:
- the value of the
fluid
record component
-
components
public net.minecraft.core.component.DataComponentPatch components()Returns the value of thecomponents
record component.- Returns:
- the value of the
components
record component
-