Class Image
java.lang.Object
org.cyclops.cyclopscore.client.gui.image.Image
- All Implemented Interfaces:
IImage
A wrapper that contains a reference to a
ResourceLocation
and its sheet position.-
Constructor Summary
ConstructorDescriptionImage
(net.minecraft.resources.ResourceLocation resourceLocation, int sheetX, int sheetY, int sheetWidth, int sheetHeight) -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
getWidth()
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. -
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 interfaceIImage
- Parameters:
gui
- The gui helper object.x
- The x position.y
- The y position.r
- Redg
- Greenb
- Bluea
- 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 interfaceIImage
- Parameters:
textureManager
- The texture manager.matrixStack
- The matrix stackrenderTypeBuffer
- The render type buffercombinedLight
- The combined lightcombinedOverlay
- The combined overlayx1
- Start Xx2
- End Xy1
- Start Yy2
- End Yz
- Zalpha
- The alpha to render with
-
getWidth
public int getWidth() -
getHeight
public int getHeight()
-