mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-30 20:14:23 +00:00
7552eff6b2a4270997f4d0bd89e9fa3e595495a7
Implements the full vanilla Minecraft 26.2 mob equipment system, giving mobs weapons, armor, enchantments, and loot-pickup flags at spawn. Added: - Data-driven EQUIPMENT_REGISTRY mapping 13 mob types (zombie, husk, zombie_villager, drowned, zombified_piglin, skeleton, stray, bogged, wither_skeleton, piglin, pillager, vindicator) to their weapon and armor configurations, all verified against decompiled vanilla sources. - Exact vanilla RegionalDifficulty formula from DifficultyInstance.java: computes effective_difficulty and special_multiplier from base difficulty, game time, chunk inhabited time, and moon phase. When special_multiplier is 0.0 (fresh Normal/Easy worlds), equipment, enchantments, and loot-pickup flags are suppressed, matching vanilla. - Vanilla-accurate armor selection: random base tier (0-2) with up to 3 upgrade attempts at 10.87% each, partial armor break chance (10% on Hard, 25% otherwise). Higher difficulty produces fewer pieces. - Weighted enchantment selection with exclusive-set conflict resolution and cost-based level determination. Curated flat pools per equipment category (melee/trident/bow/crossbow/fishing_rod/head/chest/legs/feet). - Per-slot equipment drop chances (0.085 default) with looting bonus (+lootingLevel * 0.01 per vanilla EnchantmentHelper). - Exact vanilla drop durability formula from Mob.dropCustomDeathLoot: damage = maxDamage - random(1 + random(max(maxDamage-3, 1))). - CAN_PICK_UP_LOOT mob flag (bit 3, value 8) set probabilistically at 55% * special_multiplier. - Guard against empty equipment packets in send_equipment_changes to prevent client decode crashes. - Chunk inhabited_time tracking in world tick for difficulty scaling. Integration: equip_mob_on_spawn is called from the blanket EntityBase::init_data_tracker impl, so every mob type automatically participates. New mobs are added by inserting a MobEquipmentDef into the EQUIPMENT_REGISTRY with their weapon/armor config. cargo check: passes / cargo clippy (pedantic): 0 warnings / cargo fmt: clean
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 the Donation Page.
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%
