> For the complete documentation index, see [llms.txt](https://daikirai.gitbook.io/scripting/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://daikirai.gitbook.io/scripting/documentation/render.md).

# 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`](/scripting/documentation/vec3.md).

```java
Vec3 position = render.getPosition();
```

***

### getRotations

returns the camera rotations as `[yaw, pitch]`.

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

***

### getThemeRGB

returns the RGB color for the specified theme. uses the `Time multiplier` setting for color animation speed.

theme names are the same names returned by [`getSliderString`](/scripting/documentation/modules.md#getsliderstring) for theme sliders.

```java
int color = render.getThemeRGB(String theme);
```

***

### image

renders an [`Image`](/scripting/documentation/image.md) 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);
```
