Eshan I. fe0c442a02 fix(player): apply food exhaustion when attacking and mining (#2578)
Vanilla Player#attack ends its successful-hit branch with
causeFoodExhaustion(0.1F), and Block#playerDestroy calls
player.causeFoodExhaustion(0.005F) for every block destroyed.

Pumpkin never called add_exhaustion from either path: the only callers
were the Hunger status effect in entity/living.rs and jump/sprint
movement in entity/player.rs. Combat and mining were therefore free, so
the hunger bar was effectively cosmetic for a player who was not
sprinting.

Player::attack now adds 0.1 exhaustion at the end of the hit path,
after the damage_with_context early-return, so only hits that actually
deal damage cost hunger. The Java and Bedrock block-break handlers now
add MINE_BLOCK_EXHAUSTION (0.005) per block broken.

Mining exhaustion is gated exactly where vanilla gates
Block#playerDestroy: ServerPlayerGameMode#destroyBlock skips it in
creative and when the block was broken without a tool that can harvest
it, so the call sites reuse the existing can_harvest / block_drop
checks rather than adding new conditions. Creative and spectator
players are additionally covered by the existing abilities.invulnerable
guard in Player::add_exhaustion, which mirrors vanilla
Player#causeFoodExhaustion.

Limitation: swimming exhaustion (0.01 per metre) is still missing.
Player::progress_motion only implements the onGround branch of vanilla
ServerPlayer#checkMovementStatistics; adding the swimming and in-water
branches requires the whole else-if chain plus movement-state plumbing
(Player::is_swimming is itself still an inferred approximation carrying
a TODO), so it is deliberately left out of this change.
2026-07-30 14:21:39 +02:00
2026-07-30 12:55:41 +02:00
2026-07-25 16:48:20 +02:00
2026-07-24 12:31:57 +02:00
2025-03-29 13:25:37 +01:00
2025-05-10 12:46:42 +02:00
2026-07-26 10:25:13 +02:00
2026-07-30 12:55:41 +02:00
2026-07-30 12:55:41 +02:00
2025-08-11 20:45:55 +02:00
2024-12-04 11:37:41 +01: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%