Commit Graph

27 Commits

Author SHA1 Message Date
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
8a6698cd21 fix: 26.1 attack packet 2026-04-02 20:55:03 +02: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
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
FabseGP
24ea53b2e9 feat: replace log with tracing (#1460)
* feat: replace log with tracing

* chore: clippy

* fix: revert replacing println!-calls

* fix: await async construct

* fix: lints + incorrect await

* fix: each plugin spawns their own tracing-subscriber

* fix: replace info! with println for commands

* chore: remove env_logger

* fix: added TODO about structured logging
2026-02-13 21:10:13 +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
Alexander Medvedev
9435bbfb6a feat: add entity knockback & damage to Explosions
Not 100% vanilla accurate but better than nothing
2026-02-09 23:01:25 +01:00
Alexander Medvedev
835262a85a chore: move chunk gen settings from runtime to compile time parsing
Bin size decreased, Startup time decreased by a lot in debug, lower memory usage
2026-02-03 23:35:31 +01:00
とぴ。(おーけ
45aa815d68 chore: move static instances into Server struct (#1362)
* vanilla data container

* banned_ip_list

* banned_player_list

* operator_config

* whitelist_config

* permission_manager

* permission_registry

* plugin_manager
2026-01-26 14:47:33 +01:00
Alexander Medvedev
186ad2edea feat: 1.21.7-1.21.11 support
Its works, but block state ids are currently not mapped, meaning that when using the current default world gen the client mostly will disconnect due to a not found block state id, vanilla version compatible worlds should work
2026-01-25 23:08:28 +01:00
Alexander Medvedev
622d0599df chore: added gradient and rainbow to TextComponent
ofc did also a bunch of other things, the JavaClient implementation should be cleaner now and does not lock the player anymore
2026-01-25 16:41:46 +01:00
Alexander Medvedev
142296a9b2 feat: 1.21.9-1.21.11 support
more versions will come
2026-01-22 17:16:37 +01:00
Alexander Medvedev
ac021d5d47 chore: more work
- fixed nether again, not the dead lock or whatever it is but the server crash
- further replace Notify with CancellationToken
- fixed chunk loading on inital spawn
- more stronghold work
2026-01-21 23:08:56 +01:00
Alexander Medvedev
274c7e195d chore: don't spam so many packets
also use CancellationToken instead of Notify in some places
2026-01-21 00:22:13 +01:00
Clicks
70b3132396 chore: Remove Redundant Clippy Allows (#1247)
* switch to btreemap to comply with lint

* amplifier i32 -> u8

* switch allow to expect lint

* remove many many unnecessary clippy lints

* dont use expect inside quotes
2025-12-30 12:16:31 +01:00
とぴ。(おーけ
dbdbc04eb4 feat: switch to dynamic config (#1201)
* remove static BASIC_CONFIG

* remove static ADVANCED_CONFIG
2025-12-06 13:32:06 +01:00
Alexander Medvedev
03b3ff5e15 This should prevent some dead locks 2025-11-23 20:08:47 +01:00
Alexander Medvedev
c5c3ffc005 feat: add name tag logic 2025-08-22 12:09:30 +02:00
Connor
736f073b3c fix: Remove liftimes from CStatusResponse and CPlayerPosition (#1128)
* fix: Remove liftimes from CStatusResponse and CPlayerPosition

* fix: Add lifetimes to CachedBranding and fix tests

* fix: Remove lifetimes from CLoginDisconnect packet, data is dropped immediately after the packet is constructed

* fix: Apply formatting to packet_encoder.rs

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2025-08-22 09:57:55 +02:00
Alexander Medvedev
47254b14ba Structures: begin adding Nether Fortress 2025-08-18 17:59:14 +02:00
Alexander Medvedev
6e4a05d66d More Entity Physics work
Co-Authored-By: akashbeh <112662680+akashbeh@users.noreply.github.com>
2025-08-02 16:24:06 +02:00
unschlagbar
2e2236bf3b Bedrock player joining (#1063)
Co-authored-by: unschlagbar <adrian@kuhlmann@gmx.de>
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
Co-authored-by: unschlagbar <adrian@kuhlmann@gmx.de>
2025-07-26 17:31:00 +02:00
Alexander Medvedev
2f6c484b2b Protocol refactor (#1006)
* fixes

* Fixed missing ACKs (#1002)

* sefesf

* efrgf

* efes

---------

Co-authored-by: unschlagbar <adrian@kuhlmann@gmx.de>

* Refactor Protocol

* Add CStartGame

currently broken, i will try to fix it tomorrow

* fix start packet

* more bedrock (#1014)

* srgjtdrwa

* sgs

* reg

* rg

* rgth

* ef

* rfrgreg

---------

Co-authored-by: unschlagbar <adrian@kuhlmann@gmx.de>

* rename locations to position

---------

Co-authored-by: unschlagbar <153451111+unschlagbar@users.noreply.github.com>
Co-authored-by: unschlagbar <adrian@kuhlmann@gmx.de>
2025-07-06 15:43:53 +02:00
Alexander Medvedev
e2dec9b5e2 try to implement game packet 2025-07-01 19:44:21 +02:00
Alexander Medvedev
b5bc279527 fix CI try 2
:D
2025-06-29 09:20:19 +02:00
Alexander Medvedev
e0c91b3edc Initial Bedrock support
You can't join the World, But the base is ready
2025-06-29 00:33:44 +02:00