Commit Graph

247 Commits

Author SHA1 Message Date
Alexander Medvedev
3792a6ce0b fix(bedrock): make nether/end work 2026-08-11 12:37:08 +02:00
ZlordHUN
4250293f42 fix: Bedrock NetherNet ICE connectivity (#2824)
* Fix Bedrock NetherNet ICE connectivity

* Fix NetherNet LAN connections

* Fix NetherNet ICE connectivity

* Fix duplicate Bedrock LAN advertisement

* Add NetherNet ICE diagnostics

* Trace outgoing NetherNet ICE packets

* Expand NetherNet connection diagnostics

* Fix clippy after rebase

* Fix oversized NetherNet login messages

* Remove direct async-trait dependency

---------

Co-authored-by: Zoltán Virágh <zoltan.viragh@cloudtalk.io>
2026-08-10 23:00:54 +02:00
Alexander Medvedev
1ee7be3f8c chore: add pumpkin_macros::translate_cross! macro
validates translations at compile time, also update bedrock translations to latest 26.40.5
2026-08-10 18:11:00 +02:00
Bjorn Beishline
ff57b6e282 feat(chunk): improve chunk generation speed ~1.27x (#2847)
* feat(noise): Add benchmark for noise generation

* feat(noise): fix extra noise libm calls

* feat(noise): cache density fill

* feat(aquifer): add skip sampling for aquifer
2026-08-09 12:04:28 +02:00
ZlordHUN
ffcf09ece4 chore: remove bedrock raknet (#2811)
* Remove legacy RakNet transport

* Replace RakNet status with NetherNet discovery

* Restore Bedrock server-list status

* Remove NetherNet LAN discovery

* Remove unused AES dependency
2026-08-07 20:00:41 +02:00
ZlordHUN
f2444bcefd feat(bedrock): update to 1.26.40 and add NetherNet transport (#2797)
* feat(bedrock): update to 1.26.40 and add NetherNet transport

* fix(bedrock): update remaining 1.26.40 packet schemas

* fix(bedrock): complete NetherNet and inventory migration
2026-08-07 08:34:10 +02:00
Alexander Medvedev
5d10c0d8a8 chore: use translations for ags 2026-08-05 21:10:50 +02:00
Alexander Medvedev
7350fba3b0 chore: chunk loading/saving move from serde to manual
should be faster now
2026-08-05 12:23:44 +02:00
Alexander Medvedev
9ececd9eca chore: add more chunk tests 2026-08-04 10:38:27 +02:00
Alexander Medvedev
db1678e16f fix: ci 2026-08-01 12:33:02 +02:00
Alexander Medvedev
e74a3d4dda feat: handle signed plugins 2026-08-01 12:29:26 +02:00
Alexander Medvedev
a2263c55cc chore: update bug report template 2026-07-30 12:55:41 +02:00
Alexander Medvedev
3103e97e18 ci: remove macos-15-intel 2026-07-24 12:31:57 +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
TheDarkSword
e480f32265 fix(pumpkin): stop entities from duplicating on chunk reload (#2342)
* fix(pumpkin): stop entities from duplicating on chunk reload

Entities lived in two places at once: the live World::entities list and the
serialized NBT in the entity chunk's data. On load the saved NBT was turned
into live entities but never cleared, and on unload each live entity was
appended back onto that still-populated list - so the persisted entity count
doubled every load/unload (reconnect) cycle. Freshly spawned entities hit the
same trap: add_entity_silent pushed their NBT into the chunk immediately, so
they were both live and serialized, doubling on the first unload too.

Make the live entity the single source of truth, matching vanilla:
- on load, take (clear) the chunk's serialized entities as they become live,
  and restore their persisted UUID so they keep their identity;
- a second watcher of an already-loaded chunk is sent spawn packets built from
  the live entities, not the stale NBT;
- entities are serialized fresh, from their current live state, only when their
  chunk unloads (save_entity);
- add_entity_silent no longer serializes on spawn.

Because the live entity is serialized fresh on unload, any change made to it
while loaded (health, effects, ...) is persisted automatically, without having
to be written back to the chunk data by hand.

* Move UUID int-array NBT helpers into pumpkin-nbt

Review feedback: the UUID read helper doesn't belong in world/mod.rs.
NbtCompound now has put_uuid/get_uuid for the vanilla 4-int-array
layout, used by both Entity::write_nbt and the entity chunk loader.
Serialized bytes are unchanged.
2026-07-11 18:59:37 +02:00
Alexander Medvedev
47fe060665 fix: rust 1.97 lints 2026-07-09 20:39:01 +02:00
Alexander Medvedev
c60fa90ed8 feat(bedrock): Add Protocol encryption 2026-07-04 15:01:42 +02:00
Alexander Medvedev
a9f69fea01 chore: enforce clippy lints in pumpkin-world 2026-07-03 18:51:47 +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
ZlordHUN
395c4aa36b feat(generation): implement ancient city jigsaw structures (#2329) 2026-07-01 09:11:47 +02:00
Alexander Medvedev
e9368fb80d fix: ci 2026-06-24 18:34:58 +02:00
Alexander Medvedev
461a5eb768 fix: ci 2026-06-22 20:09:55 +02:00
Alexander Medvedev
8ce76261ac feat(bedrock): add creative content 2026-06-19 18:52:50 +02:00
kedor
3b3ae983e4 feat: add saving/loading advancements (#2257)
* implementing the saving and loading advancements for the different players

* fix format
2026-06-12 16:39:11 +02:00
Alexander Medvedev
b4a652c68c fix: ci 2026-06-12 06:58:14 +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
Alexander Medvedev
65bfbe89b9 feat: add packet receive and send events 2026-06-05 18:03:44 +02:00
Alexander Medvedev
e1967bed2b feat: bedrock & java cross play 2026-05-25 11:53:37 +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
Alexander Medvedev
bd544271e2 feat: more loot table work 2026-05-22 22:23:47 +02:00
Alexander Medvedev
d47ac2cd51 feat(loot-table): add luck 2026-05-21 22:20:00 +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
Alexander Medvedev
4a4b72c83c chore(plugin-api): extend entity api 2026-05-17 19:46:57 +02:00
Alexander Medvedev
35b91efd38 chore(pumpkin-nbt): add fuzzing & benches 2026-05-17 10:17:52 +02:00
Alexander Medvedev
e707b31752 ci: remove unused dep 2026-05-16 21:38:37 +02:00
Alexander Medvedev
aad2e477d9 fix: CI 3 (hopefully) 2026-05-16 12:50:09 +02:00
Alexander Medvedev
966fbec3d3 feat(plugin-api): add java/bedrock abstraction 2026-05-16 09:56:18 +02:00
Alexander Medvedev
5aafff35e8 feat: add bedrock forms 2026-05-15 18:24:28 +02:00
SomeYellowGuy
f383c88c76 feat(codec): implement Encode and Decode for some pumpkin-util items and convenience codec macros (#2111)
* added identifier codec

* added codec impls for `Vector2<T>` and `Vector3<T>`

* added codec impl for `BlockPos`

* added codec impls for `BlockBox` and `EulerAngle`

* fixed formatting and clippy

* added `BlockPos` test

* fixed clippy and formatting

* fixed codec mapping macros and started using them in tests

* fixed formatting
2026-05-15 08:45:49 +02:00
Demetrius Kanios
d5026cb55e feat(plugin-api): Integrate wasmtime_wasi_http (#2128)
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2026-05-14 18:19:37 +02:00
Alexander Medvedev
92abb1e44e chore: less awaits more fun 2026-05-14 12:28:43 +02:00
Alexander Medvedev
60bfdf62db Revert a55c42c83 2026-05-10 12:13:33 +02:00
Alexander Medvedev
c23c7c429d feat(chunk-gen): add mob spawn step 2026-05-09 20:59:34 +02:00
Alexander Medvedev
45867d33e2 feat(plugin-api): initial packet api 2026-05-08 21:42:37 +02:00
Alexander Medvedev
5c90387b02 refactor: move block entities from pumpkin-world -> pumpkin 2026-05-07 19:35:17 +02:00
Alexander Medvedev
63d39f46d4 feat: add enchanting table 2026-05-06 22:29:29 +02:00
Laptop59
04874d4420 feat(command): implement SNBT parser (#2088)
* initial commit

* split snbt into modules

* formatted

* clippy warnings fixed

* added more rules

* applied clippy fixes

* added even more rules

* fixed clippy errors

* made all the required rules

* added some integer tests

* fixed clippy errors part 2

* finish up the last integer tests

* added float tests and some basic string tests

* quoted string literals

* `bool` operation tests done

* operation and maps

* fixed conflicts

# Conflicts:
#	pumpkin-nbt/src/tag.rs

* fixed clippy errors

* added message to `todo!()`

* fixed `indexmap` dependency for `pumpkin-codegen`

* fixed `typos` errors

* removed usage of `peek_byte()` for consistency

* removed useless macro

* moved some parser functions into a trait

* new translation changes
2026-05-05 10:41:27 +02:00
Alexander Medvedev
f683de2bf8 feat: require plugin permissions confirmation 2026-05-02 18:24:52 +02:00