mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-30 20:14:23 +00:00
1ca089df173f218f1af946a0a98cf3e3cf0daca0
* perf(generation): cache computed structure starts set_structure_references runs for every chunk and, for each nearby structure candidate, recomputed the structure's placement from scratch. For jigsaw structures (villages, ancient cities, ...) that means re-running the full jigsaw expansion for every chunk whose references overlap the structure -- the same start recomputed many times over. A structure's placement depends only on its start chunk and the world seed (the surface-height estimate it uses is position-independent and min_y is constant per dimension), so memoize it in GlobalStructureCache and reuse it. In the bench, structure references drop from ~342us to ~105us. * perf(lighting): use a fast hasher in the generation light engine The BFS light propagator's visited/shadow_cache/pending_updates maps were aliased to std HashSet/HashMap (SipHash) despite being named "Fast". They are probed on every neighbour of every propagated block, so the hash function dominates. Point the aliases at rustc-hash's FxHash (already a dependency). Lighting generation drops from ~65ms to ~36ms and full chunk generation from ~103ms to ~68ms in the bench, with identical output. * perf(lighting): propagate light through storage, not a shadow cache The BFS light propagator kept a hashed shadow cache of in-flight light values plus a per-chunk batched write buffer, layered on top of the light storage. The storage is itself a fast array lookup, so the extra hashing and buffering cost more than they saved. Read and write it directly and treat it as the single source of truth. Lighting generation drops from ~36ms to ~22ms and full chunk generation from ~68ms to ~52ms, output unchanged (all pumpkin-world tests, including the fixed-seed ancient-city parity test, still pass). --------- Co-authored-by: Alexander Medvedev <lilalexmed@proton.me>
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 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
- 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%
