Record Class PiercingWeapon
java.lang.Object
java.lang.Record
org.geysermc.mcprotocollib.protocol.data.game.item.component.PiercingWeapon
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionPiercingWeapon(boolean dealsKnockback, boolean dismounts, @Nullable Sound sound, @Nullable Sound hitSound) Creates an instance of aPiercingWeaponrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull PiercingWeapon.PiercingWeaponBuilderbuilder()booleanReturns the value of thedealsKnockbackrecord component.booleanReturns the value of thedismountsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable SoundhitSound()Returns the value of thehitSoundrecord component.@Nullable Soundsound()Returns the value of thesoundrecord component.@NonNull PiercingWeapon.PiercingWeaponBuilderfinal StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PiercingWeapon
public PiercingWeapon(boolean dealsKnockback, boolean dismounts, @Nullable @Nullable Sound sound, @Nullable @Nullable Sound hitSound) Creates an instance of aPiercingWeaponrecord class.- Parameters:
dealsKnockback- the value for thedealsKnockbackrecord componentdismounts- the value for thedismountsrecord componentsound- the value for thesoundrecord componenthitSound- the value for thehitSoundrecord component
-
-
Method Details
-
builder
-
toBuilder
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
dealsKnockback
public boolean dealsKnockback()Returns the value of thedealsKnockbackrecord component.- Returns:
- the value of the
dealsKnockbackrecord component
-
dismounts
public boolean dismounts()Returns the value of thedismountsrecord component.- Returns:
- the value of the
dismountsrecord component
-
sound
Returns the value of thesoundrecord component.- Returns:
- the value of the
soundrecord component
-
hitSound
Returns the value of thehitSoundrecord component.- Returns:
- the value of the
hitSoundrecord component
-