Commit Graph

2329 Commits

Author SHA1 Message Date
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
Alexander Medvedev
c17e7124d8 feat: extend packet send and receive events 2026-06-06 10:13:53 +02:00
Alexander Medvedev
376001dbd4 fix: register packet send and receive events 2026-06-06 09:31:44 +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
6c1dd012bf fix: register packet send and receive events 2026-06-06 09:14:39 +02:00
Alexander Medvedev
96af1fdbf6 chore: expose packet events 2026-06-06 08:52:54 +02:00
Alexander Medvedev
96a9328af8 chore: expose packet events 2026-06-06 07:48:05 +02:00
Alexander Medvedev
9898896bbb fix: some bedrock fixes 2026-06-05 20:27:21 +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
とぴ。(おーけ
a2f0122503 chore(pumpkin-util): gate codegen deps behind feature flag (#2127)
Make `syn`, `quote`, and `proc-macro2` optional in pumpkin-util,
exposing them via a new `codegen` feature. `pumpkin-codegen` opts in
explicitly, so downstream consumers no longer pay the proc-macro
build cost when they don't need `ToTokens` impls.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-04 11:12:55 +02:00
AurelienFT
2b13d6303d fix: chests not openable after generation (#2187)
Co-authored-by: Missing_Love <42416195+Q2297045667@users.noreply.github.com>
2026-06-04 11:08:06 +02:00
Laptop59
2966a21fd6 feat(command): implement gamemode argument type (#2186)
* to be completed

* removed block state parser for now

* gamemode argument type

* plugin wit submodules

* fixed submodules

---------

Co-authored-by: Missing_Love <42416195+Q2297045667@users.noreply.github.com>
2026-06-04 11:07:42 +02:00
Greened
deb853d15a fix: crossbow in creative (#2201)
* fix: crossbow in creative

* fix: clippy warning

---------

Co-authored-by: Missing_Love <42416195+Q2297045667@users.noreply.github.com>
2026-06-04 10:35:49 +02:00
Matthieu B
e1c715b59b fix(bedrock): allow larger login payloads (#2206) 2026-06-04 10:26:28 +02:00
shaches
1f63fae486 fix(world): handle unsupported custom anvil compression (#2217) 2026-06-04 10:24:36 +02:00
Marshall-67
9158109043 fix(command): prevent panic in SuggestionsBuilder when start exceeds input length (#2207)
remaining() and remaining_lowercase() at suggestions.rs:39,45 perform an
unbounded slice &self.input[self.start..], which panics with:

  'start byte index N is out of bounds for string of length M'

when the start position exceeds the input string length.

This was reachable via:
- The console completer passing cursor position unadjusted for the
  stripped '/' prefix
- create_offset() constructing a builder with start > input.len()
- entity_selector parser's builder.start - 1 underflowing when
  start == 0

Changes:
- Clamp start to input.len() in remaining() and remaining_lowercase()
  so an empty string is returned instead of panicking
- Use saturating_sub(1) in entity_selector parser to prevent
  debug-mode underflow when start is already 0
2026-06-04 10:22:22 +02:00
Laptop59
70a3847ed7 fix(command): make commands with slash not crash (#2149)
Co-authored-by: Missing_Love <42416195+Q2297045667@users.noreply.github.com>
2026-06-04 10:21:56 +02:00
shaches
440d222f8a fix: stale proto chunk generation tasks (#2214) 2026-06-04 10:18:24 +02:00
Mathis
463c25d42d Fix: messed up terminal after "stop" (#2192)
Co-authored-by: Mathis Cavalli <mcavalli@uth.fr>
Co-authored-by: Missing_Love <42416195+Q2297045667@users.noreply.github.com>
2026-06-03 22:44:48 +08:00
Greened
0fd6fef6d3 fix: item pickup animation (#2199)
* fix: broadcast item pickup packet instead of only sending it to the collector player

* fix it for shot arrows too.

* fix: clippy warning

---------

Co-authored-by: Missing_Love <42416195+Q2297045667@users.noreply.github.com>
2026-06-03 17:54:19 +08:00
Marshall-67
24e3b59712 Merge pull request #2212 from Marshall-67/fix/golden-apple
fix(living): prevent panic when applying effects with attribute modifiers
2026-06-02 22:46:03 +08:00
Missing_Love
5ca3d37a3e Merge pull request #2208 from Pumpkin-MC/dependabot/github_actions/crate-ci/typos-1.47.0
build(deps): bump crate-ci/typos from 1.46.3 to 1.47.0
2026-06-01 16:31:04 +08:00
dependabot[bot]
f5971ca2b7 build(deps): bump crate-ci/typos from 1.46.3 to 1.47.0
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.46.3 to 1.47.0.
- [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.46.3...v1.47.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-01 00:59:50 +00: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
dependabot[bot]
d29e4c18bd build(deps): bump crate-ci/typos from 1.46.2 to 1.46.3 (#2184)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.46.2 to 1.46.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.46.2...v1.46.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-27 15:11:58 +02:00
Alexander Medvedev
3399f51671 feat(bedrock): add block update packet 2026-05-26 18:15:28 +02:00
Illyrius
7481a6e703 chore: re-export EntityType and Dialog related stuff (#2190) 2026-05-26 14:55:26 +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
100b8791cf fix: revert bedrock buffer read 2026-05-24 17:36:27 +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
f981126cfb Update pumpkin-plugin-wit 2026-05-23 18:37:31 +02:00
Alexander Medvedev
3629f43dcc fix: disable cave carver for now
fixes some issues
2026-05-23 16:36:08 +02:00
Alexander Medvedev
f19d84efef chore: made text component clickable links clickable in console 2026-05-23 11:30:30 +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
Nicolai Van der Storm
c7ab629947 fix: serialization fix wich resulted in void/air chunks (#2177)
* Fix chunk save/load corruption and generation stage progression

- Fix serde rename mismatch: ChunkSectionNBT now uses PascalCase
  to match serialization, restoring block_states and biomes on load.
- Correct generation stage order: Biomes before StructureStart,
  add missing Carvers stage.
- Add stage guards in Cache::advance to avoid re-running completed
  stages, preventing assertion panics.
- Set ProtoChunk::stage from saved ChunkStatus in from_chunk_data,
  ensuring loaded chunks start at correct stage.

* using propper asserts instead of silent skips

* using StagedChunkEnum::Empty instead of None
2026-05-23 09:29:00 +02:00
Alexander Medvedev
4aa78496dd fix: forgot to decompress pump files 2026-05-22 23:03:15 +02:00
Alexander Medvedev
bd544271e2 feat: more loot table work 2026-05-22 22:23:47 +02:00
とぴ。(おーけ
f926410e4b feat(wasm-api): add ServerTickEndEvent (#2100)
* feat(plugin-api): add ServerTickEndEvent

Add a non-cancellable event fired at the end of every server tick,
carrying the 0-indexed tick number and the tick duration in nanoseconds.
Wires through all five layers: WIT contract, plugin-api guest binding,
runtime host struct, WASM bridge, and the ticker fire site.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix ci/ fmt

* chore: point pumpkin-plugin-wit submodule to fork with server-tick-end-event

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Revert submodule

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 16:34:09 +02:00
Illyrius
a90996691e fix(wasm-api): re-exported InterAction (#2169) 2026-05-22 16:33:17 +02:00
Laptop59
fd0539c2a7 feat(command): slot argument types (#2170)
* argument types implemented

* tested parsing in-game and on the terminal

* fixed doc comment
2026-05-22 16:30:26 +02:00
AurelienFT
8ff1fd5296 feat: Add piston push_entites to match vanilla behaviour and fix https://github.com/Pumpkin-MC/Pumpkin/issues/2114 (#2172) 2026-05-22 16:29:23 +02:00
Alexander Medvedev
d47ac2cd51 feat(loot-table): add luck 2026-05-21 22:20:00 +02:00
Greened
fcaf852a05 feat: set grass snowy state (#2158)
* fix: snowy grass

* chore: use a block tag instead

* fix: clippy warning

* fix: clippy warning. take 2
2026-05-20 22:47:31 +02:00
RuleGaed
4ca65ced46 fix: https://github.com/Pumpkin-MC/Pumpkin/issues/2165 (#2166) 2026-05-20 22:45:36 +02:00
Alexander Medvedev
3f7f483886 fix: ci (1) 2026-05-20 22:43:43 +02:00
Alexander Medvedev
1de1d38a26 Update pumpkin-plugin-wit 2026-05-20 22:37:05 +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