java.lang.Object
org.cyclops.cyclopscore.client.gui.image.Image
All Implemented Interfaces:
IImage

public class Image extends Object implements IImage
A wrapper that contains a reference to a ResourceLocation and its sheet position.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Image(net.minecraft.resources.ResourceLocation resourceLocation, int sheetX, int sheetY, int sheetWidth, int sheetHeight)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    draw(net.minecraft.client.gui.GuiGraphics gui, int x, int y)
    Draw this image.
    void
    drawWithColor(net.minecraft.client.gui.GuiGraphics gui, int x, int y, float r, float g, float b, float a)
    Draw this image.
    void
    drawWorldWithAlpha(net.minecraft.client.renderer.texture.TextureManager textureManager, com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource renderTypeBuffer, int combinedLight, int combinedOverlay, float x1, float x2, float y1, float y2, float z, float alpha)
    Draw the image in the world.
    int
     
    int
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.cyclops.cyclopscore.client.gui.image.IImage

    drawWorld, drawWorld, drawWorld, drawWorldWithAlpha, drawWorldWithAlpha
  • Constructor Details

    • Image

      public Image(net.minecraft.resources.ResourceLocation resourceLocation, int sheetX, int sheetY, int sheetWidth, int sheetHeight)
  • Method Details

    • draw

      public void draw(net.minecraft.client.gui.GuiGraphics gui, int x, int y)
      Description copied from interface: IImage
      Draw this image.
      Specified by:
      draw in interface IImage
      Parameters:
      gui - The gui helper object.
      x - The x position.
      y - The y position.
    • drawWithColor

      public void drawWithColor(net.minecraft.client.gui.GuiGraphics gui, int x, int y, float r, float g, float b, float a)
      Description copied from interface: IImage
      Draw this image.
      Specified by:
      drawWithColor in interface IImage
      Parameters:
      gui - The gui helper object.
      x - The x position.
      y - The y position.
      r - Red
      g - Green
      b - Blue
      a - Alpha
    • drawWorldWithAlpha

      public void drawWorldWithAlpha(net.minecraft.client.renderer.texture.TextureManager textureManager, com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource renderTypeBuffer, int combinedLight, int combinedOverlay, float x1, float x2, float y1, float y2, float z, float alpha)
      Description copied from interface: IImage
      Draw the image in the world.
      Specified by:
      drawWorldWithAlpha in interface IImage
      Parameters:
      textureManager - The texture manager.
      matrixStack - The matrix stack
      renderTypeBuffer - The render type buffer
      combinedLight - The combined light
      combinedOverlay - The combined overlay
      x1 - Start X
      x2 - End X
      y1 - Start Y
      y2 - End Y
      z - Z
      alpha - The alpha to render with
    • getWidth

      public int getWidth()
      Specified by:
      getWidth in interface IImage
      Returns:
      The width in pixels.
    • getHeight

      public int getHeight()
      Specified by:
      getHeight in interface IImage
      Returns:
      The height in pixels.