Record Class GridData
java.lang.Object
java.lang.Record
com.refinedmods.refinedstorage.common.grid.GridData
public record GridData(boolean active, List<GridData.GridResource> resources, Set<PlatformResourceKey> autocraftableResources)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, GridData> -
Constructor Summary
ConstructorsConstructorDescriptionGridData(boolean active, List<GridData.GridResource> resources, Set<PlatformResourceKey> autocraftableResources) Creates an instance of aGridDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanactive()Returns the value of theactiverecord component.Returns the value of theautocraftableResourcesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static GridDataReturns the value of theresourcesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,GridData> STREAM_CODEC
-
-
Constructor Details
-
GridData
public GridData(boolean active, List<GridData.GridResource> resources, Set<PlatformResourceKey> autocraftableResources) Creates an instance of aGridDatarecord class.- Parameters:
active- the value for theactiverecord componentresources- the value for theresourcesrecord componentautocraftableResources- the value for theautocraftableResourcesrecord component
-
-
Method Details
-
of
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
active
public boolean active()Returns the value of theactiverecord component.- Returns:
- the value of the
activerecord component
-
resources
Returns the value of theresourcesrecord component.- Returns:
- the value of the
resourcesrecord component
-
autocraftableResources
Returns the value of theautocraftableResourcesrecord component.- Returns:
- the value of the
autocraftableResourcesrecord component
-