Перейти к содержимому
Mineforgian

PassivePhantoms

A Minecraft Bukkit/Spigot plugin that makes phantoms spawn natrually in the end (no overworld spawn) & are passive until they are attacked by a player.

Загрузки
258
Подписчики
1
Обновлён
21 марта 2026 г.
Лицензия
All-Rights-Reserved

Опубликован 6 июля 2025 г.

PassivePhantoms

A Minecraft Bukkit/Spigot plugin that makes phantoms spawn naturally in the end & are passive until they are attacked by a player. Features a per-chunk mobcap system to prevent infinite spawning and movement improvements to help prevent phantoms from getting hung up on chorus fruit trees.

Note: Movement improvements are experimental and phantoms may still get hung up on chorus trees.

How It Works

  1. Natural Spawning: Phantoms spawn normally in the end (no overworld spawning)
  2. Passive Behavior: New phantoms are completely passive and won't target players
  3. Provocation: When a player attacks a phantom (melee or projectile), it becomes "angry" and can attack back
  4. Projectile Aggression: Phantoms also become aggressive when hit by arrows, tridents, snowballs, or other projectiles
  5. Immediate Response: Angry phantoms immediately target and attack the player who hit them
  6. Persistent Anger: Once a phantom is angry, it remains aggressive, retaining vanilla behaviors
  7. Mobcap Protection: Maximum of 8 phantoms per chunk prevents infinite spawning and ensures fair distribution
  8. Movement Improvements: Automatic stuck detection and escape assistance prevents phantoms from getting trapped in chorus fruit trees

Installation

  1. Download: Get the latest JAR file from the releases (v1.2.5)
  2. Install: Place PassivePhantoms-1.2.5.jar in your server's plugins/ folder
  3. (Recommended): If updating from an older version, delete the entire PassivePhantoms config folder and let the plugin generate a new one on next server start. This ensures you get all new config options and avoid legacy issues.
  4. Restart: Restart your server
  5. Verify: Check the console for "PassivePhantoms plugin enabled!" message

Configuration

The plugin generates a config.yml file on first run with the following options:

  • debug_logging: Enable/disable debug messages (default: false)
  • passive_phantoms_enabled: Enable/disable the plugin (default: true)
  • phantom_settings.custom_spawn_control: Control phantom spawning (default: true)
  • phantom_settings.end_spawn_chance: Chance for phantoms to spawn in The End (default: 0.05 = 5%)
  • phantom_settings.max_phantoms_per_chunk: Maximum phantoms per chunk (default: 8)
  • phantom_settings.movement_improvements_enabled: Enable movement improvements (default: true)
  • phantom_settings.stuck_detection_ticks: How often to check for stuck phantoms (default: 100 ticks = 5 seconds)
  • phantom_settings.stuck_threshold: Consecutive checks before considering stuck (default: 3)
  • phantom_settings.stuck_distance_threshold: Minimum movement distance (default: 1.0 blocks)
  • phantom_settings.max_stuck_attempts: Maximum escape attempts before removal (default: 5)

Commands

  • /passivephantoms - Shows plugin version and usage
  • /passivephantoms reload - Reloads the configuration
  • /passivephantoms debug - Toggle debug logging
  • /passivephantoms status - Check plugin status and phantom populations
  • /passivephantoms list - List aggressive phantoms

Permissions

  • passivephantoms.reload - Allows reloading the configuration (default: op)

Building from Source

Prerequisites

  • Java 8 or higher
  • Maven 3.6 or higher

Steps

  1. Clone this repository
  2. Run: mvn clean package
  3. Find the compiled JAR in the target/ folder

Compatibility

  • Minecraft Version: 1.13 - 1.21+
  • Server Type: Bukkit, Spigot, Paper
  • Java Version: 8 or higher

Troubleshooting

Phantoms not spawning in the end

  • Verify plugin is enabled (true by defualt)
  • Check spawn chance setting in config.yml, it is low be default, increase it to verify functionality

Phantoms not attacking after being hit:

  • Make sure you're using the latest version
  • Check server console for any error messages
  • Verify the plugin is enabled in the console

Plugin not loading:

  • Ensure you're using Java 8 or higher
  • Check that the JAR file is in the correct plugins folder
  • Verify your server version is compatible

Projectiles not making phantoms aggressive:

  • Ensure you're using version 1.2.5 or higher
  • Check that the projectile was shot by a player
  • Verify debug logging is enabled to see detailed messages

Too many phantoms spawning:

  • The mobcap system limits phantoms to 8 per chunk
  • Use /passivephantoms status to check phantom populations
  • Enable debug logging to see mobcap status messages

Config issues after updating:

  • If you experience errors or missing features after updating the plugin, delete the entire PassivePhantoms config folder and let the plugin generate a new one. This ensures all new settings are present and avoids legacy config problems.

Phantoms getting stuck in chorus fruit trees:

  • The movement improvement system automatically detects and helps stuck phantoms
  • Enable movement_improvements_enabled: true in your config (default: enabled)
  • Use /passivephantoms status to check plugin status
  • Adjust stuck_detection_ticks for more/less frequent checks
  • Increase stuck_threshold if phantoms are being helped too aggressively

License

This project is open source. Feel free to modify and distribute as needed.

Support

If you need help or have suggestions, please open an issue on the GitHub repository or join the linked Discord and navigate to # plugin-help

Ченджлог

1.3.0-Dev1aБета1.21.9, 1.21.10, 1.21.11 · 21 марта 2026 г.

1.3.0-Dev1a (2026-03-19)

  • Added Folia support baseline for passivephantoms.
  • This release was branched from the latest version to avoid breaking existing installs.
  • Internal migration/update compatibility checks were reviewed for this version line.
1.2.6-Dev1aБета1.21.9, 1.21.10, 1.21.11 · 10 марта 2026 г.

[1.2.6] - 2025-03-09

Added

  • Locktight-style config migration (config_version, merge with default, preserve comments).
  • Modrinth update checker (async; notifies ops on join via passivephantoms.notify). Supports dev versions (e.g. -Dev1a, 1.2.6b1).
  • Config options: update_checker, spawn_check_radius, end_spawn_interval_ticks. All numeric settings validated and clamped to safe ranges.
  • Per-spawn cap now uses phantoms near the player (within spawn_check_radius) so flying phantoms can’t bypass the limit; End spawn event also enforces per-chunk cap.

Changed

  • Spawn cap is radius-based (default 64 blocks) instead of chunk-only. Stuck/tree logic runs only for phantoms within 128 blocks of a player. Entity counts use getNearbyEntities for performance.
  • Config comments and status command updated. Early exit when end_spawn_chance is 0.

Fixed

  • Memory: cleanup on phantom death (all tracking maps), clear all maps on disable, prune stale UUIDs from aggressive set in movement monitor.
  • max_phantoms_per_chunk now enforced correctly when AFK in the End (was bypassed by phantoms leaving chunk).
1.2.5Релиз1.19, 1.20, 1.21 · 7 июля 2025 г.

Note: Movement improvements are experimental and phantoms may still get hung up on chorus trees.

Added

  • Movement improvements: Automatic stuck detection and escape assistance for phantoms
  • Natural tree avoidance: Guides phantoms to fly around chorus fruit trees using gentle velocity adjustments
  • Enhanced status command: Shows plugin status and movement improvement status

Configuration

  • phantom_settings.movement_improvements_enabled: Enable/disable movement improvements (default: true)
  • phantom_settings.stuck_detection_ticks: How often to check for stuck phantoms (default: 100 ticks = 5 seconds)
  • phantom_settings.stuck_threshold: Consecutive checks before considering stuck (default: 3)
  • phantom_settings.stuck_distance_threshold: Minimum movement distance (default: 1.0 blocks)
  • phantom_settings.max_stuck_attempts: Maximum escape attempts before removal (default: 5)
  • phantom_settings.tree_avoidance_enabled: Enable/disable tree avoidance (default: true)
  • phantom_settings.tree_avoidance_radius: Detection radius for chorus fruit trees (default: 3.0 blocks)

Technical Details

  • Single optimized monitoring task handles both stuck detection and tree avoidance
  • Tree avoidance uses gentle velocity adjustments instead of teleportation for natural flight
  • Stuck detection uses distance-based movement tracking with configurable thresholds
1.2.5b2Бета1.19, 1.20, 1.21 · 7 июля 2025 г.

Added

  • Per-chunk mobcap system: Prevents infinite phantom spawning with a limit of 8 phantoms per chunk
  • Configurable mobcap: New phantom_settings.max_phantoms_per_chunk setting allows server admins to adjust the per-chunk limit
  • Mobcap monitoring: Enhanced /passivephantoms status command shows phantom populations per world
  • Chunk-based spawning: Phantoms now spawn based on chunk limits rather than world-wide limits
  • Better distribution: Prevents single players from hogging all phantoms in a world
  • Debug logging: Shows chunk coordinates and mobcap status in debug messages. Enable debug_logging: true to see when chunk mobcaps are reached.

Changed

  • Spawn system: Changed from per-world (15 phantoms) to per-chunk (8 phantoms) limits
  • Performance: More efficient phantom counting using chunk-based calculations
  • Fairness: Better phantom distribution across multiple players in different areas
  • Configuration: Mobcap is now configurable instead of hardcoded
  • Logic robustness: Mobcap logic is robust and tested; no chunk will ever exceed the configured limit, mirroring vanilla mobcap enforcement.

Technical Details

  • Uses chunk coordinates (blockX >> 4, blockZ >> 4) for efficient counting
  • Each chunk can independently have up to the configured limit (default: 8 phantoms)
  • Multiple chunks can each reach their limit, allowing higher total phantom populations
  • Maintains compatibility with multiple End worlds
  • Configurable mobcap supports values from 5 (conservative) to 15+ (generous)
  • Mobcap enforcement is logged when debug_logging is enabled
1.2.5b1Бета1.19, 1.20, 1.21 · 7 июля 2025 г.

Fixed

  • CRITICAL: Fixed phantom targeting issue where Phantom aggresion would randomly break
  • CRITICAL: Fixed phantom aggression persistence - phantoms now stay aggressive after being hit
  • Changed event priority from LOWEST to HIGH for better compatibility with other plugins
  • Improved phantom damage event handling to ensure immediate aggression
  • Fixed targeting logic to properly handle null targets for aggressive phantoms
  • Added immediate re-targeting for aggressive phantoms when they lose their target
  • Fixed variable scoping issues in lambda expressions

Added

  • New /passivephantoms debug command to toggle debug logging in-game
  • New /passivephantoms status command to check plugin status and aggressive phantom count
  • New /passivephantoms list command to list all aggressive phantoms and their current targets
  • Enhanced debug logging with phantom UUIDs for better troubleshooting
  • Tab completion for all /passivephantoms commands with smart filtering
  • Comprehensive tracking of when phantoms are added/removed from aggressive set

Changed

  • Updated version to 1.2.5 to reflect critical bug fixes
  • Improved command help messages with new subcommands
  • Enhanced targeting event logging to show target information and aggressive status
  • Better error handling and safety checks for phantom targeting

Technical Details

  • Aggressive phantoms now re-target immediately when they lose their target (null)
  • Re-targeting uses next-tick scheduling to avoid event conflicts
  • Only re-targets when phantom actually loses target, not constantly
  • Preserves natural phantom AI attack cycles while maintaining aggression
1.2.4Релиз1.19, 1.20, 1.21 · 7 июля 2025 г.

1.2.4 beta 1

-Projectile Aggression: Phantoms now become aggressive when hit by projectiles (arrows, tridents, snowballs, etc.) from players

-Enhanced command feedback with colored messages

-Permission system for the reload command

-Better debug logging for projectile attacks

-Better Config migration when updating version

1.2.3Релиз1.21.5, 1.21.6, 1.21.7 · 6 июля 2025 г.

Phantom aggression not triggered by projectiles. Will be fixed in 1.2.4.

Комментарии

Загружаем…