mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-30 20:14:23 +00:00
c70b17d058a30f22804795beeb6e6e8764fb322b
* fix(entity): prevent duplicate items and drop animation replay on reconnect When a player reconnects, spawn_world_entity_chunks unconditionally created new entity instances from chunk NBT, even if those entities already existed in the world (e.g. another player still tracking them). This caused three bugs: 1. Drop animation replay: read_nbt_non_mut restores the original drop velocity from NBT, so the client renders items as if they were just dropped again. 2. Uncollectable ghost items: duplicate entities with different entity_ids but the same UUID desync client and server state, making items impossible to pick up. 3. Dupe glitch: the same chunk NBT entry spawns a second entity on every reconnect, duplicating items in the world. Fix by: - Checking world.entities for existing entities with the same UUID before creating new ones; if found, only send spawn packet for the existing entity to the reconnecting player. - Clearing velocity to zero after NBT restore so the spawn packet does not carry stale drop velocity. - Adding a UUID dedup guard in add_entity_silent as a second line of defense. * fix(item): restore NBTStorage for ItemEntity to fix ghost items after reconnect Re-implement write_nbt/read_nbt_non_mut to persist and restore: - Item compound (via write_item_stack/read_item_stack) - Age, PickupDelay, Health Add new_for_restore() constructor without random velocity. Update EntityType::ITEM dispatch to use new_for_restore() instead of ItemEntity::new() with AIR. * fix(clippy): resolve doc-markdown and collapsible-if in ItemEntity --------- Co-authored-by: Missing_Love <42416195+Q2297045667@users.noreply.github.com>
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.
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.
Features
- Configuration (toml)
- Tracking: Protocol
- Server Status/Ping
- Encryption
- Packet Compression
- Java/Bedrock
- ...
- 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
- Eating
- ...
- Entities
- Non-Living (Minecart, Eggs...) (W.I.P)
- Entity Effects
- Players
- Mobs (W.I.P)
- Animals (W.I.P)
- Entity AI
- Boss
- Villagers
- Entity Saving
- Server
- 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 my GitHub sponsors.
Description
Empowering everyone to host fast and efficient Minecraft servers.
dockergame-servergamedevminecraftminecraft-bedrock-editionminecraft-protocolminecraft-servernetworkingrustserver
Readme
GPL-3.0
250 MiB
Languages
Rust
100%
