## [1.3.0] — 2026-06-07
### Added
#### Entity binding
Attach a WebGUI interface to any entity. Players open it by right-clicking — no custom mod code required.
```mcfunction
/webgui bind entity @e[type=villager,limit=1,sort=nearest] https://example.com/shop
/webgui bind entity @e[type=villager,limit=1,sort=nearest] https://example.com/shop true
/webgui unbind entity @e[type=villager,limit=1,sort=nearest]
```
- Bindings persist in `config/webgui/entity_bindings.json` and survive server restarts
- `/webgui reload` now also reloads entity bindings
- Optional `cancel_interaction` flag suppresses vanilla behaviour (trade screen, horse inventory, etc.)
#### URL placeholders
Substituted at interaction time:
| Placeholder | Value |
|---|---|
| `{entity_id}` / `{entity_uuid}` | Entity UUID |
| `{entity_type}` | Namespaced type, e.g. `minecraft:villager` |
| `{player_name}` / `{player_uuid}` | The interacting player |
#### Entity context in the browser
When a GUI is opened via entity interaction, `window.webgui.entity` is populated automatically — `null` when opened via command. A `webgui:entity` CustomEvent fires on every change.
```ts
interface WebGUIEntity {
uuid: string
type: string // e.g. "minecraft:villager"
name: string // custom name if set, otherwise type display name
pos: { x: number; y: number; z: number }
}
```
#### Mod API
New methods in `WebviewApi` for use from other mods:
```java
WebviewApi.bindEntity(uuid, "https://example.com/shop?npc={entity_id}", true);
WebviewApi.unbindEntity(uuid);
WebviewApi.getEntityBinding(uuid); // Optional<EntityBinding>
```
Developer information
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle.
maven { name = "Modrinth"; url = "https://api.modrinth.com/maven" }