Record Class Frequency

java.lang.Object
java.lang.Record
codechicken.enderstorage.api.Frequency

public record Frequency(codechicken.lib.colour.EnumColour left, codechicken.lib.colour.EnumColour middle, codechicken.lib.colour.EnumColour right, Optional<UUID> owner, Optional<net.minecraft.network.chat.Component> ownerName) extends Record
Created by covers1624 on 4/26/2016.
  • Field Summary

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

    Constructors
    Constructor
    Description
    Frequency(codechicken.lib.colour.EnumColour left, codechicken.lib.colour.EnumColour middle, codechicken.lib.colour.EnumColour right)
     
    Frequency(codechicken.lib.colour.EnumColour left, codechicken.lib.colour.EnumColour middle, codechicken.lib.colour.EnumColour right, Optional<UUID> owner, Optional<net.minecraft.network.chat.Component> ownerName)
    Creates an instance of a Frequency record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    static Frequency
    getComponentOrEmpty(net.minecraft.world.item.ItemStack stack)
     
    net.minecraft.network.chat.Component
     
    final int
    Returns a hash code value for this object.
    boolean
     
    codechicken.lib.colour.EnumColour
    Returns the value of the left record component.
    codechicken.lib.colour.EnumColour
    Returns the value of the middle record component.
    Returns the value of the owner record component.
    Optional<net.minecraft.network.chat.Component>
    Returns the value of the ownerName record component.
    net.minecraft.world.item.ItemStack
    putComponent(net.minecraft.world.item.ItemStack stack)
     
    codechicken.lib.colour.EnumColour
    Returns the value of the right record component.
    codechicken.lib.colour.EnumColour[]
     
    Returns a string representation of this record class.
    withColours(@Nullable codechicken.lib.colour.EnumColour[] colours)
     
    withLeft(@Nullable codechicken.lib.colour.EnumColour left)
     
    withMiddle(@Nullable codechicken.lib.colour.EnumColour middle)
     
     
    withOwner(net.minecraft.world.entity.player.Player player)
     
    withRight(@Nullable codechicken.lib.colour.EnumColour right)
     

    Methods inherited from class java.lang.Object

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

    • DEFAULT

      public static final Frequency DEFAULT
    • CODEC

      public static final com.mojang.serialization.Codec<Frequency> CODEC
    • STREAM_CODEC

      public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,Frequency> STREAM_CODEC
  • Constructor Details

    • Frequency

      public Frequency(codechicken.lib.colour.EnumColour left, codechicken.lib.colour.EnumColour middle, codechicken.lib.colour.EnumColour right)
    • Frequency

      public Frequency(codechicken.lib.colour.EnumColour left, codechicken.lib.colour.EnumColour middle, codechicken.lib.colour.EnumColour right, Optional<UUID> owner, Optional<net.minecraft.network.chat.Component> ownerName)
      Creates an instance of a Frequency record class.
      Parameters:
      left - the value for the left record component
      middle - the value for the middle record component
      right - the value for the right record component
      owner - the value for the owner record component
      ownerName - the value for the ownerName record component
  • Method Details

    • withLeft

      public Frequency withLeft(@Nullable @Nullable codechicken.lib.colour.EnumColour left)
    • withMiddle

      public Frequency withMiddle(@Nullable @Nullable codechicken.lib.colour.EnumColour middle)
    • withRight

      public Frequency withRight(@Nullable @Nullable codechicken.lib.colour.EnumColour right)
    • withOwner

      public Frequency withOwner(net.minecraft.world.entity.player.Player player)
    • withoutOwner

      public Frequency withoutOwner()
    • hasOwner

      public boolean hasOwner()
    • withColours

      public Frequency withColours(@Nullable @Nullable codechicken.lib.colour.EnumColour[] colours)
    • toArray

      public codechicken.lib.colour.EnumColour[] toArray()
    • getComponentOrEmpty

      public static Frequency getComponentOrEmpty(net.minecraft.world.item.ItemStack stack)
    • putComponent

      public net.minecraft.world.item.ItemStack putComponent(net.minecraft.world.item.ItemStack stack)
    • toString

      public 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
    • getTooltip

      public net.minecraft.network.chat.Component getTooltip()
    • 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
    • equals

      public final boolean equals(Object o)
      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:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • left

      public codechicken.lib.colour.EnumColour left()
      Returns the value of the left record component.
      Returns:
      the value of the left record component
    • middle

      public codechicken.lib.colour.EnumColour middle()
      Returns the value of the middle record component.
      Returns:
      the value of the middle record component
    • right

      public codechicken.lib.colour.EnumColour right()
      Returns the value of the right record component.
      Returns:
      the value of the right record component
    • owner

      public Optional<UUID> owner()
      Returns the value of the owner record component.
      Returns:
      the value of the owner record component
    • ownerName

      public Optional<net.minecraft.network.chat.Component> ownerName()
      Returns the value of the ownerName record component.
      Returns:
      the value of the ownerName record component