* feat: implement boat placement
- add boat item handler for all boat/raft types
- raycast with fluid handling to place on water or blocks
- filter entities with can_hit predicate (vanilla parity)
- check space is empty before spawning
- decrement item unless creative mode
* feat: add boat entity with damage handling
- create BoatEntity struct implementing EntityBase
- implement can_hit() and is_collidable() for boats
- implement damage handling that drops boat item on destroy
- update boat item to spawn BoatEntity instead of generic Entity
* fix: boat damage wobble and attack sounds match vanilla
Boats now accumulate damage with wobble animation that decays over time.
Attack sounds play for all hittable entities, not just living entities.
* feat: add boat riding and vehicle movement packets
* feat: complete boat implementation matching vanilla
- add underwater check (60 ticks) and max 2 passengers limit
- add paddle animation metadata and handler
- implement proper land dismount with offset calculation
- add riding_cooldown field to entity
* fix: clippy warnings for boat implementation
* refactor: use loot tables for boat item drops
* fix: collapse nested if to satisfy clippy
* style: fix cargo fmt formatting for collapsible if
* fix: boat dismount places player correctly beside vehicle
- implement vanilla's dismount position calculation with
getDismountHeight, canDismountInBlock, and pose fallback
(standing → crouching → swimming)
- fix packet ordering race: use enqueue_packet for teleport so it
arrives after CSetPassengers (send_packet_now bypassed the queue)
- pre-set awaiting_teleport before CSetPassengers to block stale
movement packets during async dismount calculation
- send CSetPassengers directly to dismounting player, broadcast to
others (matching vanilla's targeted packet behavior)
- use DELTA|ROT position flags for teleport (vanilla preserves
current look direction with relative rotation)
- add riding cooldown (60 ticks) to prevent immediate re-mount
- reset sneaking state after player dismount
- fix water detection to check specifically for water/flowing_water
fluids (Fluid::from_state_id returns EMPTY for air blocks)
- revert broken loot table refactor for boat item drops (boats use
hardcoded entity-to-item mapping, not loot tables)
- add get_dismount_height helper on World matching vanilla's
BlockView.getDismountHeight()
- ignore movement packets while awaiting teleport confirmation in
handle_position and handle_position_rotation
* style: fix cargo fmt formatting
* refactor: use loot tables for boat item drops
add loot table entries to entities.json for all 20 boat/raft types
and use the existing loot table system instead of hardcoded mapping.
* fix: resolve rebase conflicts and clippy warnings
* fix: regenerate codegen to include boat loot tables
* feat: bat ai with roosting, flying, and damage wake-up
* fix clippy
* fix: bat ai improvements matching vanilla behavior
- Move velo.y dampening into travel_in_air via get_y_velocity_drag
- Set bat gravity to 0 (vanilla bat travel has no gravity)
- Fix on_damage firing before damage validation
- Remove unused caller param from post_tick (eliminates Arc clone)
- Add ambient idle sounds every 80 ticks
- Pre-validate flight targets to avoid water, lava, and hazards
- insert lighting into level_to_stage between full and features
- bump FULL_RADIUS from 2 to 3 to cover the full dependency chain
- bump MAX_LEVEL from 46 to 47 to accommodate the extra level
- remove redundant ready/missing_chunk requeue checks that caused the
cpu spin (the dag already guarantees these invariants)
- add missing send_change() calls in clean_up() and change_world() so
the scheduler is notified when chunk tickets are removed on player
disconnect or world change
* fix: replace oldest log file when log filename id has reached maximum
* fix formatting
* track oldest log file in single pass
* warn when overwriting existing log
* increase MAX_ATTEMPTS to 1000
* check every hitbox onplace block, not just player
* bounding_box
* refactor: use get_all_at_box for placement collision
* fix: use blocking entity rules for block placement
* entity_blocks_block_placement for player
* fix setting for flat world
* fix setting for flat world
* todo
* entity teleport
* yaw and pitch apply
---------
Co-authored-by: chocodev11 <chocodev11@users.noreply.github.com>
* feat: implement firework data components
* Fix: Cargo Fmt
* Fix: Update color to i32 and add color limits
* Fix: Check firework flight time is within NBT limit
* fix: cargo fmt
* fix: clippy
* feat: add cancellable PlayerInteractEntityEvent for plugin API
* feat: add cancellable PlayerInteractUnknownEntityEvent for plugin API
* feat: fire cancellable BlockPlaceEvent in block placement flow
* fix: add backticks to InteractAt in doc comments for clippy
* fix: improve level.dat deserialization for imported worlds
worlds from different minecraft versions could fail to load due to
strict field requirements and missing nbt type support. this makes
level.dat fields default to vanilla values when missing, handles
both string and compound generator settings, and fixes nbttag
deserialization for lists containing compound elements.
* style: run cargo fmt on world_info module
* fix(chunk): resend replaced chunk data at same position
* fix(clippy): simplify chunk resend dedupe check
* fix(chunk): dedupe by weak chunk identity
Track the block position of open container screens on the player and
close them when the underlying block is broken or exploded, preventing
ghost UIs and item duplication.
Closes#1512
* check every hitbox onplace block, not just player
* bounding_box
* refactor: use get_all_at_box for placement collision
* fix: use blocking entity rules for block placement
* entity_blocks_block_placement for player
---------
Co-authored-by: chocodev11 <chocodev11@users.noreply.github.com>
* feat: add redstone power support for fence gates
Fence gates now open/close in response to redstone power changes,
matching vanilla behavior. Also adds wood-type-specific sounds for
both manual and redstone-triggered toggling.
* fix: skip redundant set_block_state in fence gate neighbor update
Early return when redstone power state hasn't changed, avoiding
unnecessary world writes on every neighbor update.
* feat: make pumpkin colorful
* chore: use .to_string() instead of format!()
* chore: no from_legacy_string
* chore: make clippy happy
* chore: move some startup logs to a separate function
* fix: preserve protocol ordering for sound event IDs in codegen
The Sound enum variants were sorted alphabetically, causing every
sound ID sent via the protocol to mismatch the client's expected
registration order. Only sort the LOOKUP table for binary search;
keep enum variants in the original sounds.json order.
Closes#1532
* chore: regenerate sound.rs with protocol-correct ordering
* feat: replace hardcoded 'world' with actual dimension names
- Use dimension.minecraft_name in player removal logs
- Query protocol now returns actual world name (minecraft:overworld, etc.)
- Falls back to 'world' if no worlds are loaded
* fix: use actual world folder name instead of dimension name
* refactor: extract world name extraction to helper method
- 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
- Clamp sleep_percentage to 0..=100 range to handle invalid values
- Ensure at least 1 player must be sleeping (even when percentage is 0)
- Prevents night skip when nobody is sleeping with 0% setting
- Calculate required sleeping players based on configured percentage
- Use game_rules.players_sleeping_percentage from level info
- Ceil the result to ensure minimum required players
- Return false early if no players online