Commit Graph

581 Commits

Author SHA1 Message Date
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
Greened
1bd6eef2a4 feat: Implement TakeItemActor for bedrock (#2239)
* fix: only send TakeItem packet to tracking players. implement TakeItemActor packet for bedrock

* fix: clippy warnings

* feat: introduce macros for VarLong and VarULong

* chore: change source

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2026-06-06 16:10:51 +02:00
Demetrius Kanios
2de2bd43b1 fix: RakNet frame split threshold (#2198)
Signed-off-by: Demetrius Kanios <demetrius@kanios.net>
2026-06-06 09:15:42 +02:00
Alexander Medvedev
65bfbe89b9 feat: add packet receive and send events 2026-06-05 18:03:44 +02:00
Alexander Medvedev
f19eee2d70 fix: some bedrock fixes
also added join and leave translated messages
2026-06-04 20:54:48 +02:00
Matthieu B
e1c715b59b fix(bedrock): allow larger login payloads (#2206) 2026-06-04 10:26:28 +02:00
Nicolai Van der Storm
42f6b9ce3f fix(protocol): remap item/block state IDs and entity metadata for older Java clients (#2185)
* fix(protocol): remap item/block state IDs and entity metadata for older Java clients

The server was using reversed ViaVersion mappings (designed for old→new)
to downgrade packets for older clients, which produced ID collisions and
incorrect fallbacks for 26.1-exclusive items and block states.

Changes:
- Replace ViaVersion with ViaBackwards mapping files for item ID and
  block state remapping, which provide the correct new→old direction
  with proper closest-item fallbacks for 26.1-exclusive content
- Fix CSetEntityMetadata to remap ItemStack item IDs per client version,
  matching the version-aware handling already done for inventory packets
  and block state metadata
- Fix TrackedData codegen to resolve Java JSON keys correctly by trying
  both bare names and DATA_-prefixed names, and iterate the union of all
  version keys instead of only the latest (Bedrock) version
- Fix LootCondition::MatchTool to default to false instead of true,
  preventing silk-touch loot table branches from always winning and
  causing ores to drop themselves instead of their correct items

Fixes: block drops invisible on older Java clients
Fixes: leather showing as milk bucket on 1.21.11
Fixes: coal ore dropping coal ore instead of coal
Fixes: 26.1-exclusive blocks showing as wrong blocks on older clients

* fix(codegen): remove #[must_use] from trait impl methods in generated code

* fix(codegen): switch entity, sound and block state remapping to ViaBackwards mappings

---------

Co-authored-by: Missing_Love <42416195+Q2297045667@users.noreply.github.com>
2026-05-27 15:22:17 +02:00
Alexander Medvedev
3399f51671 feat(bedrock): add block update packet 2026-05-26 18:15:28 +02:00
Alexander Medvedev
fa5e07f8da feat(bedrock): add basic combat 2026-05-25 13:52:26 +02:00
Alexander Medvedev
e1967bed2b feat: bedrock & java cross play 2026-05-25 11:53:37 +02:00
Alexander Medvedev
d9312141f6 chore(net): don't run keep alive on player tick 2026-05-24 11:45:40 +02:00
Alexander Medvedev
3629f43dcc fix: disable cave carver for now
fixes some issues
2026-05-23 16:36:08 +02:00
Alexander Medvedev
3303bb7b97 chore(net): change get_string to get_str
changed return value from `String` to `Box<str>` which is smaller and makes more sense since we don't mutate packet data

String — 24 bytes (ptr + len + capacity)
Box<str> — 16 bytes (ptr + len)
2026-05-23 11:21:53 +02:00
Glory
8e7195c39e fix(commands): Impl support for transferring bedrock players with /transfer (#2167)
* impl /transfer support for bedrock players

* impl /transfer support for bedrock players

* fix formatting

* impl /transfer support for bedrock players

* impl /transfer support for bedrock players

* fix formatting

* Update pumpkin/src/command/commands/transfer.rs

Co-authored-by: Demetrius Kanios <demetrius@kanios.net>
Signed-off-by: Glory <89966094+gloryrunner@users.noreply.github.com>

* make suggested changes

* Disambiguate CTransfer imports (Java/Bedrock)

* run cargo fmt and clippy

* formatting

---------

Signed-off-by: Glory <89966094+gloryrunner@users.noreply.github.com>
Co-authored-by: Demetrius Kanios <demetrius@kanios.net>
2026-05-23 09:35:52 +02:00
Alexander Medvedev
2fcc9bcf4a chore: enforce some more clippy lints
pumpkin contributors will love me :cap:
2026-05-20 22:27:54 +02:00
Laptop59
7d15f6e7a1 feat(command): implement NBT argument types (#2164)
* nbt argument types

* added `get` methods

* renamed a few things

* moved both argument types to one `nbt.rs` file
2026-05-20 11:23:54 +02:00