2775 Commits

Author SHA1 Message Date
ZlordHUN
ffcf09ece4 chore: remove bedrock raknet (#2811)
* Remove legacy RakNet transport

* Replace RakNet status with NetherNet discovery

* Restore Bedrock server-list status

* Remove NetherNet LAN discovery

* Remove unused AES dependency
2026-08-07 20:00:41 +02:00
Alexander Medvedev
7e2505b055 feat: add fetchprofile command 2026-08-07 14:01:03 +02:00
Alexander Medvedev
19ccd152f1 feat: add waypoint command 2026-08-07 10:58:46 +02:00
xRookieFight
7e60303689 fix: flatten hover event nbt fields (#2798) 2026-08-07 10:10:44 +02:00
MCbabel
69e3ff7c7c fix(world): size proto chunks by the dimension, not by the noise settings (#2803)
`ProtoChunk::new` took its height from the noise settings while
`Chunk::build_level_sections` builds and reads back `dimension.height / 16`
sections. The End and the Nether are the two dimensions taller than their noise
settings (256 vs 128), so their proto chunks held 8 sections for the 16 the
level chunk asks for and `get_block_state_raw` indexed past the end of
`flat_block_map`, panicking on every generation thread. The same mismatch left
light data covering half the column and dropped features placed above y = 128.

A chunk spans its dimension, as in vanilla's `LevelHeightAccessor`; the noise
settings only bound the vertical window the generator writes into. `ProtoChunk`
now carries both, storage sized by the dimension plus a generation window built
with `GenerationShapeConfig::trim_height`, so surface rules, carver height
providers and feature placement keep resolving against y < 128 there.

The panic quoted in the issue (`chunk_density_function.rs`, len 99 index 129)
was the same conflation in `populate_noise` and is already fixed by 3c43f971.
2026-08-07 10:10:00 +02:00
MCbabel
b0d2dfa434 fix(world): load level.dat instead of discarding it (#2804)
`AnvilLevelInfo::read_world_info` validated the version tags and then returned
`LevelData::default(Seed(0))`, so level name, difficulty, spawn, world border
and data packs were discarded on every start, and the writer emitted only
`DataVersion`, `version` and `LastPlayed`, truncating the rest on save. A world
whose seed lives in level.dat's legacy `Data.WorldGenSettings` compound, as
converters such as Chunker emit, therefore loaded with seed 0 and generated
foreign terrain into its existing region files.

level.dat is now read and written tag by tag through pumpkin-nbt, every field
falling back to its vanilla default, so a missing optional tag such as
`Version.Series` no longer costs the whole file. Saving merges into the existing
`Data` compound, so tags Pumpkin does not model survive. A world with no seed
in either file aborts startup instead of silently regenerating, and the seed is
mirrored into level.dat, the only world file that is backed up. Version tags are
re-stamped with the current constants on save so level.dat stays consistent with
the chunks Pumpkin writes.
2026-08-07 10:09:06 +02:00
ZlordHUN
f2444bcefd feat(bedrock): update to 1.26.40 and add NetherNet transport (#2797)
* feat(bedrock): update to 1.26.40 and add NetherNet transport

* fix(bedrock): update remaining 1.26.40 packet schemas

* fix(bedrock): complete NetherNet and inventory migration
2026-08-07 08:34:10 +02:00
Alexander Medvedev
caf954d170 fix: mega pine trees 2026-08-06 16:16:12 +02:00
Alexander Medvedev
0b7e093c58 fix: tests 2026-08-06 14:26:27 +02:00
Alexander Medvedev
74e7ad2909 fix: ci in release 2026-08-06 13:30:51 +02:00
Alexander Medvedev
f4571a9d63 fix: ci 2026-08-06 13:10:57 +02:00
Alexander Medvedev
cb3660bcd2 chore: move to crates folder 2026-08-06 12:56:40 +02:00
Alexander Medvedev
5d10c0d8a8 chore: use translations for ags 2026-08-05 21:10:50 +02:00
Alexander Medvedev
4eaa6ace31 ci: test 2026-08-05 15:51:25 +02:00
Alexander Medvedev
c56208c32a fix: ci 2026-08-05 14:58:50 +02:00
Alexander Medvedev
0050576be4 Revert "feat: Add Mineshaft Generation (#2740)" 2026-08-05 14:38:20 +02:00
Alexander Medvedev
a748aae07e Revert "feat: Add Mineshaft Generation (#2740)"
This reverts commit 09d23bd15f.
2026-08-05 14:31:26 +02:00
Alexander Medvedev
b55feecd74 ci: cargo machete 2026-08-05 13:27:23 +02:00
Alexander Medvedev
7350fba3b0 chore: chunk loading/saving move from serde to manual
should be faster now
2026-08-05 12:23:44 +02:00
catdum200
0d348892e5 fix(protocol): accept BungeeCord-forwarded handshake addresses (#2774)
* fix(protocol): accept BungeeCord-forwarded handshake addresses

`SHandShake::read` bounded `server_address` at 255 characters, the limit a
vanilla client observes. `bungeecord_login`, however, expects that same field
to carry the host, the client's IP, its UUID and its signed profile properties
separated by NUL bytes, exactly as documented on that function. With
`ip_forward` enabled the signed properties alone run past a thousand
characters, so the read failed with "too large: string" before
`handle_handshake` ever ran: the connection state never advanced,
`server_address` stayed empty and the proxy login path could not be reached.

The same struct already writes this field with `write_string`, which bounds it
at `i16::MAX`, so the reader was stricter than the writer. Read it with that
same bound, as Spigot does.

Closes #1293

* test(proxy): cover a BungeeCord login from the wire up

Encodes a handshake the way BungeeCord puts it on the wire with
`ip_forward` enabled, decodes it with the real packet reader, and hands
the resulting address to `bungeecord_login`, asserting the forwarded IP,
the forwarded UUID and the signed skin all survive the trip.

Without the widened bound on `server_address` this fails inside
`SHandShake::read`, so `bungeecord_login` is never reached at all.
2026-08-05 08:59:48 +02:00
Mcxiaocaibug
bff591e424 feat: emit lectern redstone signals and add the lectern screen (#2759)
Implements the missing redstone half of the lectern:
- page turns pulse the powered state for 2 game ticks (vanilla parity),
  strongly powering the block below and playing the page-turn event
- placing/taking a book resets the pulse and notifies neighbors
- comparator output now uses the vanilla formula
  floor(page / (pageCount - 1) * 14) + 1 instead of a scaled variant
- adds the lectern screen handler (page buttons, jump-to-page and
  take-book) so the pulse can actually be triggered by players; the
  current page is synced as container property 0
- using a lectern with a book now opens the reading screen instead of
  silently deleting the book

Co-authored-by: Mcxiaocaibug <Mcxiaocaibug@users.noreply.github.com>
2026-08-05 08:56:31 +02:00
Eshan I.
f0da5f330b fix(ai): respect target visibility (#2701) 2026-08-05 08:50:41 +02:00
ZlordHUN
09d23bd15f feat: Add Mineshaft Generation (#2740)
* feat: Add Mineshaft Generation

* fix(structures): remove redundant mineshaft probability gate

The MINESHAFTS structure_set already gates generation via its
frequency reduction (0.004, LegacyType3) in placement, so the extra
0.01 roll in the generator was double-gating and made mineshafts far
too rare. No other Pumpkin structure generator rolls its own
probability, so the gate has been removed to match vanilla frequency.

* feat(structures): faithful port of vanilla mineshaft generation

Rewrites all mineshaft pieces to match vanilla MineshaftPieces
(decompiled from server.jar):

- Corridor: 3-wide tunnel with fence posts + plank beams every 5
  blocks, floor planks below the box at y=-1, cobwebs, rails (with
  correct NORTH_SOUTH / EAST_WEST shape per corridor axis), cave-spider
  spawner (spider corridors), chest (1%), wood support pillars
- Room: carved dome chamber at Y=50, vanilla dims (8-13 wide)
- Crossing: 5x5 with corner pillars, optional two-floored
- Stairs: vanilla descending staircase (air-only, no planks)
- Assembly: vanilla piece weights (70% corridor / 10% stairs / 20%
  crossing), depth <= 8, bounds = 80 blocks from start
- Liquid check (isInInvalidLocation): aborts pieces in water/lava
- Mesa variant: dark oak wood throughout

* feat(world): support generated loot minecarts

* Minecart Vanila Parity

* Rebased And Added Furnace, Hopper, TNT Minecarts

* Refactor minecarts and fix off-rail gravity

Split minecart variants into focused modules, correct airborne minecart physics, and remove the test-only entity chunk-loading rework.

* Fix mineshaft vanilla parity

---------

Co-authored-by: Zoltán Virágh <zoltan.viragh@cloudtalk.io>
2026-08-05 08:48:26 +02:00
orpos
30ece357db fix: make chickens glide (#2755) 2026-08-05 08:47:11 +02:00
ZlordHUN
150eff5897 feat: Implement End City structures (#2761) 2026-08-05 08:45:34 +02:00
TNXWasTaken
060c10dfa2 refactor: enchant command code refactor (#2768)
* refactor: enchant command

Removes the only_one var and nested logic

* chore: removed TODO since it is now patched

In commit 938a627 (fix(item): prevent stacking items with different components (#2624)) this is patched since if a item is enchanted it will always have a extra data component which will now be detected and synced
2026-08-05 08:37:15 +02:00
Alexander Medvedev
7c3177b404 feat: some more plugin api functions 2026-08-04 20:54:55 +02:00
Alexander Medvedev
460cb9b01c Update pumpkin-plugin-wit 2026-08-04 15:00:44 +02:00
Alexander Medvedev
42d9391804 feat: add some more events 2026-08-04 14:57:33 +02:00
Alexander Medvedev
9ececd9eca chore: add more chunk tests 2026-08-04 10:38:27 +02:00
Alexander Medvedev
e1117ce4a6 chore: nicer event firing 2026-08-03 21:16:07 +02:00
Missing_Love
5eaf550a4c fix(core): fix skin metadata parsing and player info protocol version compatibility (#2525)
- Parse the `model` field for skin textures in `player.rs` to support the hat skin model
- Update `player_info_update.rs` to mask unsupported action flags based on the Minecraft version (e.g., ignore `UPDATE_LIST_PRIORITY` for versions prior to 1.21.2)
- Add the `UPDATE_HAT` flag in `world/mod.rs` and send it alongside `UPDATE_LIST_PRIORITY`
- Sync multi-version `tracked_data` JSON files to reflect the protocol changes

Signed-off-by: Missing_Love <42416195+Q2297045667@users.noreply.github.com>
2026-08-03 00:20:49 -04:00
Maxime Chaffraix
44b7cccc45 fix(entity): feeding a parrot a cookie poisons and kills it (#2564)
`ParrotEntity` had no interact handler, so a cookie used on a parrot did
nothing at all. Vanilla `Parrot.mobInteract` consumes the cookie, applies
poison for 900 ticks and then kills the parrot.

The branch is gated on the `parrot_poisonous_food` item tag rather than on
the cookie id, matching vanilla. Anything else falls through to the default
mob interaction, so leashing and name tags keep working.
2026-08-02 23:47:39 -04:00
Tomislav
ba95a301c1 feat: add hr_hr translation (#2529)
Co-authored-by: Tomislav Andric <tomo@Tomislavs-MacBook-Pro.local>
2026-08-02 23:35:49 -04:00
BitForge
d1aba46e48 fix(entity): reset fall distance on Spectator/Creative gamemode switch (#2382)
* fix(entity): reset fall distance on Spectator/Creative gamemode switch

Prevents fall damage when a player switches to Spectator mid-fall and
then back to Survival before landing.

This is a pragmatic workaround — vanilla achieves this through multiple
independent defense layers (noPhysics, per-tick reset, on_ground force,
mayfly check) rather than an explicit reset. The TODOs in the code
track the remaining gaps for a full vanilla-faithful implementation.

Fixes #2372

* docs(entity): document Creative fall-distance over-forgiveness edge case

Add TODO clarifying that once vanilla fall-damage layers 1-4 are
implemented, the reset should be restricted to Spectator only. In
vanilla a non-flying Creative player keeps fallDistance across a
Survival switch (guarded by abilities.mayfly in causeFallDamage);
resetting here over-forgives that edge case.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: condense fall damage comment to reference vanilla methods

Reduced comment from 23 lines to 6 by:
- Removing detailed explanations of vanilla defense layers
- Directly referencing Player.aiStep() and Player.causeFallDamage()
- Keeping only actionable TODOs
- Switching to /* */ style

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-08-02 23:23:53 -04:00
MythicSorcerer
3b0fdfa4f8 fix: persist air supply across relog (#2646)
Air was not saved to NBT, causing it to reset to full on every
login. This allowed players to exploit drowning by relogging to
restore lost air bubbles.
2026-08-02 20:11:53 +02:00
MythicSorcerer
28eefe7518 fix(combat): apply vanilla fist damage and attack speed modifiers (#2659)
The player attack function used base_damage (2.0) + add_damage (0.0) = 2.0
when attacking with an empty hand, but vanilla applies -1.0 base_attack_damage
and -2.4 base_attack_speed for the fist, resulting in 1.0 damage and 1.6
attack speed. This caused entities like cows (10 HP) to die in 5 hits
instead of 10.

Also fix the cooldown scaling formula to match vanilla: the entire
(base + modifier) should be scaled by cooldown, not just the modifier.
2026-08-02 20:11:08 +02:00
Eshan I.
b4aa65b4e9 fix(item): apply data-driven consumable effects (#2688) 2026-08-02 20:09:13 +02:00
Eshan I.
0b2ed1af38 fix(projectile): preserve arrow payloads (#2710) 2026-08-02 20:08:10 +02:00
Eshan I.
7844590958 fix(ai): damage endermen in rain (#2714) 2026-08-02 20:07:35 +02:00
Alexander Medvedev
f474756b16 fix: ci 2026-08-02 12:42:21 +02:00
Alexander Medvedev
98d4451fc9 chore: some fixes 2026-08-02 10:49:37 +02:00
Alexander Medvedev
141b49f973 chore: some more tests 2026-08-02 08:31:01 +02:00
Dark Star
b7ccef5b2f feat: add item frame entity and real comparator analog output (#2461)
* feat: add item frame entity and real comparator analog output

Item frames had no entity implementation, so frames loaded from
vanilla worlds fell into the generic entity fallback and lost their
Item, ItemRotation and Facing NBT on the next save. The comparator
also returned a hardcoded 1 for any attached frame.

Adds ItemFrameEntity (item frame + glow item frame) with vanilla NBT
round-trip, and makes the comparator return the vanilla signal:
0 when the frame is empty, otherwise rotation % 8 + 1. The frame
lookup now also includes glow item frames and matches on the frame's
stored facing instead of the yaw-derived horizontal facing.

* fix: mirror the default item frame facing into the entity data field

A frame created without NBT set facing to south but left the entity
data field at 0, which the spawn packet reads as down, so the frame
spawned facing the wrong way. Store the default in both places.
2026-08-02 00:26:17 -04:00
Oswald
c14d946a74 fix: transposed heightmap restore left resumed chunks with stone surfaces (#2448) 2026-08-02 00:03:30 -04:00
necko
038d467bfa fix: restore main hand and skin customization metadata across versions (#2630)
* fix(data): map missing main arm and skin tracked IDs for 1.21-1.21.6

* fix(player): send main hand and skin customisation metadata across versions

* fix(data): map missing main arm and skin tracked IDs in source JSON
2026-08-01 23:07:26 -04:00
PilkeySEK
f0c7332f05 perf: Make WasmPlugins be Arc<WasmPlugin> instead of Box<Arc<WasmPlugin>> (#2631)
* Make Plugin trait use &self instead of &mut self, don't make WasmPlugin be Box<Arc<T>>

* fix git thing
2026-08-01 15:02:36 +02:00
Alexander Medvedev
db1678e16f fix: ci 2026-08-01 12:33:02 +02:00
Alexander Medvedev
e74a3d4dda feat: handle signed plugins 2026-08-01 12:29:26 +02:00
Jamie Little
75994f3302 feat: /place command (#2473)
* Add /place template command with BlockPlacer trait and tab-completion support

- Add BlockPlacer trait to abstract block placement over ProtoChunk (worldgen)
  and WorldBlockPlacer (live command), used by place_template()
- Implement BlockPlacer for ProtoChunk (pumpkin-world) and WorldBlockPlacer
  (pumpkin crate)
- Add World::queue_block_updates() to insert into unsent_block_changes
  without triggering full set_block_state callbacks
- Generate _generated_all_template_names() at build time from structure
  assets for use in tab-completion suggestions
- Add TemplateNameArgumentType for the new command system with
  list_suggestions() using all_template_names()
- Implement /place template <template> [pos] in the new command system
  (CommandDispatcher, CommandExecutor, ArgumentBuilder)
- Fix borrow-across-await: clone template name to owned String early

* feat: add /place structure and /place jigsaw commands

Adds /place structure <id> [pos] for all structure types with two placement paths:
- Jigsaw structures (ancient_city, bastion_remnant, etc.): fast path using
  JigsawPlacement::add_pieces directly at the target position
- Non-jigsaw structures (desert_pyramid, end_city, etc.): generate pieces
  via dispatch, place into synthetic ProtoChunks with pre-seeded heightmaps
  and a stone floor so pieces can detect terrain, then delta-apply only
  changed blocks to the world via WorldBlockPlacer

Also adds /place jigsaw <pool> <target> <depth> [pos] for manual jigsaw
template placement.

Architecture:
- generate_structure_position() extracts the shared generator dispatch
  from try_generate_structure / lazily_generate_structure (both now
  delegate to it, eliminating ~150 lines of duplicated match arms)
- place_pool_element_templates() extracted from PoolElementStructurePiece
  for reuse by the command with WorldBlockPlacer
- StructureKeys gains from_name()/to_name()/all_names() via codegen
- StructureNameArgumentType and PoolNameArgumentType for tab-completion
- flat_ocean_floor_height_map made pub in ProtoChunk for heightmap seeding

* feat: add /place feature command

Adds /place feature <feature> [pos] for placing configured features
at a specific position. Resolves the PlacedFeature name via from_name(),
resolves the inner ConfiguredFeature from PLACED_FEATURES /
CONFIGURED_FEATURES, then calls ConfiguredFeature::generate() directly
at the target position -- skipping placement modifiers so the feature
appears exactly where specified.

Also adds /place structure improvements:
- Synthetic chunk terrain fill: stone below surface + grass on top, so
  pieces that carve through solid terrain (stronghold corridors, etc.)
  find material to work with. Snapshot/delta ensures only structure
  blocks reach the world.
- Shared snapshot_blocks() and apply_delta() helpers eliminate ~30 lines
  of duplicated diff logic between structure and feature paths.
- ground_y() and chunk_population_seed() helpers replace magic numbers.
- Structure success message now reports the structure name instead of
  the piece count.

Infrastructure:
- PlacedFeature::all_names() generated via pumpkin-codegen for
  tab-completion suggestions in PlacedFeatureNameArgumentType.
- GenerationCache trait implemented for ProtoChunk (single-chunk
  delegation) so ConfiguredFeature::generate() works without the full
  chunk-generation cache system.
- flat_ocean_floor_height_map made pub in ProtoChunk for heightmap
  seeding.
- configured_features and feature modules made pub for access from
  the command crate.

* fix(command): use world settings for place

* docs(place): clarify synthetic terrain delta behavior
2026-07-31 11:45:23 +02:00