Commit Graph

1826 Commits

Author SHA1 Message Date
denys-shatin
67f65e1bbf refactor: extract sample rebuild logic and fix online count protection
- Extract sample list building to build_sample_list() helper method
- Add guard to prevent double-counting in players.online
- Only increment online count if player is not already in samples
- Only decrement online count if player was actually in samples
- Prevents online count drift when add_player called multiple times
2026-02-11 16:20:29 +02:00
denys-shatin
380ed857d6 style: run cargo fmt 2026-02-11 15:20:02 +02:00
denys-shatin
f871b4cd6c refactor: remove redundant clone in player samples 2026-02-11 15:20:02 +02:00
denys-shatin
2d403557ea feat(connection_cache): implement player samples in server status
- Add `Sample` import from pumpkin_protocol for player sample representation
- Add `Uuid` import for player identification
- Add `MAX_SAMPLE_PLAYERS` constant set to 12 to limit sample size
- Add `player_samples` field to `CachedStatus` struct to track online players
- Implement player sample collection in `add_player` method with deduplication
- Implement player sample removal in `remove_player` method
- Update status response JSON with player samples on each change
- Replace TODO comments with functional implementation for player tracking
- Ensures server status response includes up to 12 player samples for clients
2026-02-11 15:20:02 +02: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
Bjorn Beishline
e47c0fa574 fix: make ci not complain about unused function (#1525) 2026-02-11 08:50:33 +01:00
Alexander Medvedev
05763ea19c feat: add AI to more entities 2026-02-10 22:36:33 +01:00
vyPal
88a38f74be fix: Lock tracing-subscriber to version before ANSI escaping (#1516) 2026-02-10 21:25:38 +01:00
RB007
5a5b9e479f fix: totem behavior (#1500)
* fix: disable totem for void or /kill

* fix: fall damage with totem use

* fix: properly remove totem from inv

* chore: clippy and formatting
2026-02-09 23:06:23 +01:00
RB007
b0dfe19318 fix: fire loop/crash (#1502) 2026-02-09 23:05:46 +01: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
1cf5ac603c replace discord link with https://discord.gg/pumpkinmc 2026-02-09 19:32:34 +01: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
roworu
93997a93e2 chore: update repo link for criterion (#1495) 2026-02-09 17:53:36 +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
Richard Marshall
7e277c0bfb fix: water flow not spreading correctly (#1459) (#1461) 2026-02-09 13:13:42 +01:00
yunuservices
5f13aa7d92 fix: avoid drop item lock inversion with screen handler (#1466) 2026-02-09 13:07:17 +01:00
RB007
ac9581f18e fix: void damage (#1488)
* fix: players now take void damage

* chore: clippy and formatting
2026-02-09 12:24:36 +01:00
dependabot[bot]
a0e96ab040 build(deps): bump crate-ci/typos from 1.42.3 to 1.43.3 (#1487)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.42.3 to 1.43.3.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crate-ci/typos/compare/v1.42.3...v1.43.3)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-version: 1.43.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-09 11:17:43 +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
Alexander Medvedev
b0ab5006ca chore: remove unused deps
also apply some clippy lints in some places
2026-02-09 00:07:39 +01:00
vyPal
8b6c8bbee6 feat: Basic pathfinder impl from vanilla (#1456)
* Basic pathfinder impl from vanilla

* Satisfy clippy

* Forgot to save

* Fix compilation issues

* Finally fix clippy

* implement swing

* fix pathfinder a* algorithm, mob look system, and rotation packets

* fix cargo fmt

* implement zombie melee attack, fix a* target-reached threshold

* fix cargo fmt

* physics-based mob movement, position sync, and speed fixes

* fix mob step height

* made TargetPredicate more complete

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
Co-authored-by: Purdze <r.s.sutton@hotmail.co.uk>
2026-02-08 21:14:30 +01: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
Illyrius
8015b73882 typo: docs/pumpkin-macros (#1451)
* updated documentations and applied a minor fix to resource_pack.rs config (suggested and autofixed by rustrover).

* fmt

Signed-off-by: Illyrius <fitimq@live.nl>

* init

Signed-off-by: Illyrius <fitimq@live.nl>

* fix unnecessary spaces
2026-02-08 14:12:53 +01:00
Illyrius
473bd5a57c chore(docs): docs/pumpkin-api-macros (#1450)
* updated documentations and applied a minor fix to resource_pack.rs config (suggested and autofixed by rustrover).

* fmt

Signed-off-by: Illyrius <fitimq@live.nl>

* docs

Signed-off-by: Illyrius <fitimq@live.nl>

* fix unnecessary spaces

---------

Signed-off-by: Illyrius <fitimq@live.nl>
Signed-off-by: Illyrius <28700752+illyrius666@users.noreply.github.com>
Co-authored-by: Illyrius <fitimq@live.nl>
2026-02-08 14:11:40 +01:00
Alexander Medvedev
dcda0d6f56 add /pl as a shortcut for /plugins
won the poll on discord
fixes https://github.com/Pumpkin-MC/Pumpkin/issues/1277
2026-02-08 13:32:19 +01:00
Alexander Medvedev
e45ab613f4 chore: parse translations at compile time
not finished but its much safer and nicer now
2026-02-08 13:22:36 +01:00
Bjorn Beishline
abe01f3019 bench: Add generate single chunk (#1454) 2026-02-08 10:36:32 +01:00
Brave
d6b4d2e8b2 fix: block-break flickering (#1453)
* Fix block-break flickering

Move CAcknowledgeBlockChange sending out of immediate per-player send into the world flush path so acknowledgements are enqueued and sent during world flush. world/mod.rs now iterates players to swap and enqueue CAcknowledgeBlockChange for any pending sequence. Also call update_sequence(...) in Java play handlers to update the player's packet sequence when handling player actions.

* thats better

* fix: typo

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2026-02-07 23:25:04 +01:00
Laptop59
3e82875e4f feat: add string reader from Brigadier and its errors (#1427)
* added StringReader and its errors

* fixed clippy errors in tests

* removed unnecessary '_ from &

* removed unnecessary `Box`

* removed Simple and Dynamic error types in favor of one struct and changed size of `TextComponent`

* formatted with `cargo fmt`

* fixed spelling error

* removed unnecessary (default) leftover from experimentation
2026-02-07 21:52:45 +01:00
Alexander Medvedev
b1f62f3cd9 chore: remove not needed dep 2026-02-07 16:53:54 +01:00
Alexander Medvedev
fd1b968ae6 chore: switch from simplelog to tracing 2026-02-07 16:51:56 +01:00
Illyrius
6c7c0a4cc5 chore(pumpkin-config): add more docs (#1449)
* updated documentations and applied a minor fix to resource_pack.rs config (suggested and autofixed by rustrover).

* fmt

Signed-off-by: Illyrius <fitimq@live.nl>

* Update pumpkin-config/src/fun.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Illyrius <28700752+illyrius666@users.noreply.github.com>

* Apply suggestion from @illyrius666

i dont think we do, let me know otherwise

Signed-off-by: Illyrius <28700752+illyrius666@users.noreply.github.com>

* remove unnecessary spaces between fields and such.

---------

Signed-off-by: Illyrius <fitimq@live.nl>
Signed-off-by: Illyrius <28700752+illyrius666@users.noreply.github.com>
Co-authored-by: Illyrius <fitimq@live.nl>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-07 15:44:01 +01:00
Richard Marshall
042e12d026 fix: jukebox now properly handles music discs (#1438)
* fix: jukebox now properly handles music discs (#568)

- Add JukeboxBlockEntity for disc storage and playback tracking
- Disc is removed from player inventory when inserted
- Disc drops when player right-clicks to retrieve it
- Disc drops when jukebox is broken
- Redstone power output (15 when playing, 0 otherwise)
- Comparator output varies per song (vanilla values 1-15)
- Playback auto-stops when song finishes

* refactor: use synced registries for jukebox song data

* replace indexmap with btreemap per clippy.toml policy

* fix import ordering for cargo fmt
2026-02-07 12:07:56 +01:00
ChocoDev
fee9fa3d76 feat: vietnam(vn) translation (#1455) 2026-02-07 10:46:58 +01:00
FabseGP
1b7f018fd6 chore: ensure favicon is png and 64x64 (#1418) 2026-02-07 10:34:13 +01:00
RB007
86aeba7b4c fix: Breaking top part of doors does not drop the item (#1445)
* fix: breaking door top now causes drops in survival

* chore: clippy and formatting
2026-02-06 11:34:38 +01:00
RB007
7e4f2148b8 fix: fall damage death loop (with incorrect respawn) (#1447)
* fix: stop fall damage (death loop) and tp to correct spawn location

* chore: clippy and formatting
2026-02-06 11:26:42 +01:00
RB007
4b887f0369 fix: pass command block pos args to summon command (#1448) 2026-02-06 11:19:35 +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
とぴ。(おーけ
707d1e9a92 chore: add ja_jp translations (#1439) 2026-02-05 18:03:53 +01:00
Clicks
51f1152403 fix: warnings about the use of hashmap instead of btreemap in pumpkin-data (#1443) 2026-02-05 18:03:15 +01:00
AnthonyDuong1
7ae35017f8 fix: chest open and close now plays the correct sound (#1441) 2026-02-05 17:56:31 +01:00
Purdze
dfbd3ac3c3 fix: copper chests and wooden shelves facing wrong direction (#1388)
* fix: copper chests and wooden shelves facing wrong direction

- add copper chest block IDs to ChestBlock handler
- create ShelfBlock handler for wooden shelf blocks
- fix get_horizontal_facing to use vanilla formula
- use runtime block ID lookup instead of compile-time macro

fixes #1318, fixes #1321

* refactor: use macros for block metadata and split copper chests

- replace manual blockmetadata impl with pumpkin_block macro for
  chiseledbookshelfblock and shelfblock
- split chestblock into wooden-only chestblock and new copperchestblock
- implement vanilla-accurate copper oxidation with neighbor checking,
  viewer detection, and weighted probability calculation

* revert: restore original tcp_listener initialization pattern

* revert: restore original tcp_listener pattern in lib.rs

Reverts the tcp_listener initialization back to the original
if-else expression pattern as requested in review.

---------

Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2026-02-05 17:44:46 +01:00
Alexander Medvedev
3c87523112 chore: refactor chunk reading/writing 2026-02-05 01:54:34 +01:00
Frycek1
5165d16c29 fix: block chest opening when solid block above (#1430)
* fix: block chest opening when solid block above

* style: run cargo fmt

* fix: restore is_solid definiton
2026-02-04 18:19:19 +01:00