Record Class ConfigurationCardState
java.lang.Object
java.lang.Record
com.refinedmods.refinedstorage.common.configurationcard.ConfigurationCardState
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<ConfigurationCardState> static final net.minecraft.network.codec.StreamCodec
<net.minecraft.network.RegistryFriendlyByteBuf, ConfigurationCardState> -
Constructor Summary
ConstructorDescriptionConfigurationCardState
(net.minecraft.world.level.block.entity.BlockEntityType<?> blockEntityType, net.minecraft.nbt.CompoundTag config, List<net.minecraft.world.item.ItemStack> upgrades) Creates an instance of aConfigurationCardState
record class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.block.entity.BlockEntityType
<?> Returns the value of theblockEntityType
record component.net.minecraft.nbt.CompoundTag
config()
Returns the value of theconfig
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.final String
toString()
Returns a string representation of this record class.List
<net.minecraft.world.item.ItemStack> upgrades()
Returns the value of theupgrades
record component.
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,ConfigurationCardState> STREAM_CODEC
-
-
Constructor Details
-
ConfigurationCardState
public ConfigurationCardState(net.minecraft.world.level.block.entity.BlockEntityType<?> blockEntityType, net.minecraft.nbt.CompoundTag config, List<net.minecraft.world.item.ItemStack> upgrades) Creates an instance of aConfigurationCardState
record class.- Parameters:
blockEntityType
- the value for theblockEntityType
record componentconfig
- the value for theconfig
record componentupgrades
- the value for theupgrades
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
blockEntityType
public net.minecraft.world.level.block.entity.BlockEntityType<?> blockEntityType()Returns the value of theblockEntityType
record component.- Returns:
- the value of the
blockEntityType
record component
-
config
public net.minecraft.nbt.CompoundTag config()Returns the value of theconfig
record component.- Returns:
- the value of the
config
record component
-
upgrades
Returns the value of theupgrades
record component.- Returns:
- the value of the
upgrades
record component
-