Package cn.nukkit.level.vibration
Record Class VibrationEvent
java.lang.Object
java.lang.Record
cn.nukkit.level.vibration.VibrationEvent
- Record Components:
initiator
- The object which cause the vibration (can be an instance of Block, Entity ...)source
- The vibration source postype
- Vibration type
@PowerNukkitXOnly
@Since("1.19.21-r3")
public record VibrationEvent(Object initiator, Vector3 source, VibrationType type)
extends Record
-
Constructor Summary
ConstructorDescriptionVibrationEvent
(Object initiator, Vector3 source, VibrationType type) Creates an instance of aVibrationEvent
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theinitiator
record component.source()
Returns the value of thesource
record component.final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.
-
Constructor Details
-
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)
. -
initiator
Returns the value of theinitiator
record component.- Returns:
- the value of the
initiator
record component
-
source
Returns the value of thesource
record component.- Returns:
- the value of the
source
record component
-
type
Returns the value of thetype
record component.- Returns:
- the value of the
type
record component
-