Record Class EntityEffect.SpawnParticles
java.lang.Object
java.lang.Record
net.minestom.server.item.enchant.EntityEffect.SpawnParticles
- All Implemented Interfaces:
Enchantment.Effect
,EntityEffect
,LocationEffect
- Enclosing interface:
EntityEffect
public static record EntityEffect.SpawnParticles(Codec.RawValue particle, Codec.RawValue horizontalPosition, Codec.RawValue verticalPosition, Codec.RawValue horizontalVelocity, Codec.RawValue verticalVelocity, Codec.RawValue speed)
extends Record
implements EntityEffect, LocationEffect
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minestom.server.item.enchant.EntityEffect
EntityEffect.AllOf, EntityEffect.ApplyPotionEffect, EntityEffect.ChangeItemDamage, EntityEffect.DamageEntity, EntityEffect.Explode, EntityEffect.Ignite, EntityEffect.PlaySound, EntityEffect.ReplaceBlock, EntityEffect.ReplaceDisc, EntityEffect.RunFunction, EntityEffect.SetBlockProperties, EntityEffect.SpawnParticles, EntityEffect.SummonEntity
Nested classes/interfaces inherited from interface net.minestom.server.item.enchant.LocationEffect
LocationEffect.AllOf
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSpawnParticles
(Codec.RawValue particle, Codec.RawValue horizontalPosition, Codec.RawValue verticalPosition, Codec.RawValue horizontalVelocity, Codec.RawValue verticalVelocity, Codec.RawValue speed) Creates an instance of aSpawnParticles
record class. -
Method Summary
Modifier and TypeMethodDescription@NotNull StructCodec
<EntityEffect.SpawnParticles> codec()
final 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 thehorizontalPosition
record component.Returns the value of thehorizontalVelocity
record component.particle()
Returns the value of theparticle
record component.speed()
Returns the value of thespeed
record component.final String
toString()
Returns a string representation of this record class.Returns the value of theverticalPosition
record component.Returns the value of theverticalVelocity
record component.
-
Field Details
-
CODEC
-
-
Constructor Details
-
SpawnParticles
public SpawnParticles(@NotNull Codec.RawValue particle, @NotNull Codec.RawValue horizontalPosition, @NotNull Codec.RawValue verticalPosition, @NotNull Codec.RawValue horizontalVelocity, @NotNull Codec.RawValue verticalVelocity, @NotNull Codec.RawValue speed) Creates an instance of aSpawnParticles
record class.- Parameters:
particle
- the value for theparticle
record componenthorizontalPosition
- the value for thehorizontalPosition
record componentverticalPosition
- the value for theverticalPosition
record componenthorizontalVelocity
- the value for thehorizontalVelocity
record componentverticalVelocity
- the value for theverticalVelocity
record componentspeed
- the value for thespeed
record component
-
-
Method Details
-
codec
- Specified by:
codec
in interfaceEntityEffect
- Specified by:
codec
in interfaceLocationEffect
-
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)
. -
particle
Returns the value of theparticle
record component.- Returns:
- the value of the
particle
record component
-
horizontalPosition
Returns the value of thehorizontalPosition
record component.- Returns:
- the value of the
horizontalPosition
record component
-
verticalPosition
Returns the value of theverticalPosition
record component.- Returns:
- the value of the
verticalPosition
record component
-
horizontalVelocity
Returns the value of thehorizontalVelocity
record component.- Returns:
- the value of the
horizontalVelocity
record component
-
verticalVelocity
Returns the value of theverticalVelocity
record component.- Returns:
- the value of the
verticalVelocity
record component
-
speed
Returns the value of thespeed
record component.- Returns:
- the value of the
speed
record component
-