Record Class GeyserParticle
java.lang.Object
java.lang.Record
dev.wyck.environment.particle.options.GeyserParticle
- Record Components:
waterBlocks- the number of water blocks
- All Implemented Interfaces:
ParticleData
@NullMarked
@AsOf("3.0.0")
public record GeyserParticle(int waterBlocks)
extends Record
implements ParticleData
Particle data for geyser particles.
- Since:
- 3.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionGeyserParticle(int waterBlocks) Creates an instance of aGeyserParticlerecord class. -
Method Summary
Modifier and TypeMethodDescriptionapply(ParticleType particleType) Applies the particle data to the given particle type and returns the corresponding ParticleOptions.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static GeyserParticleof(int waterBlocks) Creates a new GeyserParticle with the given amount of water blocks.final StringtoString()Returns a string representation of this record class.intReturns the value of thewaterBlocksrecord component.
-
Constructor Details
-
GeyserParticle
public GeyserParticle(int waterBlocks) Creates an instance of aGeyserParticlerecord class.- Parameters:
waterBlocks- the value for thewaterBlocksrecord component
-
-
Method Details
-
apply
Description copied from interface:ParticleDataApplies the particle data to the given particle type and returns the corresponding ParticleOptions.- Specified by:
applyin interfaceParticleData- Parameters:
particleType- The particle type to which the data will be applied.- Returns:
- The ParticleOptions representing the applied particle data.
-
of
Creates a new GeyserParticle with the given amount of water blocks.- Parameters:
waterBlocks- the amount of water blocks- Returns:
- a new GeyserParticle
- Since:
- 3.0.0
-
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 with thecomparemethod from their corresponding wrapper classes. -
waterBlocks
public int waterBlocks()Returns the value of thewaterBlocksrecord component.- Returns:
- the value of the
waterBlocksrecord component
-