Commit Graph

497 Commits

Author SHA1 Message Date
Alexander Medvedev
3c6f15d5eb fix: bedrock protocol version check 2026-04-26 19:45:22 +02:00
Alexander Medvedev
7a8f11b984 fix: https://github.com/Pumpkin-MC/Pumpkin/issues/2063
does not really fix the issue i guess, but at least you don't get the error anymore
2026-04-25 18:59:32 +02:00
Alexander Medvedev
cddb7e3f6a feat(plugin-api): allow to set tab header/footer 2026-04-20 14:06:37 +02:00
kubeerr
71cddd72bc feat(data-components): add StoredEnchantments (#2042)
* add StoredEnchantments

* small fixes

* undo whitespace in generated files

Signed-off-by: kubeerr <99330393+kubeerr@users.noreply.github.com>

---------

Signed-off-by: kubeerr <99330393+kubeerr@users.noreply.github.com>
Co-authored-by: kubeer <99330393+kubeer@users.noreply.github.com>
2026-04-19 18:08:00 +02:00
Laptop59
5627b182d6 fix: make 256-character limit apply on UTF-16 chars instead of bytes (#2003)
* changed check from 256 bytes to 256 UTF-16 chars

* removed bytes check & now using a more efficient check

* reworded comment

* now we first check for bytes, then read the string, then check for UTF-16 length

* formatted code
2026-04-19 09:38:38 +02:00
Alexander Medvedev
d048c33870 chore: prepare 1.20.5 2026-04-18 21:01:44 +02:00
Alexander Medvedev
e9423dcb9c chore: add encoder fuzzing
ofc nothing more :wink
2026-04-16 20:32:19 +02:00
ChocoDev
4bdc3d187b fix: recipe packet for < 26 clients (#2019)
* 1.21.11 slot display id

* add group+flag+itemstackslopdisplay to packet

---------

Co-authored-by: chocodev11 <chocodev11@users.noreply.github.com>
2026-04-15 12:23:36 +02:00
Alexander Medvedev
5e616a185e fix: ci 2026-04-12 21:41:57 +02:00
Alexander Medvedev
2c338f468c feat: add dragon ai
not perfect, bit buggy, but it works overall
2026-04-12 19:10:14 +02:00
RB007
a7ebad7eee feat: send all crafting recipes to players (#1999)
* feat: send all recipes to players

* chore: clippy and added config option
2026-04-10 19:17:35 +02:00
Alexander Medvedev
1d7c72ba5b fix: water swimming bug 2026-04-09 22:18:21 +02:00
Greened
83c60663f4 fix: empty command kick (#1814)
* fix: piston not  unextending

* chore: make clippy happy

* fix: empty command kick

* chore: oops

---------

Signed-off-by: Greened <108997309+GreenedDev@users.noreply.github.com>
2026-04-09 14:42:16 +02:00
Alexander Medvedev
413f7ccb16 feat: more plugin api features 2026-04-07 16:12:46 +02:00
Alexander Medvedev
3825ee2b28 fix: bedrock jwt error 2026-04-05 11:10:22 +02:00
Alexander Medvedev
5edd0e93df fix: https://github.com/Pumpkin-MC/Pumpkin/issues/1963 2026-04-04 09:23:47 +02:00
Alexander Medvedev
0656aec158 fix: some bugs 2026-04-03 18:35:34 +02:00
Alexander Medvedev
8a6698cd21 fix: 26.1 attack packet 2026-04-02 20:55:03 +02:00
Alexander Medvedev
c15ebf181d chore: more plugin api work
also added bedrock fuzzing
2026-04-01 19:37:01 +02:00
kedor
a11f40a403 chore: move ItemStack from pumpkin_world to pumpkin_data (#1944) 2026-03-31 10:08:41 +02:00
Alexander Medvedev
a111cf3f20 fix: < 26.1 Support 2026-03-31 09:44:08 +02:00
Alexander Medvedev
0635b048b5 Port to 26.1 2026-03-30 16:43:15 +02:00
HairlessVillager
974bdd98a6 chore: add license to Cargo.toml files (#1927) 2026-03-28 15:47:15 +01:00
Grooble
c6bf417773 fix: make some gamerules take effect, feat: ItemModel data components (#1849)
* feat: add ItemModel data component

* fix: advance_time gamerule now stops sun moving clientside

* fix(mob spawning): respect gamerules & difficulty

* feat(ItemModel): read from nbt

* feat: add Consumable data component, doesn't support consume effects yet

* feat(DataComponents): add Consumable consume effects & add Equippable

* fix: SoundEvent deserialization

* fix: duplicate import

* fix: rebase issues

* fix: SoundEvent deserialization

* fix: format and spelling
2026-03-24 08:56:49 +01:00
Laptop59
0b15f29f90 feat: integrate command dispatchers + reimplement /help (#1700)
* initial commit

* added more functions

* ported /help command to new dispatcher

* /? shows similar usage to /help instead of `-> help`

* fixed /help bugs

* change min limit in `read_boxed_slice` to 0 so that empty command (`/`) doesn't cause an error

* fixed clippy errors

* formatted

* added convenience for fetching world and server from context

* fixed `min` mistakes to `max` instead

* changed node to now store a list of predicates as its requirement (permission included)

* added easier way to register aliases

* prevent unauthorized usage of command when aliased

* added `TextComponent::empty()` to create empty text only for the purpose of adding children to it

* added more documentation

* make argument more obvious

* fixed some issues (not done yet)

* added more clarification in comments & docs

* fixed fn docs

* fixed order of arguments in translated error

---------

Signed-off-by: Alexander Medvedev <lilalexmed@proton.me>
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2026-03-19 17:17:57 +01:00
Alexander Medvedev
a0b8bbebfb Port bedrock to 1.26
still some bugs :c
2026-03-08 21:42:57 +01:00
Alexander Medvedev
004a41625f fix: https://github.com/Pumpkin-MC/Pumpkin/issues/1792 2026-03-08 21:39:26 +01:00
Alexander Medvedev
e125ca19be fix: fmt
oh bro ofc
2026-03-05 21:36:41 +01:00
Alexander Medvedev
7248f942e7 fix: latest rust clippy lints 2026-03-05 21:34:47 +01:00
Rotstein
bf52dabd77 feat: add Vanilla powder snow behaviour (#1743)
* Powder snow now has vanilla behavior

* Fix rustfmt in player freeze tick update

* Fix right click armor equip slot; powder snow vanilla

* Apply rustfmt to powder snow changes

* Fix clippy warnings in powder snow changes

* Fix clippy pedantic warnings
2026-03-03 19:16:04 +01:00
RB007
c40ac36a65 fix: some entity effects and attributes system (#1526)
* fix: several effects (ticking and instant)

* chore: clippy and formatting

* fix: optimize send_attribute_update calls and stored active_effects

* feat: add infested support

* feat: per-entity attributes system

* refactor: clean up living.rs and apply some fixes

* feat: attributes system, absorption, and health boost!

* chore: clippy and formatting

* chore: oof

* chore: installed typos lol

* fix: updated some default attributes

* fix: glowing and invisibility

* fix: imports and proper base_damage

* fix: remove effect damage dupe from try_attack

* fix: bat default attributes

* fix: silverfish default attributes

* fix: check local attribute base first

* Remove erroneous comment (near glowing effect removal)

forgot to remove this after copying the block from add_effect 💀

* fix: update other mob default attributes
2026-02-27 17:51:33 +01:00
とぴ。(おーけ
44989c86f4 feat: More compatible Java Edition versions (>=1.21) (#1435)
* 1.21.9

* 771: 1.21.6

* 770: 1.21.5

* 769: 1.21.4

* better impl

* missing data

* 768: 1.21.2

* added >=1.21.2 mapping

* impl abstract remapper.

* added entity_id remap

* fix commands packet (<1.21.6)

* fix 1.21.4 level_chunk_with_light

* fix reading packet

* fix sneak <=1.21.6

* Merge branch 'master' into protocol

* fixed `level_chunk_with_light` packet (<=1.21.4)

* 767: 1.21

* fixed `login_finished` packet (<=1.21.1)

* fixed `login` packet (<=1.21.1)

* fixed `player_position` packet (<=1.21.1)

* fixed `set_held_slot` packet (<=1.21.1)

* fixed `set_time` packet (<=1.21.1)

---------

Signed-off-by: とぴ。(おーけ <support@topi-banana.com>
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2026-02-23 12:06:37 +01:00
Alexander Medvedev
12acb8aa76 fix: CI 2026-02-22 16:42:41 +01:00
Alexander Medvedev
bc205d2683 feat: pumpkin-protocol: add fuzzing
actually found some issues
2026-02-22 15:24:36 +01:00
Alexander Medvedev
4afe60aca9 chore: i'm back 2026-02-21 20:52:37 +01:00
RB007
0ed3c8d9df fix: send proper dimension/timeline tag data (#1684) 2026-02-21 14:29:20 +01:00
Richard Marshall
b77d9c1b4d feat: complete boat implementation (#1440)
* feat: implement boat placement

- add boat item handler for all boat/raft types
- raycast with fluid handling to place on water or blocks
- filter entities with can_hit predicate (vanilla parity)
- check space is empty before spawning
- decrement item unless creative mode

* feat: add boat entity with damage handling

- create BoatEntity struct implementing EntityBase
- implement can_hit() and is_collidable() for boats
- implement damage handling that drops boat item on destroy
- update boat item to spawn BoatEntity instead of generic Entity

* fix: boat damage wobble and attack sounds match vanilla

Boats now accumulate damage with wobble animation that decays over time.
Attack sounds play for all hittable entities, not just living entities.

* feat: add boat riding and vehicle movement packets

* feat: complete boat implementation matching vanilla

- add underwater check (60 ticks) and max 2 passengers limit
- add paddle animation metadata and handler
- implement proper land dismount with offset calculation
- add riding_cooldown field to entity

* fix: clippy warnings for boat implementation

* refactor: use loot tables for boat item drops

* fix: collapse nested if to satisfy clippy

* style: fix cargo fmt formatting for collapsible if

* fix: boat dismount places player correctly beside vehicle

- implement vanilla's dismount position calculation with
  getDismountHeight, canDismountInBlock, and pose fallback
  (standing → crouching → swimming)
- fix packet ordering race: use enqueue_packet for teleport so it
  arrives after CSetPassengers (send_packet_now bypassed the queue)
- pre-set awaiting_teleport before CSetPassengers to block stale
  movement packets during async dismount calculation
- send CSetPassengers directly to dismounting player, broadcast to
  others (matching vanilla's targeted packet behavior)
- use DELTA|ROT position flags for teleport (vanilla preserves
  current look direction with relative rotation)
- add riding cooldown (60 ticks) to prevent immediate re-mount
- reset sneaking state after player dismount
- fix water detection to check specifically for water/flowing_water
  fluids (Fluid::from_state_id returns EMPTY for air blocks)
- revert broken loot table refactor for boat item drops (boats use
  hardcoded entity-to-item mapping, not loot tables)
- add get_dismount_height helper on World matching vanilla's
  BlockView.getDismountHeight()
- ignore movement packets while awaiting teleport confirmation in
  handle_position and handle_position_rotation

* style: fix cargo fmt formatting

* refactor: use loot tables for boat item drops

add loot table entries to entities.json for all 20 boat/raft types
and use the existing loot table system instead of hardcoded mapping.

* fix: resolve rebase conflicts and clippy warnings

* fix: regenerate codegen to include boat loot tables
2026-02-17 19:47:49 +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
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
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
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
RB007
8aeeacfbbc feat: lighting system and refactored chunk_system (#1431)
* refactor: chunk system

* feat: start of lighting engine (working cave lighting?)

* fix: all lighting working?

* chore: clean up

* chore: clippy and formatting

* fix: cross-chunk light propagation and light update packet added

* refactor: restore top-y and add reserve queue optimizations

* refactor: reduce locks, add shadow cache, and batch lighting updates

* fix: block lighting updates now work properly 🥳

* fix: sky lighting updates now work properly 🥳

* feat: lighting config value (default, full, dark)

* fix: import

* fix: re-calculate lighting if required and halt generation on server stop

* fix: smooth chunk saving

* feat: make chunk autosave configurable

* fix: chunks now unload?

* fix: "missing chunk" crash

* fix: receive_chunk hang

* fix: some unloading memory leaks and bugs; refactored lighting a bit

* refactor: simplify lighting propagation and engine

* chore: clippy and formatting

* fix: adherence to lighting config

* fix: sky light propagation

* fix: speed up light propagation

* fix: sky light issues

* chore: clippy and formatting

* fix: merge changes and fmt

* refactor: remove mem command

* fix: Cargo.toml
2026-02-09 19:15:40 +01:00
Alexander Medvedev
f60a77c5d9 chore: decrease compile time
Instead of parsing pumpkin-data for everyone who compiles lets have it as static files, pumpkin-codegen is a standalone parser now
2026-02-09 15:52:46 +01:00
chocodev11
6aa60248f6 formatting 2026-02-09 07:03:36 +00:00
chocodev11
48b3d679e0 velocity encode 2026-02-09 07:03:35 +00:00
chocodev11
3cbf788da4 velocity packet 2026-02-09 07:03:35 +00:00
ChocoDev
cef8a024e7 feat: BlockState Remaping (#1457)
* vn translation

* feat: blockstate remapping

* formatting cleanup

* damm dot

* damm comma

* fix: mapping 1.21.8 tracker

* fix: entity metadata

* formatting

* clippy

* fix: item id remap

* formatting
2026-02-08 14:24:16 +01:00
Alexander Medvedev
53803c5e94 feat: add infested blocks & silverfish spawn
ofc also includes a bunch of other things like i always do :D
2026-02-05 19:34:04 +01:00