Class RenderHelpers

java.lang.Object
org.cyclops.cyclopscore.helper.RenderHelpers

@Deprecated public class RenderHelpers extends Object
Deprecated.
A helper for rendering.
  • Nested Class Summary Link icon

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
  • Field Summary Link icon

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Deprecated.
     
    static final com.google.common.base.Function<net.minecraft.resources.ResourceLocation,net.minecraft.client.renderer.texture.TextureAtlasSprite>
    Deprecated.
     
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    static void
    addBlockHitEffects(net.minecraft.client.particle.ParticleEngine particleManager, net.minecraft.client.multiplayer.ClientLevel world, net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side)
    Deprecated.
    A custom way of spawning block hit effects.
    static void
    bindTexture(net.minecraft.resources.ResourceLocation texture)
    Deprecated.
    Bind a texture to the rendering engine.
    static void
    blitColored(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int z, float u, float v, int width, int height, float r, float g, float b, float a)
    Deprecated.
     
    static void
    blitColored(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int z, int width, int height, float u0, float u1, float v0, float v1, float r, float g, float b, float a)
    Deprecated.
     
    static void
    drawScaledCenteredString(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource multiBufferSource, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, int width, float scale, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode)
    Deprecated.
    static void
    drawScaledCenteredString(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource multiBufferSource, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, int width, float originalScale, int maxWidth, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode)
    Deprecated.
    static void
    drawScaledCenteredString(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource multiBufferSource, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, int maxWidth, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode)
    Deprecated.
    static void
    drawScaledCenteredString(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, int width, float scale, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode)
    Deprecated.
    Draw the given text with the given width and desired scale.
    static void
    drawScaledCenteredString(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, int width, float originalScale, int maxWidth, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode)
    Deprecated.
    Draw the given text and scale it to the max width.
    static void
    drawScaledCenteredString(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, int maxWidth, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode)
    Deprecated.
    Draw the given text and scale it to the max width.
    static void
    drawScaledString(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource multiBufferSource, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, float scale, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode)
    Deprecated.
    static void
    drawScaledString(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, float scale, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode)
    Deprecated.
    Draw the given text with the given scale with a shadow.
    static void
    emitParticle(net.minecraft.client.particle.Particle particle)
    Deprecated.
    Add a particle to the world.
    static net.minecraft.client.resources.model.BakedModel
    getBakedModel(net.minecraft.world.level.block.state.BlockState blockState)
    Deprecated.
    Retrieve the baked model from a given block state.
    static net.minecraft.client.renderer.texture.TextureAtlasSprite
    getBlockIcon(net.minecraft.world.level.block.Block block)
    Deprecated.
    Get the default icon from a block.
    static net.minecraft.client.resources.model.BakedModel
    getDynamicBakedModel(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos)
    Deprecated.
    Retrieve the potentially dynamic baked model for a position.
    static int
    getFluidBakedQuadColor(net.neoforged.neoforge.fluids.FluidStack fluidStack)
    Deprecated.
    Get the fluid color to use in a baked quad.
    static net.minecraft.client.renderer.texture.TextureAtlasSprite
    getFluidIcon(net.minecraft.world.level.material.Fluid fluid, net.minecraft.core.Direction side)
    Deprecated.
    Get the icon of a fluid for a side in a safe way.
    static net.minecraft.client.renderer.texture.TextureAtlasSprite
    getFluidIcon(net.neoforged.neoforge.fluids.FluidStack fluid, net.minecraft.core.Direction side)
    Deprecated.
    Get the icon of a fluid for a side in a safe way.
    static org.apache.commons.lang3.tuple.Triple<Float,Float,Float>
    getFluidVertexBufferColor(net.neoforged.neoforge.fluids.FluidStack fluidStack)
    Deprecated.
    Get the fluid color to use in buffer rendering.
    static boolean
    isPointInButton(net.minecraft.client.gui.components.Button button, int pointX, int pointY)
    Deprecated.
    Check if a point is inside a button's region.
    static boolean
    isPointInRegion(int left, int top, int width, int height, double pointX, double pointY)
    Deprecated.
    Check if a point is inside a region.
    static boolean
    Deprecated.
    Check if a point is inside a region.
    static void
    renderFluidContext(net.neoforged.neoforge.fluids.FluidStack fluid, com.mojang.blaze3d.vertex.PoseStack matrixStack, RenderHelpers.IFluidContextRender render)
    Deprecated.
    Prepare a render system context for rendering fluids.

    Methods inherited from class java.lang.Object Link icon

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details Link icon

    • SLOT_SIZE Link icon

      public static final int SLOT_SIZE
      Deprecated.
      See Also:
    • TEXTURE_GETTER Link icon

      public static final com.google.common.base.Function<net.minecraft.resources.ResourceLocation,net.minecraft.client.renderer.texture.TextureAtlasSprite> TEXTURE_GETTER
      Deprecated.
  • Constructor Details Link icon

    • RenderHelpers Link icon

      public RenderHelpers()
      Deprecated.
  • Method Details Link icon

    • bindTexture Link icon

      public static void bindTexture(net.minecraft.resources.ResourceLocation texture)
      Deprecated.
      Bind a texture to the rendering engine.
      Parameters:
      texture - The texture to bind.
    • emitParticle Link icon

      public static void emitParticle(net.minecraft.client.particle.Particle particle)
      Deprecated.
      Add a particle to the world.
      Parameters:
      particle - A particle.
    • drawScaledString Link icon

      public static void drawScaledString(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, float scale, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode)
      Deprecated.
      Draw the given text with the given scale with a shadow.
      Parameters:
      guiGraphics - The gui graphics
      fontRenderer - The font renderer
      string - The string to draw
      x - The center X
      y - The center Y
      scale - The scale to render the string by.
      color - The color to draw
      shadow - If a shadow should be drawn
      displayMode - The display mode
    • drawScaledString Link icon

      @Deprecated public static void drawScaledString(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource multiBufferSource, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, float scale, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode)
      Deprecated.
      Draw the given text with the given scale with a shadow.
      Parameters:
      matrixStack - The matrix stack
      multiBufferSource - The buffer source
      fontRenderer - The font renderer
      string - The string to draw
      x - The center X
      y - The center Y
      scale - The scale to render the string by.
      color - The color to draw
      shadow - If a shadow should be drawn
      displayMode - The display mode
    • drawScaledCenteredString Link icon

      public static void drawScaledCenteredString(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, int maxWidth, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode)
      Deprecated.
      Draw the given text and scale it to the max width.
      Parameters:
      guiGraphics - The gui graphics
      fontRenderer - The font renderer
      string - The string to draw
      x - The center X
      y - The center Y
      maxWidth - The maximum width to scale to
      color - The color to draw
      shadow - If a shadow should be drawn
      displayMode - The display mode
    • drawScaledCenteredString Link icon

      @Deprecated public static void drawScaledCenteredString(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource multiBufferSource, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, int maxWidth, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode)
      Deprecated.
      Draw the given text and scale it to the max width.
      Parameters:
      matrixStack - The matrix stack
      multiBufferSource - The buffer source
      fontRenderer - The font renderer
      string - The string to draw
      x - The center X
      y - The center Y
      maxWidth - The maximum width to scale to
      color - The color to draw
      shadow - If a shadow should be drawn
      displayMode - The display mode
    • drawScaledCenteredString Link icon

      public static void drawScaledCenteredString(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, int width, float originalScale, int maxWidth, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode)
      Deprecated.
      Draw the given text and scale it to the max width. The given string may already be scaled and its width must be passed in that case.
      Parameters:
      guiGraphics - The gui graphics
      fontRenderer - The font renderer
      string - The string to draw
      x - The center X
      y - The center Y
      width - The scaled width
      originalScale - The original scale
      maxWidth - The maximum width to scale to
      shadow - If a shadow should be drawn
      displayMode - The display mode
    • drawScaledCenteredString Link icon

      @Deprecated public static void drawScaledCenteredString(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource multiBufferSource, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, int width, float originalScale, int maxWidth, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode)
      Deprecated.
      Draw the given text and scale it to the max width. The given string may already be scaled and its width must be passed in that case.
      Parameters:
      matrixStack - The matrix stack
      multiBufferSource - The buffer source
      fontRenderer - The font renderer
      string - The string to draw
      x - The center X
      y - The center Y
      width - The scaled width
      originalScale - The original scale
      maxWidth - The maximum width to scale to
      shadow - If a shadow should be drawn
      displayMode - The display mode
    • drawScaledCenteredString Link icon

      public static void drawScaledCenteredString(net.minecraft.client.gui.GuiGraphics guiGraphics, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, int width, float scale, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode)
      Deprecated.
      Draw the given text with the given width and desired scale.
      Parameters:
      guiGraphics - The gui graphics
      fontRenderer - The font renderer
      string - The string to draw
      x - The center X
      y - The center Y
      width - The scaled width
      scale - The desired scale
      color - The color to draw
      shadow - If a shadow should be drawn
      displayMode - The font display mode
    • drawScaledCenteredString Link icon

      @Deprecated public static void drawScaledCenteredString(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource multiBufferSource, net.minecraft.client.gui.Font fontRenderer, String string, int x, int y, int width, float scale, int color, boolean shadow, net.minecraft.client.gui.Font.DisplayMode displayMode)
      Deprecated.
      Draw the given text with the given width and desired scale.
      Parameters:
      matrixStack - The matrix stack
      multiBufferSource - The buffer source
      fontRenderer - The font renderer
      string - The string to draw
      x - The center X
      y - The center Y
      width - The scaled width
      scale - The desired scale
      color - The color to draw
      shadow - If a shadow should be drawn
      displayMode - The font display mode
    • getBakedModel Link icon

      public static net.minecraft.client.resources.model.BakedModel getBakedModel(net.minecraft.world.level.block.state.BlockState blockState)
      Deprecated.
      Retrieve the baked model from a given block state.
      Parameters:
      blockState - The block state.
      Returns:
      The corresponding baked model.
    • getDynamicBakedModel Link icon

      public static net.minecraft.client.resources.model.BakedModel getDynamicBakedModel(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos)
      Deprecated.
      Retrieve the potentially dynamic baked model for a position. This will automatically take into account smart block models.
      Parameters:
      world - The world.
      pos - The position.
      Returns:
      The baked model.
    • addBlockHitEffects Link icon

      public static void addBlockHitEffects(net.minecraft.client.particle.ParticleEngine particleManager, net.minecraft.client.multiplayer.ClientLevel world, net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction side)
      Deprecated.
      A custom way of spawning block hit effects.
      Parameters:
      particleManager - The effect renderer.
      world - The world.
      blockState - The blockstate to render particles for.
      pos - The position.
      side - The hit side.
    • getBlockIcon Link icon

      public static net.minecraft.client.renderer.texture.TextureAtlasSprite getBlockIcon(net.minecraft.world.level.block.Block block)
      Deprecated.
      Get the default icon from a block.
      Parameters:
      block - The block.
      Returns:
      The icon.
    • getFluidIcon Link icon

      public static net.minecraft.client.renderer.texture.TextureAtlasSprite getFluidIcon(net.minecraft.world.level.material.Fluid fluid, net.minecraft.core.Direction side)
      Deprecated.
      Get the icon of a fluid for a side in a safe way.
      Parameters:
      fluid - The fluid.
      side - The side to get the icon from, UP if null.
      Returns:
      The icon.
    • getFluidIcon Link icon

      public static net.minecraft.client.renderer.texture.TextureAtlasSprite getFluidIcon(net.neoforged.neoforge.fluids.FluidStack fluid, net.minecraft.core.Direction side)
      Deprecated.
      Get the icon of a fluid for a side in a safe way.
      Parameters:
      fluid - The fluid stack.
      side - The side to get the icon from, UP if null.
      Returns:
      The icon.
    • renderFluidContext Link icon

      public static void renderFluidContext(net.neoforged.neoforge.fluids.FluidStack fluid, com.mojang.blaze3d.vertex.PoseStack matrixStack, RenderHelpers.IFluidContextRender render)
      Deprecated.
      Prepare a render system context for rendering fluids.
      Parameters:
      fluid - The fluid stack.
      matrixStack - The matrix stack.
      render - The actual fluid renderer.
    • getFluidVertexBufferColor Link icon

      public static org.apache.commons.lang3.tuple.Triple<Float,Float,Float> getFluidVertexBufferColor(net.neoforged.neoforge.fluids.FluidStack fluidStack)
      Deprecated.
      Get the fluid color to use in buffer rendering.
      Parameters:
      fluidStack - The fluid stack.
      Returns:
      The RGB colors.
    • getFluidBakedQuadColor Link icon

      public static int getFluidBakedQuadColor(net.neoforged.neoforge.fluids.FluidStack fluidStack)
      Deprecated.
      Get the fluid color to use in a baked quad.
      Parameters:
      fluidStack - The fluid stack.
      Returns:
      The BGR colors.
    • isPointInRegion Link icon

      public static boolean isPointInRegion(int left, int top, int width, int height, double pointX, double pointY)
      Deprecated.
      Check if a point is inside a region.
      Parameters:
      left - Left-top corner x
      top - Left-top corner y
      width - The width
      height - The height
      pointX - The point x
      pointY - The point y
      Returns:
      If the point is inside the region.
    • isPointInRegion Link icon

      public static boolean isPointInRegion(Rectangle region, Point point)
      Deprecated.
      Check if a point is inside a region.
      Parameters:
      region - The region.
      point - The point.
      Returns:
      If the point is inside the region.
    • isPointInButton Link icon

      public static boolean isPointInButton(net.minecraft.client.gui.components.Button button, int pointX, int pointY)
      Deprecated.
      Check if a point is inside a button's region.
      Parameters:
      button - The button.
      pointX - The point x
      pointY - The point y
      Returns:
      If the point is inside the button's region.
    • blitColored Link icon

      public static void blitColored(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int z, float u, float v, int width, int height, float r, float g, float b, float a)
      Deprecated.
    • blitColored Link icon

      public static void blitColored(net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int z, int width, int height, float u0, float u1, float v0, float v1, float r, float g, float b, float a)
      Deprecated.