Better Player Locator Bar is a Fabric mod. It shows players in a HUD bar above the XP bar. You can customize icons, borders, fades, and more.
🎯 Features
- HUD bar with icons representing nearby players and death markers
- Customizable icon style:
default,minimal,mojang,bowtie (shift + click) - Icon border styles:
roundedorsquared - Option to show player names and heads
- Vertical arrows when height difference is significant by player camera or position
- Distance-based fading (configurable start, end, alpha min/max)
- Smooth interpolation using easing
- Asset detection: scans included textures in
sprites/hud/ - Client/server sync via handshake and position payloads; fallback to local mode
- Config UI (
F8in game or useModMenu), preview, per-player overrides (color, icon, border...) - Death markers persistence and cleanup
📸 Gallery
A preview of how you would see other players with the mod
A preview of a player on the HUD
A preview of two players on the HUD
This would be a preview of the settings screen so you can customize it as much as you want
Now you can customize your friends icons
Dependencies
- Fabric API
- ModMenu
(recommended but opcional)
Installation
- Install Fabric Loader and Fabric API
- Place the
.jarmod file into yourmods/folder - Run Minecraft
Known Issues & Limitations
- Only works in Fabric, no Forge/NeoForge/... support
(yet? 🥀) - It can become inaccurate
- There may be rendering issues in other parts of the HUD
- You will most likely encounter problems with the order of the icons and the experience bar
- It is not possible to change the color of your dot/head
(yet...)
License
The contents of this repository and mod, are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. (Canonical URL)
All Versions
+ Add Version- Fixed some render issues and ordering
- Simplified code syntax
- Centralized methods
- Fixed render arrow mode
- Version: 1.1.0**
## Summary
Version 1.1.0 refactors the rendering architecture, introduces robust asset detection, improves client-server synchronization, adds death markers, enhances configuration capabilities, and fixes multiple bugs. Backwards compatibility with existing configs and use cases is preserved.
## Major Enhancements & Additions
### Rendering & Architecture
- Modular separation of rendering logic into:
RenderAddonsRenderUtilsTextureManagerTextureAnimator- Introduction of
AssetScanner: - Scans the resource manager for textures under
sprites/hud/ - Builds lists of available dot styles, arrow styles, icon borders, death marker types
- Caches texture dimensions to avoid repeated IO
- Death markers persistence:
Hud.deathMarkersstore marker data with timestamp and world position- Configurable limit of death markers
- Automatic cleanup of old or out-of-range markers
- Hybrid mode operation:
- Handshake with server to detect mod presence
- Fallback to local mode if server unresponsive beyond timeout (e.g.
SERVER_TIMEOUT_MS) - Per-player overrides:
- In config, allow per-player settings: color, icon style, border style
## Detailed Changes per Component
### Main / Mod Initialization
- Register payload codecs for
HandshakePayloadandPositionUpdatePayloadwithPayloadTypeRegistry - Initialize server module (
BetterPlayerLocatorBarServer) on common side - Add logging for handshake success/failure and mode switching events
### Client / Initialization
- On resource reload, call
AssetScanner.reload(...) - Instantiate
Hudand registerHudRenderCallback - In
ClientPlayNetworking, register receiver for handshake and position update - Track
lastServerUpdateTime; if exceeds threshold, switch to local mode
### HUD (BetterPlayerLocatorBarHud)
- Maintain maps:
playerPositionslastKnownPositionscurrentIconPositionslastPositionUpdateTimetick()andupdateRenderCache():- Filter players by distance and
maxVisibleIcons - Sort by closeness or priority if needed
- Easing & interpolation:
- If distance jump is large (e.g. > 75% of bar width), snap to target
- Else, advance position using
easeInOutQuad - Separate rendering methods:
renderPlayerIcon()renderDeathMarker()renderArrow()renderNameplate()- Hide logic:
shouldHideTarget()checks for sneaking, invisibility, helmet usage- Angle & FOV:
- Use
CONFIG.getFovMultiplier()to adjust icon horizontal shift - Alpha / fading:
calculateEdgeAlpha()andgetDistanceAlpha()for smooth fade near edges or by distance- Texture selection:
getAdjustedTextureIndex(distance, config)picks animation frame
### AssetScanner
- On
reload, checks for presence of each expected texture (dots, outlines, arrows, markers, tags) - Builds lists:
availableDots,availableArrows,availableDeathMarkers, etc. - Caches texture
## **UI & Visual Enhancements**
- Redesigned and improved **configuration screen**, offering a sleek and more intuitive interface.
- Custom widgets** inspired by Mojang's existing UI elements for a seamless and familiar experience.
- Fully **restyled icons**, delivering a modern and polished look.
## **HUD Improvements**
- Enhanced **HUD interaction**—visibility of XP bar icons now dynamically affects the overall interface behavior.
## **Performance & Code Optimization**
- Major **code refactoring** to ensure optimal performance and efficiency across all systems.
### Core Changes
- Added dual-mode operation (Server Mode and Local Mode)
- Implemented automatic handshake system for mod detection
- Added 5-second timeout for server updates before switching to local mode
### Network Improvements
- New payload registration system compatible with Minecraft 1.21 / 1.21.1
- Server now initiates handshake when players join
- Improved network efficiency with 2-tick update intervals
### Rendering Fixes
- Complete rendering logic overhaul
- Fixed player position sorting and display issues
- Improved handling of edge cases in both modes
### New Features
- Added server compatibility detection
- Configurable distance-based fading
- Automatic fallback to local detection when needed
### Bug Fixes
- Fixed all compilation errors from previous version
- Resolved variable scope conflicts
- Corrected player visibility checks
- Fixed timeout detection logic
### Configuration Updates
- Added new config options for fade distances
- Added force local mode option
- Maintained backward compatibility with old configs
### Optimizations
- Reduced network overhead
- Improved client-side caching
- Better connection state handling
### Known Issues
- Player visibility may still be limited on some servers in local mode
- Initial detection may take 1-2 seconds after joining
### Migration Notes
- Servers need v0.2.1 - BETA for full functionality
- Clients automatically handle fallback to local mode
- Existing configs remain compatible but gain new options
- Rounded icons** representing players.
- Dynamic colors** with join animations.
- Stylized borders** with smooth gradients.
- Smooth animations** using
lerp. - Height indicator** (arrow showing if a player is above or below).
- Progressive transparency** based on distance (fades at 100 blocks, nearly invisible at 5000).
- Option to display the player’s head** instead of a colored icon.
- Smooth movements** with interpolation.
- "Show Names" mode when pressing
Tab**. - Automatic adjustment of the experience and status bars** when interacting with the HUD.
- Real-time location tracking** of other players in the bar.
- Detect nearby players** without needing a minimap.
- Supports official and TL Skin skins**.
- Persistent data storage** for players outside render distance.
- Complete settings menu** (
F8). - Modify some of active functions**.
- Coming JSON configuration editor (Experimental and maybe not functional)**.
- HUD bar implementation above the experience bar.
- Player tracking system with position-based icon placement.
- Dynamic icon scaling based on distance and screen edges.
- Smooth animations for icon movement.
- Height difference indicators with arrows.
- Basic skin support (official skins only).
- Performance optimizations for real-time tracking.