Record Class ConfigurationCardState
java.lang.Object
java.lang.Record
com.refinedmods.refinedstorage.common.configurationcard.ConfigurationCardState
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ConfigurationCardState> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ConfigurationCardState> -
Constructor Summary
ConstructorsConstructorDescriptionConfigurationCardState(net.minecraft.world.level.block.entity.BlockEntityType<?> blockEntityType, net.minecraft.nbt.CompoundTag config, List<net.minecraft.world.item.ItemStack> upgrades) Creates an instance of aConfigurationCardStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.block.entity.BlockEntityType<?> Returns the value of theblockEntityTyperecord component.net.minecraft.nbt.CompoundTagconfig()Returns the value of theconfigrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.List<net.minecraft.world.item.ItemStack> upgrades()Returns the value of theupgradesrecord 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 aConfigurationCardStaterecord class.- Parameters:
blockEntityType- the value for theblockEntityTyperecord componentconfig- the value for theconfigrecord componentupgrades- the value for theupgradesrecord 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 theblockEntityTyperecord component.- Returns:
- the value of the
blockEntityTyperecord component
-
config
public net.minecraft.nbt.CompoundTag config()Returns the value of theconfigrecord component.- Returns:
- the value of the
configrecord component
-
upgrades
Returns the value of theupgradesrecord component.- Returns:
- the value of the
upgradesrecord component
-