Record Class GeyserParticleOptions
java.lang.Object
java.lang.Record
net.minecraft.core.particles.GeyserParticleOptions
- All Implemented Interfaces:
ParticleOptions
public record GeyserParticleOptions(ParticleType<GeyserParticleOptions> type, int waterBlocks)
extends Record
implements ParticleOptions
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ParticleType<GeyserParticleOptions> The field for thetyperecord component.private final intThe field for thewaterBlocksrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionGeyserParticleOptions(ParticleType<GeyserParticleOptions> type, int waterBlocks) Creates an instance of aGeyserParticleOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic com.mojang.serialization.MapCodec<GeyserParticleOptions> final booleanIndicates whether some other object is "equal to" this one.getType()final inthashCode()Returns a hash code value for this object.static StreamCodec<? super io.netty.buffer.ByteBuf, GeyserParticleOptions> final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.intReturns the value of thewaterBlocksrecord component.
-
Field Details
-
type
The field for thetyperecord component. -
waterBlocks
private final int waterBlocksThe field for thewaterBlocksrecord component.
-
-
Constructor Details
-
GeyserParticleOptions
Creates an instance of aGeyserParticleOptionsrecord class.- Parameters:
type- the value for thetyperecord componentwaterBlocks- the value for thewaterBlocksrecord component
-
-
Method Details
-
codec
public static com.mojang.serialization.MapCodec<GeyserParticleOptions> codec(ParticleType<GeyserParticleOptions> type) -
streamCodec
public static StreamCodec<? super io.netty.buffer.ByteBuf, GeyserParticleOptions> streamCodec(ParticleType<GeyserParticleOptions> type) -
getType
- Specified by:
getTypein interfaceParticleOptions
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
waterBlocks
public int waterBlocks()Returns the value of thewaterBlocksrecord component.- Returns:
- the value of the
waterBlocksrecord component
-