public class GuiHelper
extends java.lang.Object
Constructor and Description |
---|
GuiHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
drawIconWithCut(net.minecraft.client.renderer.texture.TextureAtlasSprite icon,
int x,
int y,
int width,
int height,
int cut)
Draws the given icon with optional cut
|
static boolean |
isInBounds(double x,
double y,
int a,
int b,
int c,
int d)
Test if location is in bounds
|
static void |
playButtonSound()
Used to play the button sound in a GUI
|
static void |
renderFluid(net.minecraftforge.fluids.FluidTank tank,
int x,
int y,
int maxHeight,
int maxWidth)
Renders a fluid from the given tank
|
static void |
setGLColorFromInt(int color)
Used to set the color of the GL stack from an int value
|
public static void playButtonSound()
public static void setGLColorFromInt(int color)
color
- The color value eg 0x000000public static void drawIconWithCut(net.minecraft.client.renderer.texture.TextureAtlasSprite icon, int x, int y, int width, int height, int cut)
icon
- The texturex
- X posy
- Y poswidth
- keep width of iconheight
- keep height of iconcut
- 0 is full icon, 16 is full cutpublic static void renderFluid(net.minecraftforge.fluids.FluidTank tank, int x, int y, int maxHeight, int maxWidth)
tank
- The tankx
- The x posy
- The y posmaxHeight
- Max heightmaxWidth
- Max widthpublic static boolean isInBounds(double x, double y, int a, int b, int c, int d)
x
- xLocationy
- yLocationa
- Rectangle point ab
- Rectangle point bc
- Rectangle point cd
- Rectangle point d
(A,B)------------------
- -
-----------------(C,D)