Record Class ItemCommandManager.ItemCommand
java.lang.Object
java.lang.Record
de.luckymcdev.foundryengine.client.command.ItemCommandManager.ItemCommand
- Enclosing class:
ItemCommandManager
-
Constructor Summary
ConstructorsConstructorDescriptionItemCommand(net.minecraft.world.item.ItemStack stack, String command) Creates an instance of aItemCommandrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncommand()Returns the value of thecommandrecord component.final booleanIndicates whether some other object is "equal to" this one.voidexecute(net.minecraft.client.player.LocalPlayer player) final inthashCode()Returns a hash code value for this object.booleanmatches(net.minecraft.world.item.ItemStack other) net.minecraft.world.item.ItemStackstack()Returns the value of thestackrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ItemCommand
Creates an instance of aItemCommandrecord class.- Parameters:
stack- the value for thestackrecord componentcommand- the value for thecommandrecord component
-
-
Method Details
-
execute
public void execute(net.minecraft.client.player.LocalPlayer player) -
matches
public boolean matches(net.minecraft.world.item.ItemStack other) -
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). -
stack
public net.minecraft.world.item.ItemStack stack()Returns the value of thestackrecord component.- Returns:
- the value of the
stackrecord component
-
command
Returns the value of thecommandrecord component.- Returns:
- the value of the
commandrecord component
-