Commit Graph

1863 Commits

Author SHA1 Message Date
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
denys-shatin
2d403557ea feat(connection_cache): implement player samples in server status
- 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
2026-02-11 15:20:02 +02:00
Richard Marshall
62c40dcaf9 Merge pull request #1491 from chocodev11/fix/velocity-1218-clean
fix: velocity packet 1.21.8
2026-02-11 11:53:17 +00:00
chocodev11
0efc05138c chore: mark legacy velocity encoder must_use 2026-02-11 11:09:54 +00:00
chocodev11
2ee194b190 fix: unify legacy velocity encoding for 1.21.8 2026-02-11 11:03:37 +00:00
Bjorn Beishline
e47c0fa574 fix: make ci not complain about unused function (#1525) 2026-02-11 08:50:33 +01:00
Alexander Medvedev
05763ea19c feat: add AI to more entities 2026-02-10 22:36:33 +01:00
vyPal
88a38f74be fix: Lock tracing-subscriber to version before ANSI escaping (#1516) 2026-02-10 21:25:38 +01:00
RB007
5a5b9e479f fix: totem behavior (#1500)
* fix: disable totem for void or /kill

* fix: fall damage with totem use

* fix: properly remove totem from inv

* chore: clippy and formatting
2026-02-09 23:06:23 +01:00
RB007
b0dfe19318 fix: fire loop/crash (#1502) 2026-02-09 23:05:46 +01:00
Alexander Medvedev
9435bbfb6a feat: add entity knockback & damage to Explosions
Not 100% vanilla accurate but better than nothing
2026-02-09 23:01:25 +01:00