Package codechicken.enderstorage.api
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 -
Constructor Summary
ConstructorsConstructorDescriptionFrequency(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 aFrequencyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static FrequencygetComponentOrEmpty(net.minecraft.world.item.ItemStack stack) net.minecraft.network.chat.Componentfinal inthashCode()Returns a hash code value for this object.booleanhasOwner()codechicken.lib.colour.EnumColourleft()Returns the value of theleftrecord component.codechicken.lib.colour.EnumColourmiddle()Returns the value of themiddlerecord component.owner()Returns the value of theownerrecord component.Optional<net.minecraft.network.chat.Component> Returns the value of theownerNamerecord component.net.minecraft.world.item.ItemStackputComponent(net.minecraft.world.item.ItemStack stack) codechicken.lib.colour.EnumColourright()Returns the value of therightrecord component.codechicken.lib.colour.EnumColour[]toArray()toString()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)
-
Field Details
-
DEFAULT
-
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 aFrequencyrecord class.- Parameters:
left- the value for theleftrecord componentmiddle- the value for themiddlerecord componentright- the value for therightrecord componentowner- the value for theownerrecord componentownerName- the value for theownerNamerecord component
-
-
Method Details
-
withLeft
-
withMiddle
-
withRight
-
withOwner
-
withoutOwner
-
hasOwner
public boolean hasOwner() -
withColours
-
toArray
public codechicken.lib.colour.EnumColour[] toArray() -
getComponentOrEmpty
-
putComponent
public net.minecraft.world.item.ItemStack putComponent(net.minecraft.world.item.ItemStack stack) -
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. -
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. -
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). -
left
public codechicken.lib.colour.EnumColour left()Returns the value of theleftrecord component.- Returns:
- the value of the
leftrecord component
-
middle
public codechicken.lib.colour.EnumColour middle()Returns the value of themiddlerecord component.- Returns:
- the value of the
middlerecord component
-
right
public codechicken.lib.colour.EnumColour right()Returns the value of therightrecord component.- Returns:
- the value of the
rightrecord component
-
owner
Returns the value of theownerrecord component.- Returns:
- the value of the
ownerrecord component
-
ownerName
Returns the value of theownerNamerecord component.- Returns:
- the value of the
ownerNamerecord component
-