Record Class VibrationParticleData
java.lang.Object
java.lang.Record
net.minestom.server.particle.data.VibrationParticleData
- All Implemented Interfaces:
ParticleData
public record VibrationParticleData(@NotNull VibrationParticleData.VibrationSource type, @NotNull Point source, int entityId, float entityEyeHeight, int ticks)
extends Record
implements ParticleData
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionVibrationParticleData(@NotNull VibrationParticleData.VibrationSource type, @NotNull Point source, int entityId, float entityEyeHeight, int ticks) Creates an instance of aVibrationParticleDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of theentityEyeHeightrecord component.intentityId()Returns the value of theentityIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Pointsource()Returns the value of thesourcerecord component.intticks()Returns the value of theticksrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.booleanvalidate(int particleId) voidwrite(@NotNull NetworkBuffer writer)
-
Constructor Details
-
VibrationParticleData
public VibrationParticleData(@NotNull @NotNull VibrationParticleData.VibrationSource type, @NotNull @NotNull Point source, int entityId, float entityEyeHeight, int ticks) Creates an instance of aVibrationParticleDatarecord class.- Parameters:
type- the value for thetyperecord componentsource- the value for thesourcerecord componententityId- the value for theentityIdrecord componententityEyeHeight- the value for theentityEyeHeightrecord componentticks- the value for theticksrecord component
-
-
Method Details
-
write
- Specified by:
writein interfaceParticleData
-
validate
public boolean validate(int particleId) - Specified by:
validatein interfaceParticleData
-
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 '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
entityId
public int entityId()Returns the value of theentityIdrecord component.- Returns:
- the value of the
entityIdrecord component
-
entityEyeHeight
public float entityEyeHeight()Returns the value of theentityEyeHeightrecord component.- Returns:
- the value of the
entityEyeHeightrecord component
-
ticks
public int ticks()Returns the value of theticksrecord component.- Returns:
- the value of the
ticksrecord component
-