Record Class SandPaperItemComponent

java.lang.Object
java.lang.Record
com.simibubi.create.content.equipment.sandPaper.SandPaperItemComponent

public record SandPaperItemComponent(net.minecraft.world.item.ItemStack item) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<SandPaperItemComponent>
     
    static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,SandPaperItemComponent>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    SandPaperItemComponent(net.minecraft.world.item.ItemStack item)
    Creates an instance of a SandPaperItemComponent record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    equals(Object arg0)
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    net.minecraft.world.item.ItemStack
    Returns the value of the item record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<SandPaperItemComponent> 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 a SandPaperItemComponent record class.
      Parameters:
      item - the value for the item record component
  • Method Details

    • equals

      public final boolean equals(Object arg0)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      arg0 - the object with which to compare
      Returns:
      true if this object is the same as the arg0 argument; false otherwise.
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • item

      public net.minecraft.world.item.ItemStack item()
      Returns the value of the item record component.
      Returns:
      the value of the item record component