TheDarkSword 207185340a fix: persist item data components dropped on save (#2421)
* fix: persist item data components dropped on save

`DataComponentImpl::write_data` defaults to returning `NbtTag::End`, so any
component relying on that default serialized to nothing. `write_item_stack`
walks the component patch and calls `write_data` on every entry, which meant
those components were silently dropped whenever an item stack was written to
NBT (chests, player inventories, chunk saves). Most of them already had a
deserializer, so the data just vanished on the next save/load.

Implement `write_data` for the data-carrying components that were missing it:
MaxDamage, Enchantable, Food, Tool, BlockEntityData, Container and
BundleContents. For the ones without a deserializer yet (MaxDamage,
Enchantable, Food, Tool) add the matching `read_data` and register them in the
`read_data` dispatcher so they round-trip through write_item_stack/
read_item_stack. The output follows the vanilla NBT shape for each component.

Add round-trip tests for the scalar and compound cases.

* test: use the assert_round_trip helper
2026-08-19 07:39:38 +02:00
2026-08-17 12:33:05 +02:00
2026-08-06 13:10:57 +02:00
2025-05-10 12:46:42 +02:00
2026-08-08 13:46:17 +02:00
2026-08-06 12:56:40 +02:00
2026-08-18 22:19:13 +02:00
2026-08-17 10:45:45 +02:00
2025-08-11 20:45:55 +02:00
2026-08-06 13:10:57 +02:00
2026-08-17 12:33:05 +02:00
2026-08-17 12:33:05 +02:00
2026-08-06 12:56:40 +02:00
2024-12-04 11:37:41 +01:00
2026-08-06 12:56:40 +02:00

Pumpkin

CI Discord License: GPL

Pumpkin is a Minecraft server built entirely in Rust, offering a fast, efficient, and customizable experience. It prioritizes performance and player enjoyment while adhering to the core mechanics of the game.

Pumpkin Chunk Loading

Goals

  • Performance: Leveraging multi-threading for maximum speed and efficiency.
  • Compatibility: Supports the latest Java & Bedrock Minecraft server version while adhering to Vanilla game mechanics.
  • Security: Prioritizes security by preventing known security exploits.
  • Flexibility: Highly configurable, with the ability to disable unnecessary features.
  • Extensibility: Provides a foundation for plugin development.

Important

Pumpkin is currently under heavy development.

See what needs to be done before the 1.0.0 Release

Features

  • Configuration (toml)
  • Tracking: Protocol
    • Server Status/Ping
    • Encryption
    • Packet Compression
    • Java Edition
    • Bedrock Edition (W.I.P)
    • ...
  • Tracking: World
    • Player Tab-list
    • Scoreboard
    • World Loading
    • World Time
    • World Borders
    • World Saving
    • Lighting
    • Entity Spawning
    • Bossbar
    • Chunk Loading (Vanilla, Linear, Pump)
    • Chunk Generation
    • Chunk Saving (Vanilla, Linear, Pump)
    • Redstone
    • Liquid Physics
    • ...
  • Tracking: Player
    • Skins
    • Teleport
    • Movement
    • Animation
    • Inventory
    • Combat
    • Experience
    • Hunger
    • Off Hand
    • Advancements (W.I.P)
    • Eating
    • ...
  • Entities
    • Non-Living (Minecart, Eggs...) (W.I.P)
    • Entity Effects
    • Players
    • Mobs (W.I.P)
    • Animals (W.I.P)
    • Entity AI
    • Boss (W.I.P)
    • Villagers (W.I.P)
    • Entity Saving
  • Server
    • Plugins
    • Query
    • RCON
    • Inventories
    • Particles
    • Chat
    • Commands
    • Permissions
    • Translations
  • Proxy
    • Bungeecord
    • Velocity

How to run

See our Quick Start guide to get Pumpkin running.

Contributions

Contributions are welcome! See CONTRIBUTING.md

Docs

Pumpkin's documentation can be found at https://pumpkinmc.org/

Communication

Consider joining our Discord server to stay up-to-date on events, updates, and connect with other members.

Funding

If you want to fund me and help the project, check out the Donation Page.

Description
Languages
Rust 100%