Record Class CustomClickEvent
java.lang.Object
java.lang.Record
com.jeff.pets.client.autoupdate.impl.CustomClickEvent
- All Implemented Interfaces:
net.minecraft.network.chat.ClickEvent
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.network.chat.ClickEvent
net.minecraft.network.chat.ClickEvent.Action, net.minecraft.network.chat.ClickEvent.ChangePage, net.minecraft.network.chat.ClickEvent.CopyToClipboard, net.minecraft.network.chat.ClickEvent.Custom, net.minecraft.network.chat.ClickEvent.OpenFile, net.minecraft.network.chat.ClickEvent.OpenUrl, net.minecraft.network.chat.ClickEvent.RunCommand, net.minecraft.network.chat.ClickEvent.ShowDialog, net.minecraft.network.chat.ClickEvent.SuggestCommand -
Field Summary
Fields inherited from interface net.minecraft.network.chat.ClickEvent
CODEC -
Constructor Summary
ConstructorsConstructorDescriptionCustomClickEvent(Runnable runnable) Creates an instance of aCustomClickEventrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull net.minecraft.network.chat.ClickEvent.Actionaction()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.voidrun()runnable()Returns the value of therunnablerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CustomClickEvent
Creates an instance of aCustomClickEventrecord class.- Parameters:
runnable- the value for therunnablerecord component
-
-
Method Details
-
action
@NotNull public @NotNull net.minecraft.network.chat.ClickEvent.Action action()- Specified by:
actionin interfacenet.minecraft.network.chat.ClickEvent
-
run
public void run() -
toString
-
hashCode
-
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). -
runnable
Returns the value of therunnablerecord component.- Returns:
- the value of the
runnablerecord component
-