Commit Graph

596 Commits

Author SHA1 Message Date
Alexander Medvedev
9ececd9eca chore: add more chunk tests 2026-08-04 10:38:27 +02:00
Alexander Medvedev
e1117ce4a6 chore: nicer event firing 2026-08-03 21:16:07 +02:00
Missing_Love
5eaf550a4c fix(core): fix skin metadata parsing and player info protocol version compatibility (#2525)
- Parse the `model` field for skin textures in `player.rs` to support the hat skin model
- Update `player_info_update.rs` to mask unsupported action flags based on the Minecraft version (e.g., ignore `UPDATE_LIST_PRIORITY` for versions prior to 1.21.2)
- Add the `UPDATE_HAT` flag in `world/mod.rs` and send it alongside `UPDATE_LIST_PRIORITY`
- Sync multi-version `tracked_data` JSON files to reflect the protocol changes

Signed-off-by: Missing_Love <42416195+Q2297045667@users.noreply.github.com>
2026-08-03 00:20:49 -04:00
Andbix
2577cfa3c9 feat(server): support F3+2 tick debug sample chart (#2636) 2026-07-29 19:59:08 +02:00
Jamie Little
ad31ce9889 fix: correct sound packet position encoding (was multiplied by 8 twice) (#2440)
CSoundEffect::new() scales the position by * 8 to convert from
fixed-point. write_packet_data was applying * 8 a second time,
resulting in positions being multiplied by 64.

Add regression test asserting the encoded X/Y/Z are exactly
floor(input_pos * 8), preventing this bug from reappearing.
2026-07-26 23:06:00 -04:00
Alexander Medvedev
faf8c50d80 chore(mappings): add 1.7 & 1.8 2026-07-25 16:48:20 +02:00
Alexander Medvedev
cba7578e28 feat: add Leash 2026-07-25 10:51:55 +02:00
Megalith
f676bdd222 fix(protocol): remap particle IDs for older clients (#2451)
* feat(protocol): generate particle ID remap tables

Generate version-specific particle registry mappings from the existing ViaBackwards data for every supported Java protocol version.\n\nExpose the generated remapper through pumpkin-data and enable it for pumpkin-protocol so packet serializers can translate current registry IDs for older clients.

* fix(protocol): remap explosion particles for older clients

Translate the explosion particle registry ID for each client's negotiated Java version before serializing the explode packet.\n\nWithout this remap, 1.21.11 interpreted the 26.2 explosion-emitter ID as falling dust, consumed the following bytes as particle data, and disconnected with a decoder exception. Add packet-level coverage for both 1.21.11 and 26.2 encodings.

* fix(protocol): remap particle IDs for older clients

Level-particle packets and particle entity metadata still encoded raw 26.2 registry IDs, causing older clients to decode the wrong particle schema and disconnect. Route every active outbound particle path through the version remapper, preserve metadata payloads, and cover 1.21.11 and 26.2 encodings with regression tests.
2026-07-24 18:14:18 +02:00
Alexander Medvedev
3103e97e18 ci: remove macos-15-intel 2026-07-24 12:31:57 +02:00
Alexander Medvedev
afbe839dea fix: https://github.com/Pumpkin-MC/Pumpkin/issues/2424 2026-07-20 11:42:20 +02:00
Alexander Medvedev
e0117ab559 perf: ditch serde because its slower
i rather trade performance and compile time over convenience
2026-07-19 18:07:37 +02:00
Alexander Medvedev
55219f870f fix: https://github.com/Pumpkin-MC/Pumpkin/issues/2233 2026-07-16 19:56:53 +02:00
Alexander Medvedev
21e7f1418a feat: show credits on exiting end 2026-07-15 20:50:13 +02:00
Alexander Medvedev
75d1bc5a88 feat(command): add dialog command 2026-07-14 14:08:57 +02:00
Alexander Medvedev
b1b2a31c49 fix: vanilla level.dat loading 2026-07-13 12:53:33 +02:00
Alexander Medvedev
af3376e68e feat: Implement missing data components 2026-07-11 11:04:51 +02:00
Missing_Love
3d03819411 feat(config): add broadcast-console-to-ops server property (#2285)
Add the `broadcast_console_to_ops` configuration option matching
vanilla's `broadcast-console-to-ops` server property. When set to
`false`, suppresses console and RCON command output from being
broadcast to online operators.

- Add `broadcast_console_to_ops` field to `CommandsConfig` (defaults
  to `true` for vanilla compatibility)
- Track the setting via an `AtomicBool` in the command module
- Replace hardcoded `true` in `should_broadcast_console_to_ops` for
  Console and RCON senders with the configurable value
- Initialize the setting during server startup from advanced config

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2026-07-10 13:29:05 +02:00
Alexander Medvedev
7ccb0c237f fix: https://github.com/Pumpkin-MC/Pumpkin/issues/2219 2026-07-09 22:02:15 +02:00
Alexander Medvedev
47fe060665 fix: rust 1.97 lints 2026-07-09 20:39:01 +02:00
Alexander Medvedev
339d9dde5b feat: add bedrock biome mappings 2026-07-08 17:30:55 +02:00
Alexander Medvedev
4ec2315aef chore: implement all missing raknet packets 2026-07-05 20:26:32 +02:00
Alexander Medvedev
c60fa90ed8 feat(bedrock): Add Protocol encryption 2026-07-04 15:01:42 +02:00
Niclas
0800ed8878 feat(plugin-api): add namespaced custom item data (#2324)
* feat(plugin-api): add namespaced custom item data

* modified: pumpkin-plugin-wit

* feat(plugin-api): add NBT custom item data

* fix(plugin-api): satisfy clippy for NBT tree conversion

* feat(plugin-api): add NBT custom item data

* test(plugin-api): use neutral custom data fixtures

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2026-07-04 09:50:06 +02:00
PigTurtle
7bfc6a6737 refactor(data) BlockId and BlockStateId wrapper types (#2328)
* refactor: less manual BlockMetadata impls

* refactor: added BlockId type

BlockId is a wrapper for u16: it is valid for any u16 that is the id of a Block.
- Changed the Block.id field type to BlockId
- added named BlockId constants
- BlockMetadata::ids() now returns Box<[BlockId]>
- adjusted pumpkin-macros to use BlockId constants
- fixed some methods that were comparing blockstate ids or item ids (u16) against block ids (previously u16)

TODO: check if unsafe blocks can be removed; The compiler might understand that BlockId is always a valid index into mappings::TYPE_FROM_RAW_ID

* refactor: added BlockStateId type

A BlockStateId is a safe wrapper around the numerical index of a BlockState in pumpkin-data. They help avoiding validity checks (outside of IO and, currently, plugins), and make it easier for other contributors to reason about what they're comparing; BlockStateIds, BlockIds or Item ids (still u16).
pumpkin-data::BlockStateId replaces RawBlockState and BlockStateId from pumpkin-world.

- added the BlockStateId wrapper type
- made (almost; plugins) every function interacting with block states or block state ids use the wrapper type
- changed codegen logic to create/work with BlockStateIds
- made ChunkPalette parsing check BlockStateId validity (pumpkin-world::chunk::format::ChunkSectionBlockStates)

TODO: check if unsafe blocks can be removed; The compiler might understand that BlockStateId is always a valid index into mappings::BLOCK_ID_FROM_STATE_ID and mappings::STATE_FROM_STATE_ID

* refactor: imports
changed every use pumpkin_world::BlockStateId to pumpkin_data::BlockStateId

* refactor: Block- & BlockStateId

finishing touches;
- rebased on latest mater
- ensure there are no bound checks on Block(State)Id conversions, making them extremely cheap
  - this required unsafe std::hint::assert_unchecked annotations because the compiler is (occasionally) stupid
  - on debug builds the bound checks still exist because of ub_checks (see rust unstable book for the feature of the same name)
- added Safety notes to hopefully prevent anyone from enabling the creation of invalid Block(State)Ids in the future

- fixed a benchmark
2026-07-01 18:05:05 +02:00
kedor
d8b7ae30a5 feat: add Seen advancement packet (#2326) 2026-07-01 13:21:45 +02:00
kedor
22c871ed9b fix(protocol): recipe book packet (#2318)
* fix recipe display to use itemStackTemplate parsing

* fix advancement packet
2026-06-30 19:13:16 +02:00
Alexander Medvedev
7ff990c468 fix: bedrock crafting 2026-06-29 21:20:40 +02:00
Alexander Medvedev
efa97ad174 fix: https://github.com/Pumpkin-MC/Pumpkin/issues/2283 2026-06-28 16:18:49 +02:00
Alexander Medvedev
8c5d6dc405 fix: bedrock SActorEvent packet 2026-06-28 13:26:32 +02:00
Alexander Medvedev
2f653f6336 feat: bedrock crafting 2026-06-27 22:16:21 +02:00
Alexander Medvedev
25048f5a6c fix: 2 bedrock packets 2026-06-27 17:44:55 +02:00
Alexander Medvedev
1dbfb75ecc fix: end spawning 2026-06-27 14:57:40 +02:00
kedor
39596c1b9f feat: Advancement command (#2282)
* starting implementing the advancement command

* implementing globally of the advancement command

* fixing lib.rs

* implementing the new Advancement argument and updating the AdvancementArgs lifetime

* updating wit by adding advancement as command arg

* cargo fmt

* fixing the advancement
hooking the saving
spawn blocking task for IO task

* fixing the update of load to be async

* adding await to load for a test

* fix when save is disable

* making save_enable check first

* fix conflict

* update hash

* fix wit change

* fix column_pos

* adding rust documentation

* typos fix

* removing example

* invalid advancement packet

* fix itemstack parsing to use ItemStack Template ones

* changing enum type from i32 to VarInt

* fix packet by switching up the frame type and flags

* fixing packet and loading of the advancement

* cargo clippy

* update wit
2026-06-26 09:23:54 +02:00
Niclas
2fa7a1829b fix(protocol): encode and decode renamed item names (#2301) 2026-06-25 17:44:11 +02:00
Niclas
849cb05e07 fix(world): persist end portal block entity data (#2294) 2026-06-25 17:36:18 +02:00
Alexander Medvedev
9055a6133e fix: respawn packet data 2026-06-24 21:12:27 +02:00
Alexander Medvedev
e9368fb80d fix: ci 2026-06-24 18:34:58 +02:00
Alexander Medvedev
d0d760de6a fix: bedrock 26.30 2026-06-24 18:03:08 +02:00
Alexander Medvedev
0c1cb25c05 feat: set camera for spectators 2026-06-22 17:57:36 +02:00
Alexander Medvedev
65fe9f0af0 feat: add bundles 2026-06-22 16:59:31 +02:00
Alexander Medvedev
ed8833d375 fix: ci 2026-06-21 21:58:59 +02:00
Alexander Medvedev
5f60d23804 feat: villager Professions 2026-06-21 21:54:10 +02:00
Alexander Medvedev
1509276b5c fix: ci
ofc
2026-06-20 20:15:13 +02:00
Alexander Medvedev
23e7992b2d Port to 26.2 2026-06-20 20:07:31 +02:00
Alexander Medvedev
8ce76261ac feat(bedrock): add creative content 2026-06-19 18:52:50 +02:00
Alexander Medvedev
68bae5899e feat: add stats 2026-06-12 20:55:29 +02:00
Alexander Medvedev
5b8eab0f56 feat: initial village support 2026-06-10 23:07:10 +02:00
Alexander Medvedev
b08be9e158 feat(bedrock): add container open 2026-06-07 21:12:16 +02:00
Alexander Medvedev
e47695d810 feat(bedrock): add item drops 2026-06-07 14:34:54 +02:00
Demetrius Kanios
2283048b9b feat(bedrock): Initial inventory setup (#2215)
* Initial asset prep, and `CItemRegistry` packet (vanilla; no Java fixes).

* Fix definition component NBTs.

* Packet fixes and dummy stick.

* Map actual player inventory & add stack UIDs

* Cleanup

* Update assets README
2026-06-07 07:59:06 +02:00