public class ScreenHelper
extends java.lang.Object
Constructor and Description |
---|
ScreenHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
bindPokemonSprite(Pokemon pokemon,
net.minecraft.client.Minecraft mc) |
static void |
bindTexture(net.minecraft.util.ResourceLocation resourceLocation) |
static void |
closeScreen()
Closes a GUI.
|
static void |
disableMinecraftUI() |
static void |
drawAttackInfoBox(com.mojang.blaze3d.matrix.MatrixStack matrix,
float zLevel,
int width,
int height)
Draws a gray box to contain attack information.
|
static void |
drawAttackInfoList(com.mojang.blaze3d.matrix.MatrixStack matrix,
Attack a,
int width,
int height)
Draws information about an attack in a move list choose screen.
|
static void |
drawAttackInfoMoveset(com.mojang.blaze3d.matrix.MatrixStack matrix,
Attack attack,
int y,
int width,
int height)
Draws information about the selected attack in a Pokémon's moveset.
|
static void |
drawBar(com.mojang.blaze3d.matrix.MatrixStack matrix,
double x,
double y,
double width,
double height,
float percent,
java.awt.Color color) |
static void |
drawBar(com.mojang.blaze3d.matrix.MatrixStack matrix,
double x,
double y,
double width,
double height,
float percent,
java.awt.Color color,
boolean flip) |
static void |
drawBar(com.mojang.blaze3d.matrix.MatrixStack matrix,
double x,
double y,
double width,
double height,
float percent,
java.awt.Color color,
java.awt.Color incomplete,
boolean flip)
Draws a bar.
|
static void |
drawBattleCursor(com.mojang.blaze3d.matrix.MatrixStack matrix,
boolean draw,
float x,
float y,
float z) |
static void |
drawBattleTimer(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.client.gui.screen.Screen gui,
int time)
Draws the battle timer on the screen.
|
static void |
drawCentered(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.client.gui.FontRenderer fontRenderer,
net.minecraft.util.text.ITextComponent text,
float x,
float y,
int color,
boolean dropShadow)
Draws text centered at a certain location.
|
static void |
drawCentered(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.util.text.ITextComponent text,
float x,
float y,
int color,
boolean dropShadow)
Draws text centered at a certain location.
|
static void |
drawCenteredLimitedString(com.mojang.blaze3d.matrix.MatrixStack matrix,
java.lang.String text,
float x,
float y,
int maxLength,
int color)
Draws text centered at a center point.
|
static void |
drawCenteredSplitString(com.mojang.blaze3d.matrix.MatrixStack matrix,
java.lang.String text,
float x,
float y,
int maxLength,
int color)
Draws text centered at a certain point.
|
static void |
drawCenteredSplitString(com.mojang.blaze3d.matrix.MatrixStack matrix,
java.lang.String text,
float x,
float y,
int maxLength,
int color,
boolean dropShadow)
Draws text centered at a certain point.
|
static void |
drawCenteredSquashedString(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.client.gui.FontRenderer fr,
java.lang.String text,
boolean unicode,
double widthFactor,
int x,
int y,
int color,
boolean shadow) |
static void |
drawCenteredSquashedString(com.mojang.blaze3d.matrix.MatrixStack matrix,
java.lang.String text,
boolean unicode,
double widthFactor,
int x,
int y,
int color,
boolean shadow) |
static void |
drawCenteredString(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.client.gui.FontRenderer fontRenderer,
net.minecraft.util.text.ITextComponent text,
float x,
float y,
int color,
boolean dropShadow) |
static void |
drawCenteredString(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.client.gui.FontRenderer fontRenderer,
java.lang.String text,
float x,
float y,
int color,
boolean dropShadow)
Draws text centered at a certain location.
|
static void |
drawCenteredString(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.util.text.ITextComponent text,
float x,
float y,
int color)
Draws text centered at a certain location.
|
static void |
drawCenteredString(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.util.text.ITextComponent text,
float x,
float y,
int color,
boolean dropShadow) |
static void |
drawCenteredString(com.mojang.blaze3d.matrix.MatrixStack matrix,
java.lang.String text,
float x,
float y,
int color)
Draws text centered at a certain location.
|
static void |
drawCenteredString(com.mojang.blaze3d.matrix.MatrixStack matrix,
java.lang.String text,
float x,
float y,
int color,
boolean dropShadow)
Draws text centered at a certain location.
|
static void |
drawCircle(com.mojang.blaze3d.matrix.MatrixStack matrix,
double x,
double y,
double z,
double d,
int segments,
java.awt.Color color) |
static void |
drawDialogueBox(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.client.gui.screen.Screen screen,
net.minecraft.util.text.ITextComponent name,
net.minecraft.util.text.ITextComponent chatText,
float zLevel)
Draws a chat box with the dialogue of an NPC.
|
static void |
drawDialogueBox(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.client.gui.screen.Screen screen,
java.lang.String name,
java.util.List<java.lang.String> chatText,
float zLevel)
Draws a chat box with the dialogue of an NPC.
|
static void |
drawDialogueBox(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.client.gui.screen.Screen screen,
java.lang.String name,
java.lang.String chatText,
float zLevel)
Draws a chat box with the dialogue of an NPC.
|
static void |
drawEllipse(com.mojang.blaze3d.matrix.MatrixStack matrix,
double x,
double y,
double z,
double w,
double h,
int segments,
java.awt.Color color) |
static void |
drawEntity(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.entity.LivingEntity ent,
int x,
int y,
float scale,
float rotationYaw,
float rotationPitch)
Draws an entity in the GUI.
|
static void |
drawGradientRect(com.mojang.blaze3d.matrix.MatrixStack matrix,
int left,
int top,
float zLevel,
int right,
int bottom,
int startColour,
int endColour)
Draws a gradient rectangle from top to bottom.
|
static void |
drawGradientRect(com.mojang.blaze3d.matrix.MatrixStack matrix,
int left,
int top,
float zLevel,
int right,
int bottom,
int startColour,
int endColour,
boolean horizontal)
Draws a gradient rectangle.
|
static void |
drawGradientRect(com.mojang.blaze3d.matrix.MatrixStack matrix,
int left,
int top,
float zLevel,
int right,
int bottom,
net.minecraft.util.math.vector.Vector4f startColour,
net.minecraft.util.math.vector.Vector4f endColour,
boolean horizontal)
Draws a gradient rectangle.
|
static void |
drawImage(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.util.ResourceLocation texture,
float x,
float y,
float width,
float height,
float zLevel) |
static void |
drawImage(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.util.ResourceLocation texture,
float x,
float y,
float width,
float height,
float r,
float g,
float b,
float a,
float zLevel) |
static void |
drawImage(net.minecraft.util.ResourceLocation texture,
com.mojang.blaze3d.matrix.MatrixStack matrix,
float x,
float y,
float width,
float height,
float zLevel) |
static void |
drawImage(net.minecraft.util.ResourceLocation texture,
com.mojang.blaze3d.matrix.MatrixStack matrix,
float x,
float y,
float width,
float height,
float r,
float g,
float b,
float a,
float zLevel) |
static void |
drawImageQuad(net.minecraft.util.ResourceLocation texture,
com.mojang.blaze3d.matrix.MatrixStack matrix,
float x,
float y,
float w,
float h,
float us,
float vs,
float ue,
float ve,
float zLevel)
Draws an image that is bound to the renderer.
|
static void |
drawImageQuad(net.minecraft.util.ResourceLocation texture,
com.mojang.blaze3d.matrix.MatrixStack matrix,
float x,
float y,
float w,
float h,
float us,
float vs,
float ue,
float ve,
float a,
float zLevel) |
static void |
drawImageQuad(net.minecraft.util.ResourceLocation texture,
com.mojang.blaze3d.matrix.MatrixStack matrix,
float x,
float y,
float w,
float h,
float us,
float vs,
float ue,
float ve,
float r,
float g,
float b,
float a,
float zLevel) |
static void |
drawImageQuadUV(net.minecraft.util.ResourceLocation texture,
com.mojang.blaze3d.matrix.MatrixStack matrix,
float x,
float y,
float w,
float h,
float us,
float vs,
float u,
float v,
float r,
float g,
float b,
float a,
float zLevel) |
static void |
drawInUnicode(java.lang.Runnable runnable)
Forces the runnable to run after setting unicode font to enabled
and then re-sets the unicode font after
|
static void |
drawItem(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.item.ItemStack stack,
float x,
float y,
int srcFactor,
int destFactor) |
static void |
drawItem(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.item.ItemStack stack,
float x,
float y,
int srcFactor,
int destFactor,
boolean darken) |
static void |
drawMoveset(com.mojang.blaze3d.matrix.MatrixStack matrix,
Moveset moveset,
int width,
int height,
float zLevel)
Draws a Pokémon's moveset on a move choosing screen.
|
static void |
drawPokemonHoverInfo(com.mojang.blaze3d.matrix.MatrixStack matrix,
Pokemon pokemon,
int x,
int y) |
static void |
drawPokemonInfoChooseMove(com.mojang.blaze3d.matrix.MatrixStack matrix,
PixelmonClientData pokemon,
int width,
int height,
float zLevel)
Draws Pokémon information when choosing one of its moves.
|
static void |
drawQuad(com.mojang.blaze3d.matrix.MatrixStack matrix,
float x1,
float y1,
float z1,
float x2,
float y2,
float z2,
float x3,
float y3,
float z3,
float x4,
float y4,
float z4,
java.awt.Color color) |
static void |
drawRectWithSemicircleEnds(com.mojang.blaze3d.matrix.MatrixStack matrix,
double x,
double y,
double z,
double w,
double h,
int segments,
java.awt.Color color)
Draws a coloured rect with semicircles attached to either end.
|
static void |
drawScaledCenteredSplitString(com.mojang.blaze3d.matrix.MatrixStack matrix,
java.lang.String text,
float x,
float y,
int color,
float fontSize,
int maxLength) |
static void |
drawScaledCenteredSplitString(com.mojang.blaze3d.matrix.MatrixStack matrix,
java.lang.String text,
float x,
float y,
int color,
float fontSize,
int maxLength,
boolean dropShadow) |
static void |
drawScaledCenteredString(com.mojang.blaze3d.matrix.MatrixStack matrix,
java.lang.String text,
float x,
float y,
int color,
float fontSize)
Draws text that is centered and scaled 8)
|
static void |
drawScaledImage(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.util.ResourceLocation texture,
float scale,
float x,
float y,
float width,
float height,
float r,
float g,
float b,
float a,
float zLevel) |
static void |
drawScaledSquashedString(com.mojang.blaze3d.matrix.MatrixStack matrix,
java.lang.String text,
float x,
float y,
int color,
float fontSize,
double widthFactor)
Draws text that is scaled and squashed
|
static void |
drawScaledSquashedString(com.mojang.blaze3d.matrix.MatrixStack matrix,
java.lang.String text,
float x,
float y,
int color,
float fontSize,
double widthFactor,
boolean unicode) |
static void |
drawScaledString(com.mojang.blaze3d.matrix.MatrixStack matrix,
java.lang.String text,
float x,
float y,
int color,
float fontSize)
Draws text that is scaled
|
static void |
drawScaledStringRightAligned(com.mojang.blaze3d.matrix.MatrixStack matrix,
java.lang.String text,
float x,
float y,
int color,
boolean dropShadow,
float fontSize)
Draws text that is aligned right.
|
static void |
drawScaledStringWithOutline(com.mojang.blaze3d.matrix.MatrixStack matrix,
java.lang.String text,
float x,
float y,
int color,
int outlineColor,
float fontSize,
float outline)
Draws text that is scaled and has an outline on each char
|
static void |
drawScoreboard(com.mojang.blaze3d.matrix.MatrixStack matrix,
int top,
ScoreboardJustification justification,
int x,
int alpha,
java.lang.String title,
java.util.Collection<java.lang.String> lines,
java.util.Collection<java.lang.String> scores)
Draws a scoreboard on the GUI.
|
static void |
drawSplitString(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.util.text.ITextComponent text,
int x,
int y,
int maxLength,
int color) |
static void |
drawSplitString(com.mojang.blaze3d.matrix.MatrixStack matrix,
java.lang.String text,
int x,
int y,
int maxLength,
int color) |
static void |
drawSquashedString(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.client.gui.FontRenderer fr,
net.minecraft.util.text.ITextComponent text,
boolean unicode,
float widthFactor,
float x,
float y,
int color,
boolean shadow) |
static void |
drawSquashedString(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.client.gui.FontRenderer fr,
java.lang.String text,
boolean unicode,
float widthFactor,
float x,
float y,
int color,
boolean shadow) |
static void |
drawStar(com.mojang.blaze3d.matrix.MatrixStack matrix,
double x,
double y,
double z,
double r1,
double r2,
int points,
boolean outline,
float r,
float g,
float b,
float a) |
static void |
drawString(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.client.gui.FontRenderer fr,
net.minecraft.util.text.ITextComponent text,
float x,
float y,
int color,
boolean dropShadow,
boolean unicode) |
static void |
drawString(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.client.gui.FontRenderer fr,
java.lang.String text,
float x,
float y,
int color,
boolean dropShadow)
Draws text.
|
static void |
drawString(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.client.gui.FontRenderer fr,
java.lang.String text,
float x,
float y,
int color,
boolean dropShadow,
boolean unicode) |
static void |
drawString(com.mojang.blaze3d.matrix.MatrixStack matrix,
net.minecraft.client.gui.FontRenderer fr,
java.lang.String text,
float x,
float y,
int color,
boolean dropShadow,
boolean unicode,
boolean centered) |
static void |
drawString(com.mojang.blaze3d.matrix.MatrixStack matrix,
java.lang.String text,
float x,
float y,
int color)
Draws text at a certain location.
|
static void |
drawString(com.mojang.blaze3d.matrix.MatrixStack matrix,
java.lang.String text,
float x,
float y,
int color,
boolean dropShadow)
Draws text.
|
static void |
drawString(com.mojang.blaze3d.matrix.MatrixStack matrix,
java.lang.String text,
float x,
float y,
int color,
boolean dropShadow,
boolean unicode) |
static void |
drawStringRightAligned(com.mojang.blaze3d.matrix.MatrixStack matrix,
java.lang.String text,
float x,
float y,
int color)
Draws text that is aligned right.
|
static void |
drawStringRightAligned(com.mojang.blaze3d.matrix.MatrixStack matrix,
java.lang.String text,
float x,
float y,
int color,
boolean dropShadow)
Draws text that is aligned right.
|
static void |
drawStringRightAligned(com.mojang.blaze3d.matrix.MatrixStack matrix,
java.lang.String text,
float x,
float y,
int color,
boolean dropShadow,
boolean unicode)
Draws text that is aligned right.
|
static void |
enableMinecraftUI() |
static void |
endSmoothDrawing(com.mojang.blaze3d.matrix.MatrixStack matrix) |
static void |
fill(com.mojang.blaze3d.matrix.MatrixStack p_238467_0_,
int p_238467_1_,
int p_238467_2_,
int p_238467_3_,
int p_238467_4_,
int p_238467_5_) |
static net.minecraft.client.renderer.IRenderTypeBuffer.Impl |
getBufferImpl() |
static net.minecraft.client.gui.screen.Screen |
getCurrentScreen() |
static PixelmonEntity |
getEntity(java.util.UUID pokemonUUID)
Finds the evolving Pokémon entity in the world.
|
static net.minecraft.client.gui.FontRenderer |
getFontRenderer(java.lang.String font,
boolean extendedColours)
Binds a new font renderer that renders strings using the specified font
|
static java.lang.String |
getLimitedString(java.lang.String text,
int maxLength)
Cuts off text with ellipses if it exceeds a certain length.
|
static int |
getLongestStringWidth(java.util.Collection<java.lang.String> lines)
Finds the width of the longest string in a collection of strings.
|
static int |
getLongestWidth(java.util.Collection<net.minecraft.util.text.ITextComponent> lines)
Finds the width of the longest string in a collection of strings.
|
static net.minecraft.util.ResourceLocation |
getPokemonSprite(PixelmonClientData pokemon,
net.minecraft.client.Minecraft mc) |
static net.minecraft.util.ResourceLocation |
getPokemonSprite(PokemonSpecification spec,
net.minecraft.client.Minecraft mc) |
static net.minecraft.util.ResourceLocation |
getPokemonSprite(Species species,
java.lang.String form,
Gender gender,
java.lang.String palette,
int eggCycles,
net.minecraft.client.Minecraft mc) |
static int |
getStringWidth(net.minecraft.util.text.ITextComponent text,
boolean unicode) |
static int |
getStringWidth(java.lang.String text) |
static int |
getStringWidth(java.lang.String text,
boolean unicode) |
static boolean |
isKeyDown(int key) |
static void |
prepareSmoothDrawing(com.mojang.blaze3d.matrix.MatrixStack matrix) |
static java.lang.String |
removeNewLine(java.lang.String string)
Removes a trailing newline character from a string.
|
static void |
render(net.minecraft.client.renderer.RenderType renderType,
com.mojang.blaze3d.matrix.MatrixStack matrix,
java.util.function.BiConsumer<com.mojang.blaze3d.matrix.MatrixStack,com.mojang.blaze3d.vertex.IVertexBuilder> toRender) |
static void |
renderPokemon(com.mojang.blaze3d.matrix.MatrixStack matrix,
PixelmonEntity pixelmon) |
static void |
renderPokemon(com.mojang.blaze3d.matrix.MatrixStack matrix,
PixelmonEntity pixelmon,
float r,
float g,
float b,
float a) |
static java.util.Optional<int[]> |
renderTooltip(com.mojang.blaze3d.matrix.MatrixStack matrix,
int x,
int y,
java.util.Collection<net.minecraft.util.text.ITextComponent> tooltipData,
int gradient1,
int background,
int alpha,
boolean centerBox,
boolean centerText)
Renders a tooltip on the screen.
|
static java.util.Optional<int[]> |
renderTooltip(com.mojang.blaze3d.matrix.MatrixStack matrix,
int x,
int y,
java.util.Collection<net.minecraft.util.text.ITextComponent> tooltipData,
int gradient1,
int background,
int alpha,
boolean centerBox,
boolean centerText,
float zLevel)
Renders a tooltip on the screen.
|
static java.util.Optional<int[]> |
renderTooltip(com.mojang.blaze3d.matrix.MatrixStack matrix,
int x,
int y,
int gradient1,
int background,
int alpha,
boolean centerBox,
boolean centerText,
java.lang.String... tooltipData)
Renders a tooltip on the screen.
|
static void |
setupOverlayRendering(com.mojang.blaze3d.matrix.MatrixStack matrix) |
static void |
simpleDrawImageQuad(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
float x,
float y,
float w,
float h,
float us,
float vs,
float ue,
float ve,
float zLevel) |
static java.util.List<java.lang.String> |
splitString(java.lang.String text,
int maxLength)
Splits a string by either a maximum length or a newline character.
|
static java.util.List<java.lang.String> |
splitString(java.lang.String text,
int maxLength,
boolean unicode) |
static java.lang.String |
splitStringToFit(java.lang.String s,
int font,
int width)
Splits a string to as many lines needed in order to lower it's width to the specified amount
|
static void |
switchFocus(int keyInt,
java.util.List<net.minecraft.client.gui.widget.TextFieldWidget> textFields)
Switches focus from one text field to the next sequentially when tab is pressed.
|
static void |
switchFocus(int keyInt,
net.minecraft.client.gui.widget.TextFieldWidget... textFields)
Switches focus from one text field to the next sequentially when tab is pressed.
|
static int |
toColourValue(float red,
float green,
float blue,
float alpha)
Converts RGBA color values from a 0-1 range into a single color value in a 0-255 range.
|
static java.lang.String[] |
trimStringToWidth(net.minecraft.client.gui.FontRenderer fr,
java.lang.String string,
int width)
Splits a string into multiple based on a width value given.
|
public static net.minecraft.client.gui.FontRenderer getFontRenderer(java.lang.String font, boolean extendedColours)
font
- The resource location of the font to useextendedColours
- Whether to use Pixelmon's extended colour font renderer or the vanilla font rendererpublic static void drawString(com.mojang.blaze3d.matrix.MatrixStack matrix, java.lang.String text, float x, float y, int color, boolean dropShadow)
matrix
- The MatrixStack context.text
- The text to draw.x
- The x coordinate of the right side of the text.y
- The y coordinate of the text.color
- The color of the text.dropShadow
- If the text has a shadow.public static void drawString(com.mojang.blaze3d.matrix.MatrixStack matrix, java.lang.String text, float x, float y, int color, boolean dropShadow, boolean unicode)
public static void drawString(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.client.gui.FontRenderer fr, java.lang.String text, float x, float y, int color, boolean dropShadow)
matrix
- The MatrixStack context.fr
- The FontRenderer to use.text
- The text to draw.x
- The x coordinate of the right side of the text.y
- The y coordinate of the text.color
- The color of the text.dropShadow
- If the text has a shadow.public static void drawString(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.client.gui.FontRenderer fr, java.lang.String text, float x, float y, int color, boolean dropShadow, boolean unicode)
public static void drawString(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.client.gui.FontRenderer fr, net.minecraft.util.text.ITextComponent text, float x, float y, int color, boolean dropShadow, boolean unicode)
public static void drawString(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.client.gui.FontRenderer fr, java.lang.String text, float x, float y, int color, boolean dropShadow, boolean unicode, boolean centered)
public static void drawInUnicode(java.lang.Runnable runnable)
runnable
- The executed codepublic static void drawStringRightAligned(com.mojang.blaze3d.matrix.MatrixStack matrix, java.lang.String text, float x, float y, int color)
text
- The text to draw.x
- The x coordinate of the right side of the text.y
- The y coordinate of the text.color
- The color of the text.public static void drawStringRightAligned(com.mojang.blaze3d.matrix.MatrixStack matrix, java.lang.String text, float x, float y, int color, boolean dropShadow)
text
- The text to draw.x
- The x coordinate of the right side of the text.y
- The y coordinate of the text.color
- The color of the text.dropShadow
- Whether to draw a shadow under the text.public static void drawStringRightAligned(com.mojang.blaze3d.matrix.MatrixStack matrix, java.lang.String text, float x, float y, int color, boolean dropShadow, boolean unicode)
text
- The text to draw.x
- The x coordinate of the right side of the text.y
- The y coordinate of the text.color
- The color of the text.dropShadow
- Whether to draw a shadow under the text.unicode
- Whether to use the Unicode font.public static void drawScaledString(com.mojang.blaze3d.matrix.MatrixStack matrix, java.lang.String text, float x, float y, int color, float fontSize)
text
- The text to draw.x
- The x coordinate of the right side of the text.y
- The y coordinate of the text.color
- The color of the text.fontSize
- The size of the text, 16 is normalpublic static void drawScaledCenteredString(com.mojang.blaze3d.matrix.MatrixStack matrix, java.lang.String text, float x, float y, int color, float fontSize)
text
- The text to draw.x
- The x coordinate of the right side of the text.y
- The y coordinate of the text.color
- The color of the text.fontSize
- The size of the text, 16 is normalpublic static void drawScaledStringWithOutline(com.mojang.blaze3d.matrix.MatrixStack matrix, java.lang.String text, float x, float y, int color, int outlineColor, float fontSize, float outline)
text
- The text to draw.x
- The x coordinate of the right side of the text.y
- The y coordinate of the text.color
- The color of the text.fontSize
- The size of the text, 16 is normaloutline
- Size of outlinepublic static void drawScaledStringRightAligned(com.mojang.blaze3d.matrix.MatrixStack matrix, java.lang.String text, float x, float y, int color, boolean dropShadow, float fontSize)
text
- The text to draw.x
- The x coordinate of the right side of the text.y
- The y coordinate of the text.color
- The color of the text.dropShadow
- Whether to draw a shadow under the text.public static java.lang.String splitStringToFit(java.lang.String s, int font, int width)
s
- The input stringfont
- The font size of the string (16 is normal)width
- The width that the string can not exceedpublic static void simpleDrawImageQuad(com.mojang.blaze3d.matrix.MatrixStack matrixStack, float x, float y, float w, float h, float us, float vs, float ue, float ve, float zLevel)
public static void drawImageQuad(net.minecraft.util.ResourceLocation texture, com.mojang.blaze3d.matrix.MatrixStack matrix, float x, float y, float w, float h, float us, float vs, float ue, float ve, float zLevel)
x
- The x coordinate of the left side of the image.y
- The y coordinate of the top of the image.w
- The width of the image.h
- The height of the image.us
- The horizontal component of the top-left corner of the texture.vs
- The vertical component of the top-left corner of the texture.ue
- The horizontal component of the bottom-right corner of the texture.ve
- The vertical component of the bottom-right corner of the texture.zLevel
- The z coordinate of the image.public static void drawImageQuad(net.minecraft.util.ResourceLocation texture, com.mojang.blaze3d.matrix.MatrixStack matrix, float x, float y, float w, float h, float us, float vs, float ue, float ve, float a, float zLevel)
public static void drawImageQuad(net.minecraft.util.ResourceLocation texture, com.mojang.blaze3d.matrix.MatrixStack matrix, float x, float y, float w, float h, float us, float vs, float ue, float ve, float r, float g, float b, float a, float zLevel)
public static void drawImageQuadUV(net.minecraft.util.ResourceLocation texture, com.mojang.blaze3d.matrix.MatrixStack matrix, float x, float y, float w, float h, float us, float vs, float u, float v, float r, float g, float b, float a, float zLevel)
public static void drawImage(net.minecraft.util.ResourceLocation texture, com.mojang.blaze3d.matrix.MatrixStack matrix, float x, float y, float width, float height, float zLevel)
public static void drawImage(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.util.ResourceLocation texture, float x, float y, float width, float height, float zLevel)
public static void drawImage(net.minecraft.util.ResourceLocation texture, com.mojang.blaze3d.matrix.MatrixStack matrix, float x, float y, float width, float height, float r, float g, float b, float a, float zLevel)
public static void drawImage(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.util.ResourceLocation texture, float x, float y, float width, float height, float r, float g, float b, float a, float zLevel)
public static void drawScaledImage(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.util.ResourceLocation texture, float scale, float x, float y, float width, float height, float r, float g, float b, float a, float zLevel)
public static void drawSquashedString(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.client.gui.FontRenderer fr, java.lang.String text, boolean unicode, float widthFactor, float x, float y, int color, boolean shadow)
public static void drawSquashedString(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.client.gui.FontRenderer fr, net.minecraft.util.text.ITextComponent text, boolean unicode, float widthFactor, float x, float y, int color, boolean shadow)
public static void drawCenteredSquashedString(com.mojang.blaze3d.matrix.MatrixStack matrix, java.lang.String text, boolean unicode, double widthFactor, int x, int y, int color, boolean shadow)
public static void drawCenteredSquashedString(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.client.gui.FontRenderer fr, java.lang.String text, boolean unicode, double widthFactor, int x, int y, int color, boolean shadow)
public static void bindPokemonSprite(Pokemon pokemon, net.minecraft.client.Minecraft mc)
public static net.minecraft.util.ResourceLocation getPokemonSprite(PixelmonClientData pokemon, net.minecraft.client.Minecraft mc)
public static net.minecraft.util.ResourceLocation getPokemonSprite(Species species, java.lang.String form, Gender gender, java.lang.String palette, int eggCycles, net.minecraft.client.Minecraft mc)
public static net.minecraft.util.ResourceLocation getPokemonSprite(PokemonSpecification spec, net.minecraft.client.Minecraft mc)
public static void drawScoreboard(com.mojang.blaze3d.matrix.MatrixStack matrix, int top, ScoreboardJustification justification, int x, int alpha, java.lang.String title, java.util.Collection<java.lang.String> lines, java.util.Collection<java.lang.String> scores)
top
- The y coordinate of the top of the scoreboard.x
- The x coordinate of the right side of the scoreboard.alpha
- The alpha component of the scoreboard's color.title
- The title text of the scoreboard.lines
- The text to display on the scoreboard.scores
- The scores to display on the scoreboard next to their corresponding lines.public static int getLongestStringWidth(java.util.Collection<java.lang.String> lines)
lines
- The collection of strings to get the longest width from.public static int getLongestWidth(java.util.Collection<net.minecraft.util.text.ITextComponent> lines)
lines
- The collection of strings to get the longest width from.public static java.lang.String[] trimStringToWidth(net.minecraft.client.gui.FontRenderer fr, java.lang.String string, int width)
fr
- The FontRenderer to use.string
- The string to split.width
- The width to split on.public static java.util.Optional<int[]> renderTooltip(com.mojang.blaze3d.matrix.MatrixStack matrix, int x, int y, int gradient1, int background, int alpha, boolean centerBox, boolean centerText, java.lang.String... tooltipData)
x
- The x coordinate of the tooltip.y
- The y coordinate of the tooltip.gradient1
- The color of the top of the tooltip.background
- The color of the tooltip's background.alpha
- The alpha value of the tooltip's background color.centerBox
- Whether to center the tooltip around the x coordinate.centerText
- Whether to center the text in the tooltip.tooltipData
- The text to draw on the tooltip.public static java.util.Optional<int[]> renderTooltip(com.mojang.blaze3d.matrix.MatrixStack matrix, int x, int y, java.util.Collection<net.minecraft.util.text.ITextComponent> tooltipData, int gradient1, int background, int alpha, boolean centerBox, boolean centerText, float zLevel)
x
- The x coordinate of the tooltip.y
- The y coordinate of the tooltip.tooltipData
- The text to draw on the tooltip.gradient1
- The color of the top of the tooltip.background
- The color of the tooltip's background.alpha
- The alpha value of the tooltip's background color.centerBox
- Whether to center the tooltip around the x coordinate.centerText
- Whether to center the text in the tooltip.zLevel
- The z pokemonLevel.public static java.util.Optional<int[]> renderTooltip(com.mojang.blaze3d.matrix.MatrixStack matrix, int x, int y, java.util.Collection<net.minecraft.util.text.ITextComponent> tooltipData, int gradient1, int background, int alpha, boolean centerBox, boolean centerText)
x
- The x coordinate of the tooltip.y
- The y coordinate of the tooltip.tooltipData
- The text to draw on the tooltip.gradient1
- The color of the top of the tooltip.background
- The color of the tooltip's background.alpha
- The alpha value of the tooltip's background color.centerBox
- Whether to center the tooltip around the x coordinate.centerText
- Whether to center the text in the tooltip.public static void drawString(com.mojang.blaze3d.matrix.MatrixStack matrix, java.lang.String text, float x, float y, int color)
text
- The string to draw.x
- The x coordinate of the start of the text.y
- The y coordinate of the start of the text.color
- The color of the text.public static int getStringWidth(java.lang.String text)
public static int getStringWidth(java.lang.String text, boolean unicode)
public static int getStringWidth(net.minecraft.util.text.ITextComponent text, boolean unicode)
public static void drawCenteredString(com.mojang.blaze3d.matrix.MatrixStack matrix, java.lang.String text, float x, float y, int color)
text
- The string to draw.x
- The x coordinate of the center of the text.y
- The y coordinate of the center of the text.color
- The color of the text.public static void drawCenteredString(com.mojang.blaze3d.matrix.MatrixStack matrix, java.lang.String text, float x, float y, int color, boolean dropShadow)
text
- The string to draw.x
- The x coordinate of the center of the text.y
- The y coordinate of the center of the text.color
- The color of the text.public static void drawCenteredString(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.util.text.ITextComponent text, float x, float y, int color, boolean dropShadow)
public static void drawCenteredString(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.client.gui.FontRenderer fontRenderer, java.lang.String text, float x, float y, int color, boolean dropShadow)
text
- The string to draw.x
- The x coordinate of the center of the text.y
- The y coordinate of the center of the text.color
- The color of the text.public static void drawCenteredString(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.util.text.ITextComponent text, float x, float y, int color)
text
- The string to draw.x
- The x coordinate of the center of the text.y
- The y coordinate of the center of the text.color
- The color of the text.public static void drawCenteredString(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.client.gui.FontRenderer fontRenderer, net.minecraft.util.text.ITextComponent text, float x, float y, int color, boolean dropShadow)
public static void drawCentered(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.util.text.ITextComponent text, float x, float y, int color, boolean dropShadow)
text
- The string to draw.x
- The x coordinate of the center of the text.y
- The y coordinate of the center of the text.color
- The color of the text.public static void drawCentered(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.client.gui.FontRenderer fontRenderer, net.minecraft.util.text.ITextComponent text, float x, float y, int color, boolean dropShadow)
text
- The string to draw.x
- The x coordinate of the center of the text.y
- The y coordinate of the center of the text.color
- The color of the text.public static void drawCenteredSplitString(com.mojang.blaze3d.matrix.MatrixStack matrix, java.lang.String text, float x, float y, int maxLength, int color)
text
- The text to draw.x
- The x coordinate of the center of the text.y
- The y coordinate of the center of the text.maxLength
- The maximum length of the text.color
- The color of the text.public static void drawCenteredSplitString(com.mojang.blaze3d.matrix.MatrixStack matrix, java.lang.String text, float x, float y, int maxLength, int color, boolean dropShadow)
text
- The text to draw.x
- The x coordinate of the center of the text.y
- The y coordinate of the center of the text.maxLength
- The maximum length of the text.color
- The color of the text.dropShadow
- Whether the text should cast a shadow.public static void drawCenteredLimitedString(com.mojang.blaze3d.matrix.MatrixStack matrix, java.lang.String text, float x, float y, int maxLength, int color)
text
- The text to draw.x
- The x coordinate of the center of the text.y
- The y coordinate of the center of the text.maxLength
- The maximum length of the text.color
- The color of the text.public static java.lang.String getLimitedString(java.lang.String text, int maxLength)
text
- The text to limit.maxLength
- The maximum length of the text.public static java.util.List<java.lang.String> splitString(java.lang.String text, int maxLength)
text
- The text to split.maxLength
- The maximum length of a line.public static java.util.List<java.lang.String> splitString(java.lang.String text, int maxLength, boolean unicode)
public static java.lang.String removeNewLine(java.lang.String string)
string
- The string to modify.public static void drawGradientRect(com.mojang.blaze3d.matrix.MatrixStack matrix, int left, int top, float zLevel, int right, int bottom, int startColour, int endColour)
left
- The x coordinate of the left side of the rectangle.top
- The y coordinate of the top of the rectangle.zLevel
- The z coordinate of the rectangle.right
- The x coordinate of the right side of the rectangle.bottom
- The y coordinate of the bottom of the rectangle.startColour
- The color of the top of the rectangle.endColour
- The color of the bottom of the rectangle.public static void drawGradientRect(com.mojang.blaze3d.matrix.MatrixStack matrix, int left, int top, float zLevel, int right, int bottom, int startColour, int endColour, boolean horizontal)
left
- The x coordinate of the left side of the rectangle.top
- The y coordinate of the top of the rectangle.zLevel
- The z coordinate of the rectangle.right
- The x coordinate of the right side of the rectangle.bottom
- The y coordinate of the bottom of the rectangle.startColour
- The color of the top of the rectangle.endColour
- The color of the bottom of the rectangle.horizontal
- True for left-to-right gradient, false for top-to-bottom gradient.public static void drawGradientRect(com.mojang.blaze3d.matrix.MatrixStack matrix, int left, int top, float zLevel, int right, int bottom, net.minecraft.util.math.vector.Vector4f startColour, net.minecraft.util.math.vector.Vector4f endColour, boolean horizontal)
left
- The x coordinate of the left side of the rectangle.top
- The y coordinate of the top of the rectangle.zLevel
- The z coordinate of the rectangle.right
- The x coordinate of the right side of the rectangle.bottom
- The y coordinate of the bottom of the rectangle.startColour
- The color of the top of the rectangle.endColour
- The color of the bottom of the rectangle.horizontal
- True for left-to-right gradient, false for top-to-bottom gradient.public static void drawBar(com.mojang.blaze3d.matrix.MatrixStack matrix, double x, double y, double width, double height, float percent, java.awt.Color color)
public static void drawBar(com.mojang.blaze3d.matrix.MatrixStack matrix, double x, double y, double width, double height, float percent, java.awt.Color color, boolean flip)
public static void drawBar(com.mojang.blaze3d.matrix.MatrixStack matrix, double x, double y, double width, double height, float percent, java.awt.Color color, java.awt.Color incomplete, boolean flip)
x
- The x coordinate of the bar.y
- The y coordinate of the bar.width
- The width of the bar.height
- The height of the bar.public static void drawRectWithSemicircleEnds(com.mojang.blaze3d.matrix.MatrixStack matrix, double x, double y, double z, double w, double h, int segments, java.awt.Color color)
x
- The x coordinate of the rect.y
- The y coordinate of the rect.z
- The z pokemonLevel of the rect.w
- The width of the rect.h
- The height of the bar.segments
- How many segments to use in the semicircles. More = higher detail, lower performance.color
- The color of the rect.public static void drawCircle(com.mojang.blaze3d.matrix.MatrixStack matrix, double x, double y, double z, double d, int segments, java.awt.Color color)
public static void drawEllipse(com.mojang.blaze3d.matrix.MatrixStack matrix, double x, double y, double z, double w, double h, int segments, java.awt.Color color)
public static void drawQuad(com.mojang.blaze3d.matrix.MatrixStack matrix, float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3, float x4, float y4, float z4, java.awt.Color color)
public static void prepareSmoothDrawing(com.mojang.blaze3d.matrix.MatrixStack matrix)
public static void endSmoothDrawing(com.mojang.blaze3d.matrix.MatrixStack matrix)
public static void drawEntity(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.entity.LivingEntity ent, int x, int y, float scale, float rotationYaw, float rotationPitch)
ent
- The entity to draw.x
- The x coordinate to draw the entity at.y
- The y coordinate to draw the entity at.scale
- The scale of the entity.rotationYaw
- The yaw of the entity.rotationPitch
- The pitch of the entity.public static void drawPokemonInfoChooseMove(com.mojang.blaze3d.matrix.MatrixStack matrix, PixelmonClientData pokemon, int width, int height, float zLevel)
pokemon
- The Pokémon to draw information for.width
- The width of the screen.height
- The height of the screen.zLevel
- The z coordinate to draw text at.public static void closeScreen()
public static void switchFocus(int keyInt, java.util.List<net.minecraft.client.gui.widget.TextFieldWidget> textFields)
keyInt
- The integer code of the key that was pressed.textFields
- The text fields to consider when switching, in order.public static void switchFocus(int keyInt, net.minecraft.client.gui.widget.TextFieldWidget... textFields)
keyInt
- The integer code of the key that was pressed.textFields
- The text fields to consider when switching, in order.public static void drawAttackInfoBox(com.mojang.blaze3d.matrix.MatrixStack matrix, float zLevel, int width, int height)
zLevel
- The z coordinate of the box.width
- The width of the screen.height
- The height of the screen.public static void drawAttackInfoList(com.mojang.blaze3d.matrix.MatrixStack matrix, Attack a, int width, int height)
a
- The attack to draw information about.width
- The width of the screen.height
- The height of the screen.public static void drawSplitString(com.mojang.blaze3d.matrix.MatrixStack matrix, java.lang.String text, int x, int y, int maxLength, int color)
public static void drawSplitString(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.util.text.ITextComponent text, int x, int y, int maxLength, int color)
public static void drawAttackInfoMoveset(com.mojang.blaze3d.matrix.MatrixStack matrix, Attack attack, int y, int width, int height)
attack
- The attack to draw info for.y
- The y coordinate of the attack description text.width
- The width of the screen.height
- The height of the screen.public static void drawMoveset(com.mojang.blaze3d.matrix.MatrixStack matrix, Moveset moveset, int width, int height, float zLevel)
moveset
- The Pokémon to draw a moveset for.width
- The width of the screen.height
- The height of the screen.zLevel
- The z coordinate to draw text at.public static int toColourValue(float red, float green, float blue, float alpha)
red
- The red component of the color.green
- The green component of the color.blue
- The blue component of the color.alpha
- The alpha component of the color.public static PixelmonEntity getEntity(java.util.UUID pokemonUUID)
pokemonUUID
- The UUID of the evolving Pokémon.public static void drawDialogueBox(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.client.gui.screen.Screen screen, java.lang.String name, java.util.List<java.lang.String> chatText, float zLevel)
screen
- The screen to draw the chat box on.name
- The name of the NPC.chatText
- The current dialogue of the NPC.zLevel
- The z pokemonLevel of the screen.public static void drawDialogueBox(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.client.gui.screen.Screen screen, net.minecraft.util.text.ITextComponent name, net.minecraft.util.text.ITextComponent chatText, float zLevel)
screen
- The screen to draw the chat box on.name
- The name of the NPC.chatText
- The current dialogue of the NPC.zLevel
- The z pokemonLevel of the screen.public static void drawDialogueBox(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.client.gui.screen.Screen screen, java.lang.String name, java.lang.String chatText, float zLevel)
screen
- The screen to draw the chat box on.name
- The name of the NPC.chatText
- The current dialogue of the NPC.zLevel
- The z pokemonLevel of the screen.public static void drawBattleTimer(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.client.gui.screen.Screen gui, int time)
gui
- The screen to draw on.time
- The current time on the timer.public static void drawPokemonHoverInfo(com.mojang.blaze3d.matrix.MatrixStack matrix, Pokemon pokemon, int x, int y)
public static void drawScaledCenteredSplitString(com.mojang.blaze3d.matrix.MatrixStack matrix, java.lang.String text, float x, float y, int color, float fontSize, int maxLength, boolean dropShadow)
public static void drawScaledSquashedString(com.mojang.blaze3d.matrix.MatrixStack matrix, java.lang.String text, float x, float y, int color, float fontSize, double widthFactor)
text
- The text to draw.x
- The x coordinate of the right side of the text.y
- The y coordinate of the text.color
- The color of the text.fontSize
- The size of the text, 16 is normalpublic static void drawScaledSquashedString(com.mojang.blaze3d.matrix.MatrixStack matrix, java.lang.String text, float x, float y, int color, float fontSize, double widthFactor, boolean unicode)
public static void drawScaledCenteredSplitString(com.mojang.blaze3d.matrix.MatrixStack matrix, java.lang.String text, float x, float y, int color, float fontSize, int maxLength)
public static net.minecraft.client.gui.screen.Screen getCurrentScreen()
public static void bindTexture(net.minecraft.util.ResourceLocation resourceLocation)
public static net.minecraft.client.renderer.IRenderTypeBuffer.Impl getBufferImpl()
public static void render(net.minecraft.client.renderer.RenderType renderType, com.mojang.blaze3d.matrix.MatrixStack matrix, java.util.function.BiConsumer<com.mojang.blaze3d.matrix.MatrixStack,com.mojang.blaze3d.vertex.IVertexBuilder> toRender)
public static void setupOverlayRendering(com.mojang.blaze3d.matrix.MatrixStack matrix)
public static boolean isKeyDown(int key)
public static void drawBattleCursor(com.mojang.blaze3d.matrix.MatrixStack matrix, boolean draw, float x, float y, float z)
public static void drawStar(com.mojang.blaze3d.matrix.MatrixStack matrix, double x, double y, double z, double r1, double r2, int points, boolean outline, float r, float g, float b, float a)
public static void fill(com.mojang.blaze3d.matrix.MatrixStack p_238467_0_, int p_238467_1_, int p_238467_2_, int p_238467_3_, int p_238467_4_, int p_238467_5_)
public static void renderPokemon(com.mojang.blaze3d.matrix.MatrixStack matrix, PixelmonEntity pixelmon)
public static void renderPokemon(com.mojang.blaze3d.matrix.MatrixStack matrix, PixelmonEntity pixelmon, float r, float g, float b, float a)
public static void disableMinecraftUI()
public static void enableMinecraftUI()
public static void drawItem(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.item.ItemStack stack, float x, float y, int srcFactor, int destFactor)
public static void drawItem(com.mojang.blaze3d.matrix.MatrixStack matrix, net.minecraft.item.ItemStack stack, float x, float y, int srcFactor, int destFactor, boolean darken)