Skip to content

Render

block

Renders a block highlight at the specified position.

java
render.block(Vec3 position, int color, boolean outline, boolean shade);
render.block(int x, int y, int z, int color, boolean outline, boolean shade);

bloom

Applies a bloom shader to all renders between prepare and apply.

java
render.bloom.prepare();
// rendering code
render.bloom.apply(int passes, float radius);

blur

Applies a blur shader to all renders between prepare and apply.

java
render.blur.prepare();
// rendering code
render.blur.apply(int passes, float radius);

drawBeam

Draws an upwards beam at a position.

java
render.drawBeam(Vec3 position, double height, double radius, int color, float alpha);
render.drawBeam(double x, double y, double z, double height, double radius, int color, float alpha);

draw3DPolygon

Draws a wireframe polygon around a position.

java
render.draw3DPolygon(Vec3 position, double radius, int sides, double lineWidth, int color);
render.draw3DPolygon(double x, double y, double z, double radius, int sides, double lineWidth, int color);

entity

Renders an entity bounding box with optional outline and shade.

java
render.entity(Entity entity, int color, float partialTicks, boolean outline, boolean shade);

entityGui

Renders an entity model on the screen.

java
render.entityGui(Entity entity, int x, int y, float mouseX, float mouseY, int scale);

getFontHeight

Returns the height of the current font renderer.

java
int fontHeight = render.getFontHeight();

getFontWidth

Returns the width of the specified text.

java
int width = render.getFontWidth(String text);

getPosition

Returns the camera position as a Vec3.

java
Vec3 position = render.getPosition();

getRotations

Returns the camera rotations as [yaw, pitch].

java
double[] rotations = render.getRotations();

image

Renders an Image on screen.

java
render.image(Image image, float x, float y, float width, float height);

isInView

Returns true if the given bounding box is within the camera frustum.

java
boolean visible = render.isInView(Entity entity);
boolean visible = render.isInView(double minX, double minY, double minZ, double maxX, double maxY, double maxZ);

item

Renders an item stack on screen.

java
render.item(ItemStack stack, float x, float y, float scale);

line2D

Draws a 2d line on screen.

java
render.line2D(double startX, double startY, double endX, double endY, float lineWidth, int color);

line3D

Draws a 3d line between two points.

java
render.line3D(Vec3 start, Vec3 end, float lineWidth, int color);
render.line3D(double startX, double startY, double startZ, double endX, double endY, double endZ, float lineWidth, int color);

rect

Draws a solid rectangle on screen.

java
render.rect(float startX, float startY, float endX, float endY, int color);

roundedRect

Draws a rounded rectangle on screen.

java
render.roundedRect(float startX, float startY, float endX, float endY, float radius, int color);

text

Draws text on screen with optional scaling and shadow.

java
render.text(String text, float x, float y, float scale, int color, boolean shadow);

tracer

Draws a tracer line from the player to an entity or position.

java
render.tracer(Entity entity, float lineWidth, int color, float partialTicks);
render.tracer(Vec3 position, float lineWidth, int color, float partialTicks);
render.tracer(double x, double y, double z, float lineWidth, int color, float partialTicks);

worldToScreen

Projects a world position into screen space. Returns null if the point is not visible.

java
Vec3 screen = render.worldToScreen(Vec3 position, int scaleFactor, float partialTicks);
Vec3 screen = render.worldToScreen(double x, double y, double z, int scaleFactor, float partialTicks);