Record Class RiftSpec
java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcanvas.api.client.vfx.RiftSpec
- Record Components:
width- its width at its widest, in blocksheight- its height, in blockscolor- the colour of its edge and glow,0xRRGGBB; its inside is a dark shade of the sameopenTicks- how long it takes to tear opencloseTicks- how long it takes to closeopenSound- played as it opens; null for noneambientSound- played over and over while it stays open; null for nonecloseSound- played as it closes; null for noneambientTicks- ticks between two plays of the ambient soundvolume- how loud its sounds areparticles- motes drawn into it while it is open; null for noneparticleRate- motes a tickshake- how hard the camera of a player beside it shakes as it opens and as it closes, in degrees; 0 for none
public record RiftSpec(float width, float height, int color, int openTicks, int closeTicks, @Nullable net.minecraft.sounds.SoundEvent openSound, @Nullable net.minecraft.sounds.SoundEvent ambientSound, @Nullable net.minecraft.sounds.SoundEvent closeSound, int ambientTicks, float volume, @Nullable ParticleSpec particles, float particleRate, float shake)
extends Record
What a rift looks and sounds like: a tear in the air that opens, hangs there, and closes. See
WorldRifts.-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRiftSpec(float width, float height, int color, int openTicks, int closeTicks, @Nullable net.minecraft.sounds.SoundEvent openSound, @Nullable net.minecraft.sounds.SoundEvent ambientSound, @Nullable net.minecraft.sounds.SoundEvent closeSound, int ambientTicks, float volume, @Nullable ParticleSpec particles, float particleRate, float shake) Creates an instance of aRiftSpecrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable net.minecraft.sounds.SoundEventReturns the value of theambientSoundrecord component.intReturns the value of theambientTicksrecord component.static RiftSpec.Builderbuilder()@Nullable net.minecraft.sounds.SoundEventReturns the value of thecloseSoundrecord component.intReturns the value of thecloseTicksrecord component.intcolor()Returns the value of thecolorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatheight()Returns the value of theheightrecord component.@Nullable net.minecraft.sounds.SoundEventReturns the value of theopenSoundrecord component.intReturns the value of theopenTicksrecord component.floatReturns the value of theparticleRaterecord component.@Nullable ParticleSpecReturns the value of theparticlesrecord component.floatshake()Returns the value of theshakerecord component.final StringtoString()Returns a string representation of this record class.floatvolume()Returns the value of thevolumerecord component.floatwidth()Returns the value of thewidthrecord component.
-
Field Details
-
DEFAULT
A violet rift two blocks wide and four tall, with vanilla's portal sounds.
-
-
Constructor Details
-
RiftSpec
public RiftSpec(float width, float height, int color, int openTicks, int closeTicks, @Nullable net.minecraft.sounds.SoundEvent openSound, @Nullable net.minecraft.sounds.SoundEvent ambientSound, @Nullable net.minecraft.sounds.SoundEvent closeSound, int ambientTicks, float volume, @Nullable ParticleSpec particles, float particleRate, float shake) Creates an instance of aRiftSpecrecord class.- Parameters:
width- the value for thewidthrecord componentheight- the value for theheightrecord componentcolor- the value for thecolorrecord componentopenTicks- the value for theopenTicksrecord componentcloseTicks- the value for thecloseTicksrecord componentopenSound- the value for theopenSoundrecord componentambientSound- the value for theambientSoundrecord componentcloseSound- the value for thecloseSoundrecord componentambientTicks- the value for theambientTicksrecord componentvolume- the value for thevolumerecord componentparticles- the value for theparticlesrecord componentparticleRate- the value for theparticleRaterecord componentshake- the value for theshakerecord component
-
-
Method Details
-
builder
-
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. -
width
-
height
-
color
-
openTicks
-
closeTicks
public int closeTicks()Returns the value of thecloseTicksrecord component.- Returns:
- the value of the
closeTicksrecord component
-
openSound
-
ambientSound
public @Nullable net.minecraft.sounds.SoundEvent ambientSound()Returns the value of theambientSoundrecord component.- Returns:
- the value of the
ambientSoundrecord component
-
closeSound
public @Nullable net.minecraft.sounds.SoundEvent closeSound()Returns the value of thecloseSoundrecord component.- Returns:
- the value of the
closeSoundrecord component
-
ambientTicks
public int ambientTicks()Returns the value of theambientTicksrecord component.- Returns:
- the value of the
ambientTicksrecord component
-
volume
-
particles
-
particleRate
public float particleRate()Returns the value of theparticleRaterecord component.- Returns:
- the value of the
particleRaterecord component
-
shake
-