Commit Graph

2692 Commits

Author SHA1 Message Date
TheDarkSword
207185340a fix: persist item data components dropped on save (#2421)
* fix: persist item data components dropped on save

`DataComponentImpl::write_data` defaults to returning `NbtTag::End`, so any
component relying on that default serialized to nothing. `write_item_stack`
walks the component patch and calls `write_data` on every entry, which meant
those components were silently dropped whenever an item stack was written to
NBT (chests, player inventories, chunk saves). Most of them already had a
deserializer, so the data just vanished on the next save/load.

Implement `write_data` for the data-carrying components that were missing it:
MaxDamage, Enchantable, Food, Tool, BlockEntityData, Container and
BundleContents. For the ones without a deserializer yet (MaxDamage,
Enchantable, Food, Tool) add the matching `read_data` and register them in the
`read_data` dispatcher so they round-trip through write_item_stack/
read_item_stack. The output follows the vanilla NBT shape for each component.

Add round-trip tests for the scalar and compound cases.

* test: use the assert_round_trip helper
2026-08-19 07:39:38 +02:00
kedor
f4b5a00209 fix(command): fix try_flatten of ContextChain - #2987 (#2988)
* fixing try_flatten

* matching try_flatten from vanilla code

* fix cargo

* adding test
2026-08-19 07:37:31 +02:00
ZlordHUN
63275ac637 fix(bedrock): restore eating sounds (#2943)
* Fix Bedrock eating sounds

* Fix Bedrock eating sound handling

* Fix Bedrock actor event values
2026-08-19 07:34:17 +02:00
ZlordHUN
a481248994 fix(bedrock): one block crawling (#2933) 2026-08-19 07:33:35 +02:00
ZlordHUN
dc39800571 fix(bedrock): waterlog aquatic blocks (#2905) 2026-08-19 07:28:32 +02:00
ZlordHUN
f73052c85b feat: Add villager trading and professions (#2408) 2026-08-19 07:27:33 +02:00
Alexander Medvedev
5ef9648362 fix: ci 2026-08-18 22:19:13 +02:00
Demetrius Kanios
29bc796d62 refactor(bedrock): Add PacketWrite impl for NbtCompound (#2992) 2026-08-18 12:15:13 -07:00
ZlordHUN
72dd152484 Fix Java disconnects on Bedrock player join (#2962) 2026-08-18 12:02:10 -07:00
dependabot[bot]
95c42fe927 chore(deps): bump DeterminateSystems/nix-installer-action from 16 to 22 (#2979)
Bumps [DeterminateSystems/nix-installer-action](https://github.com/determinatesystems/nix-installer-action) from 16 to 22.
- [Release notes](https://github.com/determinatesystems/nix-installer-action/releases)
- [Commits](https://github.com/determinatesystems/nix-installer-action/compare/v16...v22)

---
updated-dependencies:
- dependency-name: DeterminateSystems/nix-installer-action
  dependency-version: '22'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2026-08-18 19:14:16 +02:00
Alexander Medvedev
ab60adb239 chore: much better tracked_data impl 2026-08-18 18:49:48 +02:00
Alexander Medvedev
5b833274d4 fix: pumpkin-plugin-utils 2026-08-18 15:46:30 +02:00
kedor
47ea95736a feat(command): add summon parameter for execute command and ressourceArgument (#2977)
* adding the summon argument to the execute commands

* fixing issue with the execute command and resources argument
2026-08-18 15:03:31 +02:00
Alexander Medvedev
423522f33e feat: chat spam prevention 2026-08-18 14:59:59 +02:00
Alexander Medvedev
2816d7162e chore: impl many ClientPacket traits 2026-08-17 17:21:36 +02:00
Alexander Medvedev
6c840de350 fix: nix flake 2026-08-17 12:33:05 +02:00
Alexander Medvedev
96cfde9091 fix: ci 2026-08-17 10:45:45 +02:00
Alexander Medvedev
b60f15a95e feat: add pumpkin-plugin-utils 2026-08-17 10:34:07 +02:00
Alexander Medvedev
14337d5285 chore: update pumpkin-plugin-wit submodule 2026-08-17 07:24:57 +02:00
ZlordHUN
cfef833394 Fix Bedrock use item transactions (#2965) 2026-08-16 14:26:23 -07:00
Alexander Medvedev
8ce513ff89 feat: more plugin features 2026-08-16 22:28:01 +02:00
ZlordHUN
4ec5eb8a45 fix(bedrock): NetherNet IP connections (#2968) 2026-08-16 14:40:20 +02:00
Alexander Medvedev
a72531a7c2 fix: chunk leak 2026-08-16 14:32:10 +02:00
Alexander Medvedev
c13c515081 feat(plugin-api): add entity attributes 2026-08-15 18:45:02 +02:00
Alexander Medvedev
0fe84c75d8 fix: ci 2026-08-15 16:30:25 +02:00
Alexander Medvedev
a2b92e6dc5 chore: some fuzz fixes 2026-08-15 13:35:14 +02:00
Noël Hagestein
6e94e6dfca feat(events): use TextComponent for ServerListPingEvent motd (#2912) 2026-08-15 10:26:01 +02:00
H4MM
3c8f537517 fix: lightning rod placement orientation (#2787)
Co-authored-by: Harryarry <htommeyer@mmail.com>
2026-08-15 10:19:19 +02:00
Maksas Gornostajus
635cea3852 fix(net): acknowledge block changes after handling each packet (#2940)
The block change acknowledgement was only sent from the keepalive timer,
so it went out at most once every 15s. Until it lands the client keeps
showing its own prediction for the block it interacted with and drops our
updates for that position.

Vanilla sends it at the end of the packet that carried the sequence, so
move it there.
2026-08-15 10:16:01 +02:00
ZlordHUN
f12b3602d8 fix(bedrock): stop bedrock players from flying after eating (#2928) 2026-08-15 10:13:01 +02:00
QiuHu
ff66c7fa2a fix(command): send success message after teleport (#2921)
* fix(command): send success message after teleport

All seven executors in teleport.rs performed the teleport but never sent a
feedback message to the command sender. Send the existing success
translation keys (entity/location, single/multiple) via sender.send_message.

Fixes #2920

* fix(command): elide needless lifetime in tp success helper

* fix(command): add bedrock translations for tp success message
2026-08-15 10:10:51 +02:00
Xavier horwood
ef3f7aeb0f fix(protocol): banned and whitelist message not showing to players (#2936) 2026-08-15 10:08:37 +02:00
Demetrius Kanios
c10341b80f refactor(bedrock): Move CActorEvent back to SActorEvent (#2949) 2026-08-15 00:05:38 -07:00
Alexander Medvedev
fc063c4dff feat: add missing events 2026-08-14 19:16:05 +02:00
Alexander Medvedev
f27e64afbf chore: add some more events 2026-08-14 15:58:16 +02:00
Bluezly
bd47c40708 fix(plugin): apply WASM packet event results (#2890)
Co-authored-by: Bluezly <Bluezly@users.noreply.github.com>
2026-08-14 13:04:06 +02:00
Megalith
251368c357 feat: implement bonemeal interactions (#2873) 2026-08-14 13:01:27 +02:00
Alexander Medvedev
e09e8c529a feat(plugin): add more block entity api stuff 2026-08-14 11:32:50 +02:00
Alexander Medvedev
00cb2f9240 feat(plugin): native bedrock features 2026-08-13 21:23:23 +02:00
Demetrius Kanios
e0d16c74f2 chore(protocol): Clean up Bedrock by using more derive (#2808) 2026-08-13 11:18:26 -07:00
Alexander Medvedev
0d5f868db6 chore: split packets into separate folders 2026-08-13 19:08:32 +02:00
ZlordHUN
05c692985f fix(bedrock): synchronize colored beds (#2917)
* fix(bedrock): synchronize colored beds

* refactor(bedrock): abstract bed block actor data
2026-08-13 18:21:35 +02:00
Andrew
ddd98c88d9 perf(pathfinder): use FxHashMap in compute_path (#2417)
The rest of the pathfinder already uses rustc-hash's FxHashMap/FxHashSet, but
compute_path's closed_set, the path-reconstruction visited set, and the
Navigator's path_type_overrides were still on the default SipHash hasher.
Switch them to FxHashMap/FxHashSet for consistency and to shave hashing off the
per-repath hot path. Keys are Vector3<i32>/PathType (small, internal). No new
dependency and no behavior change.
2026-08-13 18:14:13 +02:00
Mcxiaocaibug
e61517780a feat: add more dispenser behaviors (#2760)
Adds vanilla dispense behavior for snowballs, eggs, splash and
lingering potions, fire charges, wind charges, firework rockets,
empty and filled buckets, flint and steel (including priming TNT)
and honeycomb.

Refactors the player-path helpers (Ignition::ignite_block, bucket
pickup/placement, honeycomb waxing) so they can be reused without a
Player, and emits the wax-on world event for players as well.

Co-authored-by: Mcxiaocaibug <Mcxiaocaibug@users.noreply.github.com>
2026-08-13 18:08:40 +02:00
Megalith
cb856eb074 fix(block): apply vanilla position offsets to block shapes (#2869)
* fix: apply vanilla position offsets to block shapes

* refactor: use extracted block shape offsets
2026-08-13 18:06:22 +02:00
Alexander Medvedev
5a5bc19bbb feat: add some more entity logic 2026-08-13 17:28:56 +02:00
QiuHu
24d9dbdc6b fix(inventory): decode block-placement and swing hands via from_packet_id (#2876)
The placement and swing packet 'hand' fields use 0 = main hand, but they were
decoded with TryFrom<i32>, which maps 0 -> Hand::Left (that conversion is for
the client's dominant-hand setting). Hand::Left means off-hand in the inventory
API, so the decremented stack was written back to the off-hand instead of the
main hand, causing non-consumed placement and duplication into the off-hand.

Use Hand::from_packet_id for these packet fields and read the item via
inventory.get_stack_in_hand, matching the existing use_item handler.
2026-08-13 14:23:58 +02:00
Alexander Medvedev
a3ab25f53e chore: webrtc 2026-08-13 12:32:17 +02:00
Whiron
9fe599e261 fix: stop stdin console task on EOF (#2524)
Co-authored-by: Whiron <15068326+dnlblasco@users.noreply.github.com>
2026-08-13 10:51:22 +02:00
xRookieFight
c9a6c6a36a fix(world): do not tick entities while their chunk is not loaded (#2842) 2026-08-13 10:48:29 +02:00