📄
pasted-code-1793351751612.txt
txt
722 lines
▶
# PROJECT: Advanced Zombie Horde – Nighttime Invasion Overhaul
## Minecraft Java Edition 26.3 | Fabric | Java 25
Act as a senior Minecraft Java mod developer specializing in Fabric modding, Java 25, Minecraft 26.3, Gradle, Fabric API, entity AI, custom mobs, pathfinding, world events, multiplayer synchronization, and performance optimization.
Your task is to modify the existing Zombie Horde mod into a fully configurable, immersive, nighttime zombie invasion system.
This is an actual mod development project. Do not merely explain how to implement the features or provide pseudocode. Inspect the original mod, modify its source code, compile it, test it, and deliver a working Minecraft Fabric `.jar`.
## ORIGINAL MOD
Official Modrinth page:
https://modrinth.com/mod/zombie-horde-mod
Use the original Zombie Horde mod as the foundation.
Preserve its existing mechanics and functionality wherever possible. Do not unnecessarily replace the original implementation with an entirely unrelated mod.
If source code is unavailable, investigate the original JAR through decompilation and reconstruct the project while preserving its existing behavior.
---
# 1. STRICT DEVELOPMENT ENVIRONMENT
The project must target:
- Minecraft Java Edition: 26.3
- Mod loader: Fabric
- Java: 25
- Fabric Loader: Latest compatible version for Minecraft 26.3
- Fabric API: Latest compatible version for Minecraft 26.3
- Fabric Loom: Latest compatible version
- Gradle: Version compatible with the selected Loom release
IMPORTANT:
1. Do not target Minecraft 1.21.x.
2. Do not downgrade to Minecraft 26.2.
3. Do not use Forge or NeoForge.
4. Do not blindly copy outdated Fabric tutorials.
5. Verify all dependencies and APIs against Minecraft 26.3.
6. Use Java 25-compatible source code.
7. Ensure fabric.mod.json declares the correct Minecraft and Fabric dependencies.
8. Build an actual Fabric-compatible JAR.
9. If a required dependency is unavailable, report it rather than silently substituting an older version.
---
# 2. NIGHTTIME-ONLY HORDE SYSTEM
The primary objective is to make zombie invasions happen exclusively at night.
The system should automatically detect the world's time and activate the horde event when nighttime begins.
Required behavior:
- Horde events can only begin during nighttime.
- No new horde events can start during daytime.
- The system should automatically detect sunset and sunrise.
- The system should support configurable nighttime start and end times.
- Avoid triggering multiple horde events during the same night unless configured.
- Add configurable cooldowns between invasions.
- Allow the system to operate independently in multiple dimensions.
- Allow administrators to manually trigger events for testing.
When sunrise occurs:
- Stop spawning additional horde zombies.
- Allow existing zombies to continue hunting players.
- Do not automatically kill all remaining zombies.
- Do not reset difficulty progression.
- Allow optional despawning after sunrise through configuration.
Default configuration:
night_only = true
allow_daytime_hordes = false
despawn_after_sunrise = false
one_horde_per_night = true
horde_cooldown = 5
Use Minecraft world time rather than the real-world clock.
---
# 3. HORDE WARNING AND ANNOUNCEMENT SYSTEM
Before the invasion starts, players must receive atmospheric warnings.
Example messages:
- "You hear distant growling..."
- "Something is approaching."
- "The dead are gathering."
- "Something is coming for you."
- "A HORDE IS COMING!"
- "RUN. THEY ARE HERE."
Required features:
- Minecraft title announcements.
- Subtitle announcements.
- Chat announcements.
- Optional sound effects.
- Configurable warning duration.
- Configurable message rotation.
- Different announcements based on horde difficulty.
- Configurable announcement colors and formatting.
- Multiplayer synchronization.
Example event sequence:
1. Night begins.
2. A warning message appears.
3. Distant zombie sounds play.
4. A configurable countdown begins.
5. A large horde spawns around the affected players.
6. Zombies begin hunting players.
Example:
Title: A HORDE IS COMING!
Subtitle: Find shelter. Prepare yourself.
Sound: Distant zombie groaning.
Delay: 30 seconds.
Allow administrators to customize all messages.
---
# 4. MASSIVE HORDE SPAWNING
The invasion should feel like a genuine zombie outbreak rather than a few randomly spawned zombies.
Required features:
- Configurable minimum horde size.
- Configurable maximum horde size.
- Configurable spawn radius.
- Configurable minimum distance from players.
- Multiple spawn groups.
- Spawning from different directions.
- Spawn outside the immediate player field of view where practical.
- Intelligent target selection.
- Aggressive player pursuit.
- Configurable spawning intervals.
- Configurable maximum active zombie count.
- Prevent spawning inside blocks, lava, or unsafe locations.
Zombies should actively chase players and attempt to reach them.
Use appropriate navigation and pathfinding.
Configuration:
minimum_horde_size = 40
maximum_horde_size = 70
minimum_spawn_distance = 35
maximum_spawn_distance = 80
spawn_groups = 4
maximum_active_horde_zombies = 100
spawn_interval = 20
These values are starting defaults, not hardcoded limitations.
Make the system configurable for weaker computers and multiplayer servers.
---
# 5. CUSTOM ZOMBIE CLASS SYSTEM
Every zombie spawned by the horde system must receive a class.
Create seven different zombie classes.
Each class must have its own attributes, behavior, abilities, and configurable spawn probability.
## CLASS 1: RUNNER
Role: Fast attacker.
Behavior:
- Extremely fast movement.
- Aggressively chases players.
- Lower health than ordinary zombies.
- Attacks rapidly.
- Can overwhelm players through numbers.
- Cannot break blocks.
Suggested attributes:
- Health: 12
- Movement speed: 0.38
- Attack damage: 3
## CLASS 2: BRUTE
Role: Heavy melee attacker.
Behavior:
- High health.
- High attack damage.
- Slow movement.
- Resistant to knockback.
- Difficult to kill.
- Cannot break blocks.
Suggested attributes:
- Health: 60
- Movement speed: 0.19
- Attack damage: 8
## CLASS 3: DEMOLITIONIST
Role: Obstacle destroyer.
This is the ONLY zombie class allowed to break blocks.
Behavior:
- Detects obstacles blocking its route to players.
- Attempts to destroy obstructing blocks.
- Uses appropriate block-breaking animations and sounds.
- Has configurable breaking speed.
- Has configurable block-breaking radius.
- Can only destroy blocks allowed by configuration.
- Cannot destroy protected blocks.
- Must respect server protection and claim systems where possible.
Suggested attributes:
- Health: 35
- Movement speed: 0.22
- Attack damage: 5
CRITICAL:
No other zombie class may break blocks under any circumstances.
## CLASS 4: SCREAMER
Role: Horde summoner.
Behavior:
- Detects nearby players.
- Emits a loud scream.
- Attracts nearby zombies toward the detected player's location.
- Can potentially alert other zombie groups.
- Has configurable detection radius.
- Has configurable scream cooldown.
- Cannot break blocks.
Suggested attributes:
- Health: 25
- Movement speed: 0.23
- Attack damage: 3
## CLASS 5: TANK
Role: Heavy assault zombie.
Behavior:
- Extremely high health.
- Very slow movement.
- Deals substantial damage.
- Resistant to knockback.
- Can knock players backward.
- Cannot break blocks.
Suggested attributes:
- Health: 120
- Movement speed: 0.14
- Attack damage: 12
## CLASS 6: STALKER
Role: Stealth attacker.
Behavior:
- Moves quietly.
- Attempts to approach players without being noticed.
- Uses terrain and darkness to its advantage.
- Can have increased detection range at night.
- Can have configurable stealth behavior.
- Cannot break blocks.
Suggested attributes:
- Health: 22
- Movement speed: 0.27
- Attack damage: 5
## CLASS 7: SPITTER
Role: Ranged attacker.
Behavior:
- Attacks players from a distance.
- Fires damaging projectiles.
- Uses configurable attack range.
- Has configurable attack cooldown.
- Has configurable projectile speed and damage.
- Cannot break blocks.
Suggested attributes:
- Health: 30
- Movement speed: 0.20
- Attack damage: Configurable projectile damage.
All suggested attributes must be configurable.
---
# 6. CLASS DISTRIBUTION AND SPAWN PROBABILITIES
Every zombie spawned by the horde system should be assigned a class through a configurable weighted random distribution.
Suggested default distribution:
Runner: 35%
Brute: 20%
Demolitionist: 5%
Screamer: 10%
Tank: 5%
Stalker: 15%
Spitter: 10%
Requirements:
- Allow individual classes to be enabled or disabled.
- Allow configurable spawn probabilities.
- Validate the total probability distribution.
- Support weighted random selection.
- Allow maximum simultaneous counts for special classes.
- Prevent excessive special-class spawning.
- Support different class distributions based on difficulty.
- Allow administrators to customize distributions without modifying Java code.
Example:
If Demolitionist is disabled, redistribute its probability among enabled classes proportionally or according to a configurable fallback strategy.
---
# 7. DEMOLITIONIST BLOCK DESTRUCTION SYSTEM
This mechanic is especially important.
ONLY Demolitionists may destroy blocks.
All other zombie classes must be completely prevented from breaking blocks.
Demolitionist requirements:
- Identify blocks obstructing its path toward a target.
- Select valid destructible blocks.
- Perform configurable block-breaking actions.
- Display appropriate breaking animations.
- Play block-breaking sounds.
- Support configurable breaking delays.
- Support configurable block-breaking radius.
- Support configurable maximum destruction per zombie.
- Optionally drop destroyed blocks.
- Prevent infinite block destruction loops.
- Avoid destroying blocks that do not obstruct navigation.
Add configurable block whitelists and blacklists.
Default protected blocks must include:
- Bedrock
- Barrier blocks
- Command blocks
- Structure blocks
- End portal frames
- Other essential or administrator-protected blocks
Add configuration options:
demolitionist_enabled = true
block_breaking_enabled = true
block_breaking_speed = 4
block_breaking_radius = 2
maximum_blocks_destroyed = 20
block_drops = false
Use safe server-side block modification.
Respect protection systems and server permissions wherever supported.
Do not implement unrestricted block destruction.
---
# 8. DIFFICULTY PROGRESSION
Hordes should gradually become more dangerous as players survive more nights.
Example progression:
EARLY NIGHTS:
- Smaller hordes.
- Mostly Runners.
- Occasional Brutes.
- Few special zombies.
MIDDLE NIGHTS:
- Larger hordes.
- More Brutes and Screamers.
- Stalkers become more common.
- Demolitionists begin appearing more frequently.
LATE NIGHTS:
- Increased zombie health and damage.
- Larger invasion groups.
- More Tanks and Spitters.
- More coordinated zombie attacks.
ADVANCED NIGHTS:
- Extremely dangerous hordes.
- Higher special-class probabilities.
- Multiple attack groups.
- Increased zombie aggression.
Configuration:
difficulty_scaling = true
difficulty_increase_per_night = 1
maximum_difficulty = 20
horde_size_scaling = true
zombie_health_scaling = true
zombie_damage_scaling = true
special_class_scaling = true
Progression must persist between nights and server restarts.
Do not reset progression when a horde ends.
Allow administrators to configure or manually reset progression.
---
# 9. HORDE AI AND COORDINATION
Make zombies feel like a coordinated invasion force.
Required behavior:
- Zombies should pursue nearby players.
- Zombies should navigate around obstacles.
- Runners should attempt to catch fleeing players.
- Brutes and Tanks should pressure players from the front.
- Stalkers should approach from less obvious directions.
- Screamers should alert other zombies.
- Spitters should maintain a suitable ranged distance.
- Demolitionists should destroy valid obstacles when necessary.
Avoid making every zombie use identical AI.
Use different goals and behavior depending on class.
Prevent excessive pathfinding calculations and unnecessary AI updates.
---
# 10. CONFIGURATION SYSTEM
Create a complete configuration system.
Prefer TOML or JSON with clear section organization.
The configuration should contain:
GENERAL:
- Enable/disable the mod.
- Enable/disable horde events.
- Debug mode.
- Multiplayer settings.
NIGHTTIME:
- Night-only mode.
- Starting time.
- Ending time.
- One horde per night.
- Sunrise behavior.
- Event cooldown.
ANNOUNCEMENTS:
- Warning messages.
- Countdown.
- Sounds.
- Title and subtitle settings.
- Message colors.
SPAWNING:
- Minimum horde size.
- Maximum horde size.
- Spawn radius.
- Spawn distance.
- Spawn groups.
- Spawn intervals.
- Maximum active zombies.
CLASSES:
- Enable/disable each class.
- Health.
- Speed.
- Damage.
- Abilities.
- Cooldowns.
- Detection ranges.
DISTRIBUTION:
- Individual class probabilities.
- Special-class limits.
- Difficulty-dependent distribution.
DIFFICULTY:
- Scaling.
- Night progression.
- Maximum difficulty.
- Health scaling.
- Damage scaling.
DEMOLITION:
- Enable/disable block destruction.
- Breaking speed.
- Block whitelist.
- Block blacklist.
- Maximum blocks destroyed.
- Block drops.
- Protected blocks.
PERFORMANCE:
- Maximum active entities.
- AI update intervals.
- Spawn throttling.
- Entity cleanup.
Every important gameplay mechanic must be configurable without editing Java source code.
Provide sensible default values.
---
# 11. ADMINISTRATOR COMMANDS
Implement administrative commands.
`/zombie_horde start`
Manually starts a horde event.
`/zombie_horde stop`
Stops the current event.
`/zombie_horde status`
Displays the current event status.
`/zombie_horde enabled true|false`
Enables or disables the system.
`/zombie_horde reload`
Reloads the configuration.
`/zombie_horde difficulty`
Displays the current difficulty.
`/zombie_horde difficulty set `
Changes the difficulty.
`/zombie_horde spawn `
Spawns a specified zombie class for testing.
`/zombie_horde classes`
Displays available zombie classes.
Commands must require appropriate permissions.
---
# 12. MULTIPLAYER SUPPORT
The system must work correctly on dedicated Fabric servers.
Requirements:
- All spawning logic must be server-side.
- The server controls the event lifecycle.
- All participating players receive announcements.
- Entity attributes and class assignments synchronize correctly.
- Prevent multiple simultaneous event triggers caused by multiple players.
- Ensure zombies can target different players.
- Avoid duplicate spawning.
- Persist event progression and relevant world data.
- Handle players joining or leaving during an event.
- Ensure configuration is controlled by the server.
---
# 13. PERFORMANCE OPTIMIZATION
The mod must be suitable for multiplayer servers and lower-end computers.
Avoid:
- Excessive entity spawning.
- Unnecessary entity ticking.
- Expensive pathfinding calculations every tick.
- Infinite spawning loops.
- Memory leaks.
- Excessive block updates.
- Unrestricted demolition.
- Duplicate event scheduling.
Implement:
- Configurable entity caps.
- Spawn throttling.
- AI update intervals.
- Efficient target searching.
- Proper entity cleanup.
- Safe event scheduling.
The system should remain configurable for smaller servers and weaker computers.
---
# 14. TESTING AND VERIFICATION
Do not consider the project finished merely because it compiles.
Perform actual tests.
TEST 1: NIGHTTIME ACTIVATION
- Advance the world to nighttime.
- Verify that the warning appears.
- Verify that the horde spawns after the configured delay.
TEST 2: DAYTIME PREVENTION
- Advance the world to daytime.
- Verify that no new horde event begins.
TEST 3: SUNRISE
- Allow nighttime to transition into daytime.
- Verify that spawning stops.
- Verify that existing zombies continue pursuing players by default.
TEST 4: ANNOUNCEMENTS
- Verify titles, subtitles, chat messages, and sound effects.
TEST 5: CLASS ASSIGNMENT
- Spawn a large horde.
- Verify that all seven classes can spawn.
- Verify that their attributes and behaviors are distinct.
TEST 6: DEMOLITIONIST
- Spawn each zombie class near a test structure.
- Verify that only Demolitionists can break blocks.
- Verify that protected blocks remain intact.
TEST 7: DISTRIBUTION
- Spawn a sufficiently large test sample.
- Verify that weighted class probabilities work approximately as configured.
TEST 8: DIFFICULTY
- Advance multiple nights.
- Verify that difficulty increases.
- Restart the server and verify that progression persists.
TEST 9: MULTIPLAYER
- Test with multiple players.
- Verify announcements, targeting, spawning, and synchronization.
TEST 10: PERFORMANCE
- Test with large hordes.
- Monitor server tick performance.
- Verify that entity caps and spawning limits work.
Document all test results honestly.
If any test cannot be performed, explicitly identify it as unverified.
---
# 15. FINAL DELIVERABLES
Provide:
1. Fully compiled Minecraft 26.3 Fabric JAR.
2. Complete modified source code.
3. Configuration file with documented settings.
4. Installation instructions.
5. Administrator command documentation.
6. Testing results.
7. List of completed features.
8. Known limitations and compatibility notes.
The JAR must be loadable using Fabric Loader on Minecraft 26.3.
Do not provide a fake, empty, placeholder, or incorrectly targeted JAR.
Do not claim successful implementation of features that are only partially implemented.
If a feature cannot be implemented reliably, explain the limitation and provide a practical alternative.
---
# FINAL DEVELOPMENT PRIORITY
Prioritize development in this order:
1. Minecraft 26.3 Fabric compatibility.
2. Nighttime-only event scheduling.
3. Warning announcements.
4. Large zombie horde spawning.
5. Functional zombie class assignment.
6. Unique class AI and abilities.
7. Demolitionist-exclusive block destruction.
8. Configurable class distribution.
9. Difficulty progression.
10. Multiplayer synchronization.
11. Performance optimization.
12. Final testing and packaging.
Build the actual mod, not merely a demonstration.
The final experience should feel like a dangerous, progressively escalating zombie apocalypse that begins every night, warns players before an invasion, and sends different specialized zombie classes hunting them until they survive or die.
Create the Fabric 26.3 project metadata and default configuration.
Implement server-side night scheduling, warnings, spawning, classes, and persistent progression.
Add administrator commands, then report what was implemented and what remains unverified.
Created a clean-room Fabric 26.3 project. The workspace was empty, so the original Zombie Horde mod’s source or JAR was unavailable; its existing mechanics could not be preserved. A compiled JAR and gameplay tests are not available from this work.
Implemented:
Automatic nighttime events per dimension, configurable night times, a warning countdown, one-horde-per-night scheduling, cooldowns, and sunrise stopping further spawns without removing existing zombies by default.
Server-side zombie spawning around players, with configurable size, distance, groups, interval, and per-event spawn budget.
Seven weighted zombie classes with configurable enablement and health, speed, and damage. Difficulty progression is saved per dimension.
Admin commands:
/zombie_horde start,stop,status,enabled <true|false>,reload,difficulty,difficulty set <level>,spawn <class> <amount>, andclasses.Default settings in
src/main/resources/zombiehorde.properties; the server copies them toconfig/zombiehorde.propertieson first run.
Important limitations: Classes are vanilla zombies with names and adjusted attributes; role-specific abilities are not implemented. In particular, Spitters do not fire projectiles, Screamers do not alert other zombies, and Demolitionists do not break blocks. Announcements currently use chat rather than titles, subtitles, or sound. The spawn limit is a per-event budget, not a count of every surviving horde zombie across nights. Difficulty values above 255 are not reliably persisted by the current save encoding. Compilation and the requested in-game tests remain unverified.
To build and download the JAR in Kodari: click Compile in the top bar, click Compile in the build window, then click Download when the build succeeds.
package com.kodari.zombiehorde;
import net.fabricmc.api.ModInitializer;
public final class ZombieHordeMod implements ModInitializer {
@Override
public void onInitialize() {
HordeManager.initialize();
}
}