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 aFluidResourcerecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.core.component.DataComponentPatchReturns the value of thecomponentsrecord component.final booleanIndicates whether some other object is "equal to" this one.net.minecraft.world.level.material.Fluidfluid()Returns the value of thefluidrecord component.longlonggetTags()final inthashCode()Returns a hash code value for this object.final StringtoString()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 aFluidResourcerecord class.- Parameters:
fluid- the value for thefluidrecord componentcomponents- the value for thecomponentsrecord component
-
-
Method Details
-
normalize
- Specified by:
normalizein interfaceFuzzyModeNormalizer
-
getInterfaceExportLimit
public long getInterfaceExportLimit()- Specified by:
getInterfaceExportLimitin interfacePlatformResourceKey
-
getProcessingPatternLimit
public long getProcessingPatternLimit()- Specified by:
getProcessingPatternLimitin interfacePlatformResourceKey
-
getTags
- Specified by:
getTagsin interfacePlatformResourceKey
-
getResourceType
- Specified by:
getResourceTypein 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 thefluidrecord component.- Returns:
- the value of the
fluidrecord component
-
components
public net.minecraft.core.component.DataComponentPatch components()Returns the value of thecomponentsrecord component.- Returns:
- the value of the
componentsrecord component
-