PlayerAPIСкачатьСкачатьСкачатьСкачать
ВЕРСИИ (4)
release
PlayerAPI 1.8.0
1.8.07 мая 2026 г.454Minecraft: 1.21.11fabric
Что нового
## PlayerAPI — Patch Notes
---
#### New: `DisplayActions`
New class for showing in-game overlays without touching Minecraft internals directly.
- `showTitle(title, subtitle)` — shows a title and subtitle with default fade timing (10/70/20 ticks)
- `showTitle(title, subtitle, fadeIn, stay, fadeOut)` — same but with custom timing
- `showActionBar(message)` — shows text on the action bar above the hotbar
- All methods accept `§` colour codes
---
#### New: `BlockSnapshot` type
New immutable record representing a block in the world.
- Fields: `x`, `y`, `z`, `blockId` (e.g. `"minecraft:wheat"`), `blockState` (`Map<String, String>`)
- Helpers: `getState(String key)`, `hasState(String key)`, `stateEquals(String key, String value)`
---
#### `WorldInfo` — new methods
- `getNearbyEntitiesMatching(double radius, Predicate<EntitySnapshot>)` — filtered version of `getNearbyEntities`; avoids iterating the full list on the caller's side
- `getNearbyBlocks(double radius, String blockId)` — returns all blocks of a specific type within radius (sphere scan)
- `getNearbyBlocksMatching(double radius, Predicate<BlockSnapshot>)` — same but with a custom predicate
- `getEntityAtCrosshair()` → `Optional<EntitySnapshot>` — entity the player is currently looking at (uses the client crosshair raycast)
- `getBlockAtCrosshair()` → `Optional<BlockSnapshot>` — block the player is currently looking at
- `getEntityNbt(int entityId)` → `Map<String, String>` — reads top-level NBT values for a nearby entity; moderately expensive, do not call every tick
> **Bug fix:** `getNearbyEntities` and `getNearbyPlayers` were incorrectly passing `x`, `y`, `z` as
> separate arguments to `Box.of()` instead of `new Vec3d(x, y, z)`. The bounding box was being
> constructed with the wrong overload, causing entities to be missed or wrongly included. Now fixed.
---
#### `TabListInfo` — new methods
- `getAllLinesRaw()` — returns display name strings before formatting stripping (for inspecting raw style data)
- `findLinesWithPrefix(String prefix)` — returns **all** lines with the prefix, not just the first
- `findLinesContaining(String substring)` — case-insensitive substring search, returns all matches
- `parseKeyValueLines(String... prefixes)` — batch extracts multiple `"Key: Value"` pairs in one call
- `anyLineMatches(String regex)` — tests whether any tab list line matches a regex
- `isLineStrikethrough(String substring)` — returns `true` if the first line containing the substring has any segment with strikethrough styling applied; uses `Text.visit()` to walk the style tree (the only reliable method — `getString()` strips all formatting)
- `getPlayerUsernames()` — returns actual Minecraft account names (not display names) from the tab list
- `isPlayerOnline(String username)` — case-insensitive check for a player's presence
- `getPlayerCount()` — total number of entries in the tab list
---
#### `SoundActions` — new methods
- `playById(String fullSoundId, float volume, float pitch)` — plays any vanilla or registered sound by its string ID (e.g. `"entity.player.levelup"`); if no namespace is given, defaults to `minecraft:`
- `playRepeated(Identifier, float volume, float pitch, int times, int intervalTicks)` — plays a sound N times with a configurable tick gap between repeats
- `playRepeated(Identifier, float volume, float pitch, int times)` — same with the default 20-tick (1 second) interval
- `playByIdRepeated(String fullSoundId, float volume, float pitch, int times, int intervalTicks)` — string-ID convenience overload of `playRepeated`
---
#### New: Update checker
PlayerAPI now checks for newer releases on every world join and shows a single chat message if one is found. Nothing is downloaded automatically.
- Runs on a daemon thread so the network request never blocks the game thread
- Reads the `tag_name` field from the GitHub Releases API and compares it against the installed version using numeric segment comparison (handles both `v1.2.0` and `1.2.0` tag formats)
- Only fires the notification once per world join
- Silent on failure (network errors, offline, restricted networks)
- Can be disabled in the new config screen
---
#### New: `PlayerAPIConfig`
GSON-backed config singleton persisted to `config/playerapi/config.json`.
- `isUpdateCheckEnabled()` / `setUpdateCheckEnabled(boolean)` — controls the update check
- `load()` / `save()` — called automatically on world init and config screen close
---
#### New: Config screen
A YACL config screen with a single **Updates** tab containing the update check toggle.
Accessible from the ModMenu mods list if ModMenu is installed.
---
#### New: ModMenu integration
Implements `ModMenuApi` to add a **Config** button to PlayerAPI's entry in the ModMenu mods list.
ModMenu remains an optional dependency — PlayerAPI runs normally without it.
---
#### New dependencies
| Dependency | Type | Notes |
|---|---|---|
| `yet-another-config-lib` (YACL3) | Required | Needed for the config screen |
| `modmenu` | Optional | Adds the Config button to the mods list if present |
release
PlayerAPI 1.6.0
1.6.025 апр. 2026 г.38Minecraft: 1.21.11fabric
Что нового
Added method to notify other mods that a block was broken
release
PlayerAPI 1.5.0
1.5.01 апр. 2026 г.66Minecraft: 1.21.11fabric
release
PlayerAPI 1.1.0
1.1.023 мар. 2026 г.23Minecraft: 1.21.11fabric
Что нового
This is the first public release of this mod, even though it is version 1.1.0.