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
ConstructorsConstructorDescriptionImage(net.minecraft.resources.ResourceLocation resourceLocation, int sheetX, int sheetY, int sheetWidth, int sheetHeight) -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(net.minecraft.client.gui.GuiGraphics gui, int x, int y) Draw this image.voiddrawWithColor(net.minecraft.client.gui.GuiGraphics gui, int x, int y, float r, float g, float b, float a) Draw this image.voiddrawWorldWithAlpha(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.intintgetWidth()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:IImageDraw 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:IImageDraw this image.- Specified by:
drawWithColorin 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:IImageDraw the image in the world.- Specified by:
drawWorldWithAlphain 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()
-