Record Class ScribeAction.Start
java.lang.Object
java.lang.Record
johnsmith.enchantingoverhauled.menu.scribe.controller.ScribeAction.Start
- All Implemented Interfaces:
ScribeAction
- Enclosing interface:
ScribeAction
public static record ScribeAction.Start(net.minecraft.world.item.ItemStack source)
extends Record
implements ScribeAction
Action representing the start of a Scribe minigame.
Deducts the entry lapis and conditionally consumes the source based on Abortion Refund Policies.
-
Nested Class Summary
Nested classes/interfaces inherited from interface johnsmith.enchantingoverhauled.menu.scribe.controller.ScribeAction
ScribeAction.AcknowledgeLoss, ScribeAction.Lose, ScribeAction.Start, ScribeAction.TakeBook, ScribeAction.Win -
Constructor Summary
ConstructorsConstructorDescriptionStart(net.minecraft.world.item.ItemStack source) Creates an instance of aStartrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanexecute(net.minecraft.world.entity.player.Player player, net.minecraft.world.Container container, ScribeGridData gridData, net.minecraft.world.inventory.ContainerLevelAccess access) Executes the action, modifying the container and the player's state.final inthashCode()Returns a hash code value for this object.net.minecraft.world.item.ItemStacksource()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Start
public Start(net.minecraft.world.item.ItemStack source) Creates an instance of aStartrecord class.- Parameters:
source- the value for thesourcerecord component
-
-
Method Details
-
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. -
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). -
source
public net.minecraft.world.item.ItemStack source()Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component