Commit Graph

1569 Commits

Author SHA1 Message Date
Greened
046894c371 chore: code tweaks (#2245)
* chore: utilize player.rotation() for yaw and pitch

* chore: remove duplicate shooter id

* chore: introduce is_sneaking() is_sprinting() and is_fall_flying() functions

---------

Signed-off-by: Greened <108997309+GreenedDev@users.noreply.github.com>
2026-06-09 15:47:50 +02:00
Alexander Medvedev
3d15f6fecd feat(plugin-api): add some more stuff 2026-06-09 15:46:05 +02:00
Glory
dc6ad807ce fix(items): ender pearl logic and item cooldown (#2189)
* fix: throw sound pitch

* fix: ender pearl teleporting player to wrong position

* impl: spawn endermite on ender pearl collision

* fix: check world rules before spawning endermites

* impl: ender pearl damages collided entity

* impl: item use cooldown

* fix: cooldown_group in pumpkin-codegen

* resolve merge conflict

---------

Signed-off-by: Glory <89966094+gloryrunner@users.noreply.github.com>
Co-authored-by: Missing_Love <42416195+Q2297045667@users.noreply.github.com>
2026-06-08 13:27:29 +02:00
Alexander Medvedev
b08be9e158 feat(bedrock): add container open 2026-06-07 21:12:16 +02:00
Alexander Medvedev
e47695d810 feat(bedrock): add item drops 2026-06-07 14:34:54 +02:00
Greened
3a5f2d0855 chore: Only send some packets to players who are tracking the chunk (#2241)
* chore: replace player.living_entity.entity with player.get_entity()

* chore: replace more

---------

Signed-off-by: Greened <108997309+GreenedDev@users.noreply.github.com>
2026-06-07 08:17:53 +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
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
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
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
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
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
Alexander Medvedev
3399f51671 feat(bedrock): add block update packet 2026-05-26 18:15:28 +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
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
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
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
2fcc9bcf4a chore: enforce some more clippy lints
pumpkin contributors will love me :cap:
2026-05-20 22:27:54 +02:00
Giems
4ad5b2ba03 fix(entity): mobs no longer burn at night (#2123) 2026-05-20 11:24:39 +02:00
Greened
6b7628962d fix: gravity for couple of projectile entities (#2161)
* fix: gravity for couple of projectile entities

* fix: clippy warning

* fix: rerun actions
2026-05-20 11:24:12 +02:00
Laptop59
7d15f6e7a1 feat(command): implement NBT argument types (#2164)
* nbt argument types

* added `get` methods

* renamed a few things

* moved both argument types to one `nbt.rs` file
2026-05-20 11:23:54 +02:00
Alexander Medvedev
7fe103db67 feat(bedrock): add bossbar & scoreboard 2026-05-19 21:55:23 +02:00
Laptop59
6f2b137e70 feat(command): implement list_suggestions for some argument types (#2101)
* implement suggestions for everything we have right now

* use `translate_cross` instead

* fixed tests

* fix SNBT tests and suggestions to how they should be

* fixed `parse_for_suggestion`'s signature to only take a `SuggestionBuilder`

* added suggestions for vec3 and block pos

* add `Default` and `Debug` trait to `Vec3ArgumentType`

---------

Signed-off-by: Alexander Medvedev <lilalexmed@proton.me>
Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
2026-05-18 21:55:39 +02:00