Record Class StorageBlockData
java.lang.Object
java.lang.Record
com.refinedmods.refinedstorage.common.storage.storageblock.StorageBlockData
public record StorageBlockData(long stored, long capacity, ResourceContainerData resourceContainerData)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec
<net.minecraft.network.RegistryFriendlyByteBuf, StorageBlockData> -
Constructor Summary
ConstructorDescriptionStorageBlockData
(long stored, long capacity, ResourceContainerData resourceContainerData) Creates an instance of aStorageBlockData
record class. -
Method Summary
Modifier and TypeMethodDescriptionlong
capacity()
Returns the value of thecapacity
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theresourceContainerData
record component.long
stored()
Returns the value of thestored
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,StorageBlockData> STREAM_CODEC
-
-
Constructor Details
-
StorageBlockData
Creates an instance of aStorageBlockData
record class.- Parameters:
stored
- the value for thestored
record componentcapacity
- the value for thecapacity
record componentresourceContainerData
- the value for theresourceContainerData
record component
-
-
Method Details
-
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 '=='. -
stored
public long stored()Returns the value of thestored
record component.- Returns:
- the value of the
stored
record component
-
capacity
public long capacity()Returns the value of thecapacity
record component.- Returns:
- the value of the
capacity
record component
-
resourceContainerData
Returns the value of theresourceContainerData
record component.- Returns:
- the value of the
resourceContainerData
record component
-