Interface IParticle2D
- All Known Implementing Classes:
SimpleParticle2D
public interface IParticle2D
Provides methods for rendering particles in a 2D space.
-
Method Summary
Modifier and TypeMethodDescriptionintlifetime()Gets the total lifetime of this particle in ticks.org.joml.Vector2fposition()Gets the position to render the particle at.default voidrender(InstancedParticle2D instance, net.minecraft.client.gui.GuiGraphics graphics, float partialTick) Renders this particle using the providedGuiGraphics.org.joml.Vector2isize()Gets the size to render the particle at.net.minecraft.resources.ResourceLocationtexture()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 providedGuiGraphics.- Parameters:
instance- TheInstancedParticle2Dto render.graphics- The graphics to draw using.partialTick- The game's partial tick.
-