Interface IParticle2D

All Known Implementing Classes:
SimpleParticle2D

public interface IParticle2D
Provides methods for rendering particles in a 2D space.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the total lifetime of this particle in ticks.
    org.joml.Vector2f
    Gets the position to render the particle at.
    default void
    render(InstancedParticle2D instance, net.minecraft.client.gui.GuiGraphics graphics, float partialTick)
    Renders this particle using the provided GuiGraphics.
    org.joml.Vector2i
    Gets the size to render the particle at.
    net.minecraft.resources.ResourceLocation
    The texture to render the particle with.
  • Method Details

    • texture

      net.minecraft.resources.ResourceLocation texture()
      The texture to render the particle with.
      Returns:
      The texture.
    • position

      org.joml.Vector2f position()
      Gets the position to render the particle at.
      Returns:
      The position.
    • size

      org.joml.Vector2i size()
      Gets the size to render the particle at.
      Returns:
      The size.
    • lifetime

      int lifetime()
      Gets the total lifetime of this particle in ticks.
      Returns:
      The lifetime.
    • render

      default void render(InstancedParticle2D instance, net.minecraft.client.gui.GuiGraphics graphics, float partialTick)
      Renders this particle using the provided GuiGraphics.
      Parameters:
      instance - The InstancedParticle2D to render.
      graphics - The graphics to draw using.
      partialTick - The game's partial tick.