Class TextEffect.Builder
java.lang.Object
me.emafire003.dev.particleanimationlib.effects.TextEffect.Builder
- Enclosing class:
TextEffect
TextEffect builder static inner class.-
Field Summary
FieldsModifier and TypeFieldDescriptionFont used to create the TextbooleanInvert the text, as in it makes it hollowed out of a rectangle backgroundbooleanSet this only to true if you are working with changing text.floatScale the font downintEach stepX pixel will be shown.intEach stepY pixel will be shown.Text to display -
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns aTextEffectbuilt from the parameters previously set.entityOrigin(net.minecraft.entity.Entity val) Sets theentityOriginand returns a reference to this Builder enabling method chaining.executeOnStop(EffectModifier executeOnStop) Sets theexecuteOnStopand returns a reference to this Builder enabling method chaining.Sets thefontand returns a reference to this Builder enabling method chaining.forced(boolean forced) Sets theforcedand returns a reference to this Builder enabling method chaining.invert(boolean val) Sets theinvertand returns a reference to this Builder enabling method chaining.iterations(int val) Sets theiterationsand returns a reference to this Builder enabling method chaining.limitParticlesEveryNIterations(int val) Sets thelimitParticlesEveryNIterationsand returns a reference to this Builder enabling method chaining.originOffset(net.minecraft.util.math.Vec3d val) Sets theoriginOffsetand returns a reference to this Builder enabling method chaining.originPos(net.minecraft.util.math.Vec3d val) Sets theoriginPosand returns a reference to this Builder enabling method chaining.particle(net.minecraft.particle.ParticleEffect val) Sets theparticleand returns a reference to this Builder enabling method chaining.particleLimit(int val) Sets theparticleLimitand returns a reference to this Builder enabling method chaining.pitch(float val) Sets thepitchand returns a reference to this Builder enabling method chaining.pitchOffset(float val) Sets thepitchOffsetand returns a reference to this Builder enabling method chaining.realtime(boolean val) Sets therealtimeand returns a reference to this Builder enabling method chaining.shouldLimitParticlesEveryNIterations(boolean val) Sets theshouldLimitParticlesEveryNIterationsand returns a reference to this Builder enabling method chaining.shouldLimitParticlesSpawnedPerIteration(boolean val) Sets theshouldLimitParticlesSpawnedPerIterationand returns a reference to this Builder enabling method chaining.shouldSpawnParticlesEveryNIteration(boolean val) Sets theshouldSpawnParticlesEveryNIterationand returns a reference to this Builder enabling method chaining.shouldUpdateYPR(boolean val) Sets theshouldUpdateYPRand returns a reference to this Builder enabling method chaining.size(float val) Sets thesizeand returns a reference to this Builder enabling method chaining.spawnParticlesEveryNIteration(int val) Sets thespawnParticlesEveryNIterationand returns a reference to this Builder enabling method chaining.stepX(int val) Sets thestepXand returns a reference to this Builder enabling method chaining.stepY(int val) Sets thestepYand returns a reference to this Builder enabling method chaining.Sets thetextand returns a reference to this Builder enabling method chaining.updatePositions(boolean val) Sets theupdatePositionsand returns a reference to this Builder enabling method chaining.useEyePosAsOrigin(boolean val) Sets theuseEyePosAsOriginand returns a reference to this Builder enabling method chaining.world(net.minecraft.server.world.ServerWorld val) Sets theworldand returns a reference to this Builder enabling method chaining.yaw(float val) Sets theyawand returns a reference to this Builder enabling method chaining.yawOffset(float val) Sets theyawOffsetand returns a reference to this Builder enabling method chaining.
-
Field Details
-
text
Text to display -
invert
public boolean invertInvert the text, as in it makes it hollowed out of a rectangle background -
stepX
public int stepXEach stepX pixel will be shown. Saves packets for lower fontsizes. -
stepY
public int stepYEach stepY pixel will be shown. Saves packets for lower fontsizes. -
size
public float sizeScale the font down -
realtime
public boolean realtimeSet this only to true if you are working with changing text. I'd advise the parser to recalculate the BufferedImage every iteration. Recommended FALSE -
font
Font used to create the Text
-
-
Method Details
-
iterations
Sets theiterationsand returns a reference to this Builder enabling method chaining.- Parameters:
val- theiterationsto set- Returns:
- a reference to this Builder
-
originPos
Sets theoriginPosand returns a reference to this Builder enabling method chaining.- Parameters:
val- theoriginPosto set- Returns:
- a reference to this Builder
-
updatePositions
Sets theupdatePositionsand returns a reference to this Builder enabling method chaining.- Parameters:
val- theupdatePositionsto set- Returns:
- a reference to this Builder
-
useEyePosAsOrigin
Sets theuseEyePosAsOriginand returns a reference to this Builder enabling method chaining.- Parameters:
val- theuseEyePosAsOriginto set- Returns:
- a reference to this Builder
-
entityOrigin
Sets theentityOriginand returns a reference to this Builder enabling method chaining.- Parameters:
val- theentityOriginto set- Returns:
- a reference to this Builder
-
originOffset
Sets theoriginOffsetand returns a reference to this Builder enabling method chaining.- Parameters:
val- theoriginOffsetto set- Returns:
- a reference to this Builder
-
world
Sets theworldand returns a reference to this Builder enabling method chaining.- Parameters:
val- theworldto set- Returns:
- a reference to this Builder
-
particle
Sets theparticleand returns a reference to this Builder enabling method chaining.- Parameters:
val- theparticleto set- Returns:
- a reference to this Builder
-
yawOffset
Sets theyawOffsetand returns a reference to this Builder enabling method chaining.- Parameters:
val- theyawOffsetto set- Returns:
- a reference to this Builder
-
pitchOffset
Sets thepitchOffsetand returns a reference to this Builder enabling method chaining.- Parameters:
val- thepitchOffsetto set- Returns:
- a reference to this Builder
-
yaw
Sets theyawand returns a reference to this Builder enabling method chaining.- Parameters:
val- theyawto set- Returns:
- a reference to this Builder
-
pitch
Sets thepitchand returns a reference to this Builder enabling method chaining.- Parameters:
val- thepitchto set- Returns:
- a reference to this Builder
-
shouldUpdateYPR
Sets theshouldUpdateYPRand returns a reference to this Builder enabling method chaining.- Parameters:
val- theshouldUpdateYPRto set- Returns:
- a reference to this Builder
-
text
Sets thetextand returns a reference to this Builder enabling method chaining.- Parameters:
val- thetextto set- Returns:
- a reference to this Builder
-
invert
Sets theinvertand returns a reference to this Builder enabling method chaining.- Parameters:
val- theinvertto set- Returns:
- a reference to this Builder
-
stepX
Sets thestepXand returns a reference to this Builder enabling method chaining.- Parameters:
val- thestepXto set- Returns:
- a reference to this Builder
-
stepY
Sets thestepYand returns a reference to this Builder enabling method chaining.- Parameters:
val- thestepYto set- Returns:
- a reference to this Builder
-
size
Sets thesizeand returns a reference to this Builder enabling method chaining.- Parameters:
val- thesizeto set- Returns:
- a reference to this Builder
-
realtime
Sets therealtimeand returns a reference to this Builder enabling method chaining.- Parameters:
val- therealtimeto set- Returns:
- a reference to this Builder
-
font
Sets thefontand returns a reference to this Builder enabling method chaining.- Parameters:
val- thefontto set- Returns:
- a reference to this Builder
-
executeOnStop
Sets theexecuteOnStopand returns a reference to this Builder enabling method chaining.- Parameters:
executeOnStop- theexecuteOnStopto set- Returns:
- a reference to this Builder
-
build
Returns aTextEffectbuilt from the parameters previously set.- Returns:
- a
TextEffectbuilt with parameters of thisTextEffect.Builder
-
shouldSpawnParticlesEveryNIteration
Sets theshouldSpawnParticlesEveryNIterationand returns a reference to this Builder enabling method chaining.- Parameters:
val- theshouldSpawnParticlesEveryNIterationto set- Returns:
- a reference to this Builder
-
spawnParticlesEveryNIteration
Sets thespawnParticlesEveryNIterationand returns a reference to this Builder enabling method chaining.- Parameters:
val- thespawnParticlesEveryNIterationto set- Returns:
- a reference to this Builder
-
shouldLimitParticlesSpawnedPerIteration
Sets theshouldLimitParticlesSpawnedPerIterationand returns a reference to this Builder enabling method chaining.- Parameters:
val- theshouldLimitParticlesSpawnedPerIterationto set- Returns:
- a reference to this Builder
-
particleLimit
Sets theparticleLimitand returns a reference to this Builder enabling method chaining.- Parameters:
val- theparticleLimitto set- Returns:
- a reference to this Builder
-
shouldLimitParticlesEveryNIterations
Sets theshouldLimitParticlesEveryNIterationsand returns a reference to this Builder enabling method chaining.- Parameters:
val- theshouldLimitParticlesEveryNIterationsto set- Returns:
- a reference to this Builder
-
limitParticlesEveryNIterations
Sets thelimitParticlesEveryNIterationsand returns a reference to this Builder enabling method chaining.- Parameters:
val- thelimitParticlesEveryNIterationsto set- Returns:
- a reference to this Builder
-
forced
Sets theforcedand returns a reference to this Builder enabling method chaining.- Parameters:
forced- theforcedto set- Returns:
- a reference to this Builder
-