- Extract sample list building to build_sample_list() helper method
- Add guard to prevent double-counting in players.online
- Only increment online count if player is not already in samples
- Only decrement online count if player was actually in samples
- Prevents online count drift when add_player called multiple times
- Add `Sample` import from pumpkin_protocol for player sample representation
- Add `Uuid` import for player identification
- Add `MAX_SAMPLE_PLAYERS` constant set to 12 to limit sample size
- Add `player_samples` field to `CachedStatus` struct to track online players
- Implement player sample collection in `add_player` method with deduplication
- Implement player sample removal in `remove_player` method
- Update status response JSON with player samples on each change
- Replace TODO comments with functional implementation for player tracking
- Ensures server status response includes up to 12 player samples for clients
* updated documentations and applied a minor fix to resource_pack.rs config (suggested and autofixed by rustrover).
* fmt
Signed-off-by: Illyrius <fitimq@live.nl>
* init
Signed-off-by: Illyrius <fitimq@live.nl>
* fix unnecessary spaces
* Fix block-break flickering
Move CAcknowledgeBlockChange sending out of immediate per-player send into the world flush path so acknowledgements are enqueued and sent during world flush. world/mod.rs now iterates players to swap and enqueue CAcknowledgeBlockChange for any pending sequence. Also call update_sequence(...) in Java play handlers to update the player's packet sequence when handling player actions.
* thats better
* fix: typo
---------
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
* added StringReader and its errors
* fixed clippy errors in tests
* removed unnecessary '_ from &
* removed unnecessary `Box`
* removed Simple and Dynamic error types in favor of one struct and changed size of `TextComponent`
* formatted with `cargo fmt`
* fixed spelling error
* removed unnecessary (default) leftover from experimentation
* fix: jukebox now properly handles music discs (#568)
- Add JukeboxBlockEntity for disc storage and playback tracking
- Disc is removed from player inventory when inserted
- Disc drops when player right-clicks to retrieve it
- Disc drops when jukebox is broken
- Redstone power output (15 when playing, 0 otherwise)
- Comparator output varies per song (vanilla values 1-15)
- Playback auto-stops when song finishes
* refactor: use synced registries for jukebox song data
* replace indexmap with btreemap per clippy.toml policy
* fix import ordering for cargo fmt
* fix: copper chests and wooden shelves facing wrong direction
- add copper chest block IDs to ChestBlock handler
- create ShelfBlock handler for wooden shelf blocks
- fix get_horizontal_facing to use vanilla formula
- use runtime block ID lookup instead of compile-time macro
fixes#1318, fixes#1321
* refactor: use macros for block metadata and split copper chests
- replace manual blockmetadata impl with pumpkin_block macro for
chiseledbookshelfblock and shelfblock
- split chestblock into wooden-only chestblock and new copperchestblock
- implement vanilla-accurate copper oxidation with neighbor checking,
viewer detection, and weighted probability calculation
* revert: restore original tcp_listener initialization pattern
* revert: restore original tcp_listener pattern in lib.rs
Reverts the tcp_listener initialization back to the original
if-else expression pattern as requested in review.
---------
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>