Interface RenderStyle

All Known Implementing Classes:
RenderStyle.Billboard, RenderStyle.Cube

public interface RenderStyle
Defines how a particle emitter renders a set of particles.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
     
    static final class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<RenderStyle>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Called after rendering all particles.
    default net.minecraft.client.renderer.RenderType
    getRenderType(QuasarParticle particle, RenderData renderData)
     
    void
    render(MatrixStack matrixStack, QuasarParticle particle, RenderData renderData, org.joml.Vector3fc renderOffset, com.mojang.blaze3d.vertex.VertexConsumer builder, double ageModifier, float partialTicks)
    Draws a single particle.
    default boolean
    setup(int particleCount)
    Called before rendering any particles.
  • Field Details

    • CODEC

      static final com.mojang.serialization.Codec<RenderStyle> CODEC
  • Method Details

    • setup

      default boolean setup(int particleCount)
      Called before rendering any particles. This will not be fired if the emitter has no particles.
      Parameters:
      particleCount - The number of particles that will be rendered with render(MatrixStack, QuasarParticle, RenderData, Vector3fc, VertexConsumer, double, float)
      Returns:
      Whether the particles are allowed to render
      Since:
      1.3.0
    • clear

      default void clear()
      Called after rendering all particles.
      Since:
      1.3.0
    • render

      void render(MatrixStack matrixStack, QuasarParticle particle, RenderData renderData, org.joml.Vector3fc renderOffset, com.mojang.blaze3d.vertex.VertexConsumer builder, double ageModifier, float partialTicks)
      Draws a single particle.
      Parameters:
      matrixStack - The current stack of matrix transformations
      particle - The particle to render
      renderData - The render data associated with that particle
      renderOffset - The offset from the camera to draw the particle at
      builder - The vertex consumer to draw into
      partialTicks - The percentage from last tick to this tick
    • getRenderType

      default net.minecraft.client.renderer.RenderType getRenderType(QuasarParticle particle, RenderData renderData)
      Returns:
      The render type to use for the specified particle.
      Since:
      1.3.0
      See Also: