Record Class SandPaperItemComponent
java.lang.Object
java.lang.Record
com.simibubi.create.content.equipment.sandPaper.SandPaperItemComponent
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SandPaperItemComponent> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, SandPaperItemComponent> -
Constructor Summary
ConstructorsConstructorDescriptionSandPaperItemComponent(net.minecraft.world.item.ItemStack item) Creates an instance of aSandPaperItemComponentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.world.item.ItemStackitem()Returns the value of theitemrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,SandPaperItemComponent> STREAM_CODEC
-
-
Constructor Details
-
SandPaperItemComponent
public SandPaperItemComponent(net.minecraft.world.item.ItemStack item) Creates an instance of aSandPaperItemComponentrecord class.- Parameters:
item- the value for theitemrecord component
-
-
Method Details
-
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). -
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. -
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. -
item
public net.minecraft.world.item.ItemStack item()Returns the value of theitemrecord component.- Returns:
- the value of the
itemrecord component
-