Commit Graph

1873 Commits

Author SHA1 Message Date
RB007
b3fc910579 fix: lava and fire behavior (#1509)
* fix: item burning (except netherite), proper lava damage, and eliminate ghost lava

* fix: soul fire damage

* fix: fire spreading behavior

* chore: clippy and formatting

* fix: add on_entity_step for magma block damage

* chore: clippy and formatting

* fix: remove item.rs edit and hardcode is_fire_immune for now

* fix: compare biome ids and restore a fn name

* fix: god mode gamerule hack

* feat: DamageResistantImpl

* refactor: remove campfire damage fixes

* refactor: shared fire collision fn

* fix: typos

* fix: i did now 💀

* fix: gamerule and fire resistance now prevent magma block damage

* fix: fire_damage gamerule only for players

* fix: better on_entity_step detection (block edges)

* fix: on_entity_step now fires with bool flag (for detection under non-solid blocks)

* fix: rip

* fix: infiniburn tags and damage

* fix: send_pos_rot

* fix: restore adjust_movement_for_collisions logic and fmt

---------

Signed-off-by: RB007 <36972202+RoosterBooster007@users.noreply.github.com>
2026-02-17 22:49:58 +00:00
Richard Marshall
b77d9c1b4d feat: complete boat implementation (#1440)
* 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
2026-02-17 19:47:49 +00:00
dependabot[bot]
1c4ea3a1d5 build(deps): bump crate-ci/typos from 1.43.3 to 1.43.4 (#1581)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.43.3 to 1.43.4.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crate-ci/typos/compare/v1.43.3...v1.43.4)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-version: 1.43.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-17 18:00:10 +00:00
Richard Marshall
ce46bf8e0e feat: creeper ai, explosion, and entity interaction (#1575)
* feat: add swim and wander around goals for creeper

* feat: implement creeper fuse countdown and explosion

* feat: add revenge goal and attacker tracking for mobs

* clean up code

* fix: mobs no longer target creative/spectator players

* feat: add creeper nbt persistence and swim depth check

* feat: flint and steel ignites creepers

* fix: creeper NBT parent call and attacker tracking ordering
2026-02-17 17:30:17 +00:00
Axillux
3a48274d7b Added russian and ukrainian translation (#1586)
* added russian and ukranian

* forgot to change the translation.rs

* remove the double pt_br parsing

---------

Co-authored-by: Rocker <sanatnurasyl@outlook.com>
2026-02-17 16:40:05 +00:00
Richard Marshall
9257b908a4 fix: waterlogged blocks not recognized as water sources (#1563)
* fix: waterlogged blocks not recognized as water sources by fluid system

* fix fmt
2026-02-17 16:03:14 +00:00
Richard Marshall
c0aea8cf07 feat: bat ai (#1580)
* 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
2026-02-17 15:50:55 +00:00
Richard Marshall
58fdb0c8ca fix: implement proper armor stand damage handling to match vanilla (#1574) 2026-02-17 15:13:46 +00:00
Greened
97951dfa48 fix: match campfires with vanilla logic (#1576)
* fix: match campfires with vanilla logic

* chore: remove redundant living entity check

* chore: simplify code

* fix: spelling
2026-02-17 13:14:50 +00:00
Richard Marshall
ad77d650d9 fix: resolve constant cpu core load after player join (#1541) (#1573)
- 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
2026-02-17 04:14:23 +00:00
RB007
fb0750c342 fix: inventory saving/loading (#1582)
* fix: inventory saving

* fix: potion NBT schema

* fix: firework NBT schema

* fix: different fireworks won't stack now

* chore: formatting

* fix: restore hopper TransferCooldown saving

* fix: use filter_map

* fix: firework duration default

* fix: proper is_dirty support

* fix: add clear_dirty overrides and remove double furnace mark_dirty
2026-02-17 03:17:54 +00:00
Sol ☆
ef9800020b fix: replace oldest log file when log filename id has reached maximum (#1565)
* 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
2026-02-17 03:16:09 +00:00
ChocoDev
15fbf8f03b fix: item drop velocity (#1584)
* fix: itemdrop velocity

* fix: entity fall velocity

* shared bounce logic

* no more bounce badie

---------

Co-authored-by: chocodev11 <chocodev11@users.noreply.github.com>
2026-02-17 02:23:00 +00:00
AnthonyDuong1
854d9cebf7 fix: creative drag of items and middle click in chests (#1585)
* fix: creative drag of items and middle click in chests should match vanilla now

* fix formatting check

* readded the min function
2026-02-17 01:31:10 +00:00
Richard Marshall
6e1bea72b7 fix: resolve multiple fluid flow bugs (#1561)
* fix: resolve multiple fluid flow bugs

- Fix from_state_id overlapping ranges so WATER/LAVA source blocks are
  correctly identified instead of always returning FLOWING variants
- Fix is_source always being false (was checking level==0 instead of is_still)
- Fix waterlogged blocks getting garbage fluid properties
- Fix lava receive_neighbor_fluids checking above instead of below
- Remove incorrect falling-to-non-falling quiescence guard in apply_spread
- Fix flow_to_sides TOCTOU by passing props from caller
- Add matches_type/same_fluid_type/to_flowing helpers for fluid type matching

* fix: check all 6 directions in lava receive_neighbor_fluids

Vanilla checks all directions (including Up) for water interaction.

* fix: clippy overlapping arm and redundant closure lints
2026-02-16 13:10:06 +00:00
ChocoDev
3f170e4922 fix: Entity really teleport instead only packet (#1556)
* 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>
2026-02-16 12:10:26 +00:00
Tyler Critchlow
74ecc3b2a5 dynamically set entity eye height (#1503) 2026-02-16 12:09:23 +00:00
PrintedScript
8433f05094 fix: prevent mobs from attacking when already dead (#1549) 2026-02-15 16:31:29 +00:00
Tyler Critchlow
11545cfe73 Prevent subtraction overflow in translation_to_pretty (#1511)
* Prevent subtraction overflow in `translation_to_pretty`

* build translation strings from parts instead of mutating in place
2026-02-15 16:24:39 +00:00
yunuservices
581437ee80 feat(worldgen): implement blender biome supplier hook (#1508)
* feat(worldgen): implement blender biome supplier hook

* refactor(worldgen): wrap biome supplier in blender hook
2026-02-15 16:23:36 +00:00
Ksawier Wilczynski
501eb25ec3 feat(fireworks): implement firework data components (#1548)
* 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
2026-02-15 16:20:26 +00:00
yunuservices
73fda66154 fix(chunk): add fallback when chunk ACK stalls (#1558)
* fix(chunk): add fallback when chunk ACK stalls

* ci: retrigger workflows after transient macOS rustup DNS failure

* fix(chunk): use saturating ACK batch counters

* fix(chunk): align entity ACK fallback behavior
2026-02-15 14:42:10 +00:00
Mikhail Reznichenko
3a9468d8ad feat: cobweb (#1560)
* feat: cobweb

* remove duplicate code
2026-02-15 14:21:15 +00:00
Richard Marshall
74e1cd1f5b feat: add plugin events for entity interaction and block placement (#1572)
* 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
2026-02-14 23:53:28 +00:00
Richard Marshall
a61238a498 fix: improve level.dat deserialization for imported worlds (#1568)
* 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
2026-02-14 15:11:28 +00:00
FabseGP
24ea53b2e9 feat: replace log with tracing (#1460)
* feat: replace log with tracing

* chore: clippy

* fix: revert replacing println!-calls

* fix: await async construct

* fix: lints + incorrect await

* fix: each plugin spawns their own tracing-subscriber

* fix: replace info! with println for commands

* chore: remove env_logger

* fix: added TODO about structured logging
2026-02-13 21:10:13 +00:00
Sean Yang
bb75b783fd feat: add trapped chest block entity with redstone power support (#1550)
* feat: add trapped chest block entity with redstone power support

* refactor: run cargo fmt

* refactor: remove duplicated chest logic using common impl

* fix: fix trapped chest redstone behavior for double chests and block updates

* fix(trapped_chest): remove extraneous double chest logic

* refactor(chest): abstract chest and trapped chest implementations with macros
2026-02-13 18:39:37 +00:00
yunuservices
cb60cbc86f fix(chunk): resend replaced chunk data at same position (#1544)
* fix(chunk): resend replaced chunk data at same position

* fix(clippy): simplify chunk resend dedupe check

* fix(chunk): dedupe by weak chunk identity
2026-02-13 13:42:40 +00:00
Richard Marshall
ba30b4e9a2 fix: close container screens when their block is destroyed (#1539)
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
2026-02-13 11:00:38 +00:00
Musawer
ab1926f3a9 Fixes #1513 (makes trapdoor placing more like vanilla and fixes it rotating incorrectly) (#1545)
* Optimize trapdoor facing logic

Refactored trapdoor facing logic to optimize direction handling based on player interaction.

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

* fix 

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

* another fix

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

* Add HorizontalFacingExt import to trapdoor.rs

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

* fix 

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

* fix

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

* fix again

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

* fix

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

* fix

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

* fix 

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

* Use HorizontalFacingExt for trapdoor 

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

* Refactor facing direction handling for trapdoor

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

* Improve facing logic in trapdoor.rs and hope that it passes the check's

Refactor trapdoor facing logic to use Option unwrap for better handling of directions.

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>

---------

Signed-off-by: Musawer <118316797+MusawerGaming@users.noreply.github.com>
2026-02-13 10:58:49 +00:00
Mikhail Reznichenko
0acb913775 fix: sweet berry bush collision (#1547)
* fix berry bush collision

* fix format

* fix fall distance

* rename function
2026-02-13 10:57:51 +00:00
ChocoDev
528d5b3945 fix: check every hitbox onplace block, not just player (#1494)
* 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>
2026-02-13 10:51:16 +00:00
Starless_Sky
a96eca4f19 feat: Custom Payload (#1536)
* added CCustom_Payload to player.rs 

added CCustom_Payload to the 
pumpkin_protocol::java::client::play:: 
list

Signed-off-by: Starless_Sky <108993627+xStarless-Skyx@users.noreply.github.com>

* Fire PlayerCustomPayloadEvent on play payload

Signed-off-by: Starless_Sky <108993627+xStarless-Skyx@users.noreply.github.com>

* Implement SCustomPayload decoding

Signed-off-by: Starless_Sky <108993627+xStarless-Skyx@users.noreply.github.com>

* Add CCustomPayload packet

Signed-off-by: Starless_Sky <108993627+xStarless-Skyx@users.noreply.github.com>

* Export custom payload packet

Signed-off-by: Starless_Sky <108993627+xStarless-Skyx@users.noreply.github.com>

* Add PlayerCustomPayloadEvent

Signed-off-by: Starless_Sky <108993627+xStarless-Skyx@users.noreply.github.com>

* Expose player_custom_payload event module

Signed-off-by: Starless_Sky <108993627+xStarless-Skyx@users.noreply.github.com>

* Fixed cargo fmt and clippy

* merged master  into branch

* fix(custom_payload): cap payload size and use shared bytes to reduce memory buildup

* resolved clippy -D warnings regression in custom payload event

* fixed Bytes::from(payload.data)

---------

Signed-off-by: Starless_Sky <108993627+xStarless-Skyx@users.noreply.github.com>
Co-authored-by: GabeGrundy <grundygabriel050@gmail.com>
2026-02-13 10:49:47 +00:00
yunuservices
582d46595e fix(chunk): prevent stale chunk_sent entries from blocking visibility (#1510)
* fix(chunk): prevent stale chunk_sent entries from blocking visibility

* fix(chunk): clear sent/queued state for client-unloaded chunks
2026-02-12 13:56:01 +00:00
ChocoDev
9f78d65c3f perf: packet encode, decode and compression (#1517)
* fix: protocol network optimize

* compression reuse and decoder payload

* revert risky lighting queue

* refactor: split observability and dedupe packet broadcast grouping

* remove log.workspace = true

* [expect]

* clippy

---------

Co-authored-by: chocodev11 <chocodev11@users.noreply.github.com>
2026-02-12 13:41:33 +00:00
Rorical
7d10824bff fix: resolve piston ghost blocks, block swapping, and retraction desync (#1535)
* fix: resolve piston ghost blocks, block swapping, and retraction desync

* fix: piston movability and observer detection during block finalization
2026-02-12 13:08:44 +00:00
Rorical
6eddc1723a feat: add redstone power support for fence gates (#1534)
* 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.
2026-02-12 13:07:24 +00:00
Mikhail Reznichenko
e438e09991 fix: collision (#1522)
* fix cactus collision

* use proper blocks_movement

* change collision check

* add atomic f32

* fix mistake
2026-02-12 00:24:12 +00:00
Greened
60c6332936 Make pumpkin console colorful (#1531)
* 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
2026-02-12 00:22:51 +00:00
Rorical
b22e66768a fix: preserve protocol ordering for sound event IDs (#1533)
* 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
2026-02-12 00:04:24 +00:00
Denys
a9c8ab5183 World names (#1521)
* 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
2026-02-11 21:57:28 +00:00
zicstardust
8995214eef feat: add pt_br translation (#1529) 2026-02-11 19:17:16 +00:00
Ashank Sundaram
ae3aba10de fix: align player pose resolution with vanilla to prevent crawl in-wall damage (#1464)
* fix: align player pose updates with vanilla for crawl suffocation (#1315)

* fix: align player pose resolution with vanilla tick flow
2026-02-11 17:08:47 +00:00
Richard Marshall
0513dde828 Merge pull request #1519 from denys-shatin/feature/player-samples
Player samples
2026-02-11 15:28:35 +00:00
Richard Marshall
cc8736ddba Merge pull request #1527 from denys-shatin/feature/sleep-percentage
Sleep Percentage
2026-02-11 15:01:48 +00:00
denys-shatin
67f65e1bbf refactor: extract sample rebuild logic and fix online count protection
- 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
2026-02-11 16:20:29 +02:00
denys-shatin
f8e0547809 fix: clamp sleep percentage and require at least 1 sleeping player
- 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
2026-02-11 15:52:54 +02:00
denys-shatin
ba40fcd915 feat: implement playersSleepingPercentage gamerule support
- 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
2026-02-11 15:23:20 +02:00
denys-shatin
380ed857d6 style: run cargo fmt 2026-02-11 15:20:02 +02:00
denys-shatin
f871b4cd6c refactor: remove redundant clone in player samples 2026-02-11 15:20:02 +02:00