Record Class WakeReason
java.lang.Object
java.lang.Record
fr.robie.machineengine.api.machine.WakeReason
Why a machine was woken (ARCHITECTURE.md ยง17.2). Addons signal their own reasons with
external(Key); external reasons wake machines in any sleeping state except
SchedulerState.DISABLED.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final WakeReasonAn admin changed the machine or woke it up with a command.static final WakeReasonstatic final WakeReasonstatic final WakeReasonstatic final WakeReasonstatic final WakeReasonstatic final WakeReasonstatic final WakeReasonstatic final WakeReasonstatic final WakeReasonstatic final WakeReasonstatic final WakeReason -
Constructor Summary
ConstructorsConstructorDescriptionWakeReason(@NotNull net.kyori.adventure.key.Key key) Creates an instance of aWakeReasonrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static @NotNull WakeReasonexternal(@NotNull net.kyori.adventure.key.Key key) An addon-defined reason, e.g.final inthashCode()Returns a hash code value for this object.boolean@NotNull net.kyori.adventure.key.Keykey()Returns the value of thekeyrecord component.@NotNull StringtoString()Returns a string representation of this record class.
-
Field Details
-
RESOURCE_INSERTED
-
RESOURCE_EXTRACTED
-
INPUT_CHANGED
-
OUTPUT_AVAILABLE
-
NEIGHBOR_CHANGED
-
NETWORK_CHANGED
-
UPGRADE_CHANGED
-
RECIPES_RELOADED
-
CONFIG_CHANGED
-
TIMER
-
CHUNK_LOADED
-
ADMIN
An admin changed the machine or woke it up with a command.
-
-
Constructor Details
-
WakeReason
public WakeReason(@NotNull @NotNull net.kyori.adventure.key.Key key) Creates an instance of aWakeReasonrecord class.- Parameters:
key- the value for thekeyrecord component
-
-
Method Details
-
external
@NotNull public static @NotNull WakeReason external(@NotNull @NotNull net.kyori.adventure.key.Key key) An addon-defined reason, e.g.magicplugin:moon_phase. -
isExternal
public boolean isExternal() -
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). -
key
@NotNull public @NotNull net.kyori.adventure.key.Key key()Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-