Record Class ShootLocationChooser.ShootLocation
java.lang.Object
java.lang.Record
me.deecaad.weaponmechanics.weapon.shoot.ShootLocationChooser.ShootLocation
- Record Components:
left- The left arm, orEquipmentSlot.OFF_HANDright- The right arm, orEquipmentSlot.HAND
- Enclosing class:
ShootLocationChooser
public static record ShootLocationChooser.ShootLocation(me.deecaad.core.file.serializers.VectorSerializer left, me.deecaad.core.file.serializers.VectorSerializer right)
extends Record
Keeps track of the left and right shoot locations, since the position should probably be
different for each arm.
-
Constructor Summary
ConstructorsConstructorDescriptionShootLocation(me.deecaad.core.file.serializers.VectorSerializer left, me.deecaad.core.file.serializers.VectorSerializer right) Creates an instance of aShootLocationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.me.deecaad.core.file.serializers.VectorSerializerleft()Returns the value of theleftrecord component.voidoffset(boolean isRightHand, org.bukkit.Location source, org.bukkit.util.Vector direction) me.deecaad.core.file.serializers.VectorSerializerright()Returns the value of therightrecord component.static @NotNull ShootLocationChooser.ShootLocationserialize(@NotNull me.deecaad.core.file.SerializeData data) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ShootLocation
public ShootLocation(me.deecaad.core.file.serializers.VectorSerializer left, me.deecaad.core.file.serializers.VectorSerializer right) Creates an instance of aShootLocationrecord class.
-
-
Method Details
-
offset
public void offset(boolean isRightHand, org.bukkit.Location source, org.bukkit.util.Vector direction) -
serialize
@NotNull public static @NotNull ShootLocationChooser.ShootLocation serialize(@NotNull @NotNull me.deecaad.core.file.SerializeData data) throws me.deecaad.core.file.SerializerException - Throws:
me.deecaad.core.file.SerializerException
-
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). -
left
public me.deecaad.core.file.serializers.VectorSerializer left()Returns the value of theleftrecord component.- Returns:
- the value of the
leftrecord component
-
right
public me.deecaad.core.file.serializers.VectorSerializer right()Returns the value of therightrecord component.- Returns:
- the value of the
rightrecord component
-