Adjusted Phantom Spans
A modification that allows detailed configuration of phantom spawning conditions in the game.
Operational Features
In the original game, phantoms spawn with a global cooldown of 1 to 2 minutes (random value after the previous interval ends). This mod provides the gamerule phantomSpawningCooldownPercentage, allowing adjustment of this cooldown as a percentage relative to default values. Lower values mean more frequent phantom spawns, while higher values mean less frequent spawns.
The "Time Since Last Rest" statistic for each player must exceed 1 hour (72,000 ticks or 3 game days) for phantoms to be able to spawn. The new setting phantomSpawningThreshold regulates this threshold in ticks. Lowering the threshold forces players to sleep more often to prevent phantom spawns, while increasing it allows for less frequent sleeping.
The probability of phantom spawns directly depends on how much the player has exceeded the set rest threshold. This probability is also adjustable through the phantomSpawningChancePercentage rule: minimum values reduce spawn chances, maximum values increase them.
Practical Application
Changing the cooldown between phantom spawns:
/gamerule phantomSpawningCooldownPercentage <percentage value - default 100>
Important Note
Manual cooldown reset is not possible. Setting a high value may require waiting even after lowering the parameter subsequently.
Configuring the sleepless time threshold:
/gamerule phantomSpawningThreshold <number of ticks - default 72000 - one game day equals 24000>
Adjusting spawn probability:
/gamerule phantomSpawningChancePercentage <percentage value - default 100>