promotional bannermobile promotional banner

Mob Spawner Tweaks

This is a Minecraft mod designed to control mob spawners' behaviour.

Mob Spawner Tweaks Mod Introduction

This mod references the design of the classic mod Mob Spawner Control. It provides a large number of configuration files for modifying mob spawners, which can modify the following contents of mob spawners:


🌐 Global Master Control Settings

Two independent functional switches are provided under the global settings category, you can start or stop the corresponding functional modules on demand at any time

  • ‌‌enableExtraSpawnerConfig‌‌: If set to false, all extra configurations of the spawner will not take effect, and all new extension mechanisms added by the mod will be fully disabled.
  • ‌‌enableVanillaSpawnerConfig‌‌: If set to true, the vanilla attributes of all mob spawners in the world will be overwritten by the values in the configuration. You can also set it to false, cooperate with The Lost Cities or other mods to generate some spawners with customized vanilla attribute values, and enable enableExtraSpawnerConfig at the same time to make them have the new extension mechanisms added by the mod.
  • ‌customSpawnerConfigs‌: (After version 1.1.0)When the game starts, it will generate different configuration files based on this content. The generated configurations are located under "your_minecraft_version/config/spawnertweaks". To apply a configuration, add the following tag to a spawner: "ForgeCaps": { "spawnertweaks:controllable_spawner_cap": {"ConfigName": "your_config_name(do not include the file suffix)"}} Spawners without this tag will use the global settings.

📋 Vanilla Spawner Base Attribute Configuration

  • ‌‌spawnDelay‌‌: The spawn delay of the spawner, in ticks, default value is 20.
  • ‌‌minSpawnDelay‌‌: The minimum spawn delay of the spawner, in ticks, default value is 200.
  • ‌‌maxSpawnDelay‌‌: The maximum spawn delay of the spawner, in ticks, default value is 800.
  • ‌‌spawnCount‌‌: The number of mobs spawned each time the spawner activates, default value is 4.
  • ‌‌maxNearbyEntities‌‌: The maximum number of entities allowed around the spawner, default value is 6.
  • ‌‌requiredPlayerRange‌‌: The range within which players are required to be for the spawner to spawn mobs, default value is 16 blocks.
  • ‌‌spawnRange‌‌: The radius of the range where the spawner can spawn mobs, default value is 4 blocks.

⚙️ Extra Spawner Extended Configuration

Base Settings

  • ‌‌breakSpawner‌‌: If set to false, the spawner will only be disabled when it expires, not broken.
  • ‌‌canPlayerBreakSpawner‌‌: If set to false, players will not be able to break the spawner.
  • ‌‌spawnerImmuneToExplosion‌‌: If set to true, the spawner will be immune to explosions.

Spawn Count Related Configuration

  • ‌‌limitSpawnCount‌‌: Defines whether the spawner enables the spawn count limit.
  • ‌‌mobThreshold‌‌: When the number of mobs spawned by a certain spawner reaches this number, it will stop working, the minimum value is 1.
  • ‌‌incrementOnMobDeath‌‌: If set to true, the spawner will count mobs when they are killed, not when they are spawned.
  • ‌‌incrementOnlyWhenMobDieOfPlayer‌‌: If set to true, the spawner will only count mobs when they are killed by players.
  • ‌‌multiPlayerMobThresholdIncreaseRate‌‌: When multiple players are near this spawner, this multiplier will be applied to the increase of the spawn count threshold. Calculation formula: final threshold = base threshold + (number of players - 1) x multiplier x base threshold.

Spawn Rate Related Configuration

Only takes effect when limitSpawnCount is set to true, which can realize dynamic change of the spawner's spawn speed:

  • ‌‌spawnRateModifier‌‌: This multiplier will be applied to the spawn delay of the spawner every time a mob is spawned or killed. It can be used to make the spawned mobs speed up or slow down exponentially. A value smaller than 1 results in faster spawning, larger than 1 results in slower spawning, equal to 1 means no change. The value range is 0.01~100.0, default value is 1.0.
  • ‌‌adjustSpawnRateOnMobDeath‌‌: If set to true, the spawner will adjust the spawn rate when mobs are killed, otherwise adjust the spawn rate when mobs are spawned, default value is true.
  • ‌‌minMinSpawnDelay‌‌: The minimum tick value of the spawner's minimum spawn delay modified by ‌spawnRateModifier‌, default value is 20.
  • ‌‌maxMinSpawnDelay‌‌: The maximum tick value of the spawner's minimum spawn delay modified by ‌spawnRateModifier‌, default value is 400.
  • ‌‌minMaxSpawnDelay‌‌: The minimum tick value of the spawner's maximum spawn delay modified by ‌spawnRateModifier‌, default value is 80.
  • ‌‌maxMaxSpawnDelay‌‌: The maximum tick value of the spawner's maximum spawn delay modified by ‌spawnRateModifier‌, default value is 1600.

Spawn Condition Configuration

Custom options for changing the spawn rules of mob spawners:

  • ‌‌forceSpawnerAllSpawns‌‌: If set to true, the spawner will not perform entity-specific checks on any mob. For example, animals do not need grass blocks to spawn, most hostile mobs do not need to spawn in darkness, after enabling this option, you cannot disable the spawner with artificial light sources, default value is false.
  • ‌‌checkSunlight‌‌: If forceSpawnerAllSpawns is enabled and this configuration item is set to true, it will prevent hostile mobs from spawning in sunlight, but they can still spawn when it is raining, default value is true.
  • ‌‌onlySpawnInDoors‌‌: If set to true, mobs can only be spawned indoors, which is mainly used to cooperate with The Lost Cities mod, default value is false.
  • ‌‌useIndependentPlayerRange‌‌: Use independent horizontal and vertical player range instead of vanilla spherical range check, default value is false.
  • ‌‌horizontalPlayerRange‌‌: The horizontal range within which players are required to be for the spawner to spawn mobs, default value is 16.0 blocks.
  • ‌‌verticalPlayerRange‌‌: The vertical range within which players are required to be for the spawner to spawn mobs, default value is 16.0 blocks.

Spawner Break Loot Configuration

Used to configure the drop rules of the spawner block itself when it is broken:

  • ‌‌xpDropped‌‌: The minimum amount of experience dropped when the spawner is broken, default value is 15.
  • ‌‌randXpVariation‌‌: The formula for calculating the dropped experience value is xpDropped + rand(this value) + rand(this value), default value is 15.
  • ‌‌itemsDropped‌‌: The list of item IDs dropped when the spawner is broken, the format is modid:item(:count(:chance)), count and chance are optional parameters, the default value is an empty list.

Mob Loot Configuration for Mobs Spawned by Spawners

Only takes effect on mobs spawned by spawners, and will not affect the loot rules of naturally spawned mobs at all.

‌‌defaultValues - Global Default Loot Configuration‌‌

  • ‌‌xpMultiplier‌‌: The experience drop multiplier for mobs spawned by the spawner, which is calculated first, default value is 1.0.
  • ‌‌flatXpIncrease‌‌: The fixed experience value modifier added to mobs spawned by the spawner, which is calculated after multiplying by ‌xpMultiplier‌, default value is 0.
  • ‌‌removeAllItems‌‌: Remove all existing item drops from mobs spawned by this type of spawner, and then add the "added items" in the subsequent configuration, default value is false.
  • ‌‌removedItems‌‌: Define which items should be removed from the drops of the spawned mobs, the format is modid:item, this configuration item is invalid if removeAllItems is true.
  • ‌‌addedItems‌‌: Define which items should be added to the drops of the spawned mobs, the format is modid:item(:count(:chance)), count and chance are optional parameters.

‌‌Individual Custom Configuration for Specific Mobs‌‌

  • ‌‌xpMultipliers‌‌: Individual experience drop multiplier configuration for specific mobs spawned by the spawner, the format is modid:entity:xpMultiplier(:flatXp), the flatXp parameter is optional.
  • ‌‌itemDropRemovals‌‌: Individual item drop removal configuration for specific mobs spawned by the spawner, the format is modid:entity(,modid:item)(,modid:item)..., the contents in parentheses are optional, you can enter any number of items; if you do not enter any items, all drops of this mob will be removed, and then the custom new drops of the corresponding mob will be automatically added.
  • ‌‌itemDropAdditions‌‌: Individual item drop addition configuration for specific mobs spawned by the spawner, the format is modid:entity,modid:item(:count(:chance))(,modid:item(:count(:chance)))..., the contents in parentheses are optional.

Misc

Added the /spawnertweaks reload command to reload the configuration in-game, making it convenient for modpack authors to test data.(after the version 1.2.0)


这个模组参考了https://www.curseforge.com/minecraft/mc-mods/mob-spawner-control 的设计。

这个模组提供了非常多关于修改刷怪笼的配置文件,可以修改刷怪笼以下内容:


🌐 全局总控设置

在全局设置分类下提供两个独立的功能开关,你可以随时按需启停对应功能模块

  • enableExtraSpawnerConfig‌:如果设置为false,刷怪笼的所有额外配置将不会生效,模组新增的拓展机制会全部禁用。
  • enableVanillaSpawnerConfig‌:如果设置为true,将会以配置中的数值覆盖世界中所有刷怪笼的原版属性。你也可以将它设置为false,配合失落的城市或其他mod生成一些带有定制过的原版属性值的刷怪笼,同时启用enableExtraSpawnerConfig来使他们具有模组新增的拓展机制
  • ‌customSpawnerConfigs‌:(1.1.0新增)游戏启动时会按照这个内容来生成不同的配置文件,生成的配置位于“你的游戏版本文件夹/config/spawnertweaks下”,使用配置的方法是为刷怪笼添加如下标签:"ForgeCaps": { "spawnertweaks:controllable_spawner_cap": {"ConfigName": "你的配置文件名称(不带后缀名)"}}不带有这个标签的刷怪笼将采用全局设置

📋 原版刷怪笼基础属性配置

  • spawnDelay‌:刷怪笼的生成延迟,以刻为单位,默认值20。
  • minSpawnDelay‌:刷怪笼的最小生成延迟,以刻为单位,默认值200。
  • maxSpawnDelay‌:刷怪笼的最大生成延迟,以刻为单位,默认值800。
  • spawnCount‌:每次刷怪笼激活时生成的生物数量,默认值4。
  • maxNearbyEntities‌:刷怪笼附近允许的最大实体数量,默认值6。
  • requiredPlayerRange‌:玩家必须在范围内才能使刷怪笼生成生物的距离,默认值16格。
  • spawnRange‌:刷怪笼生成生物的范围半径,默认值4格。

⚙️ 刷怪笼额外拓展配置

基础设置

  • breakSpawner‌:如果设为 false,刷怪笼失效时只会被禁用,而不会被破坏。
  • canPlayerBreakSpawner‌:如果设为 false,玩家将无法破坏刷怪笼。
  • spawnerImmuneToExplosion‌:如果设为 true,刷怪笼将免疫爆炸。

刷怪笼生成数量相关配置

  • limitSpawnCount‌:刷怪笼是否启用生成数量限制
  • mobThreshold‌:当某个刷怪笼生成的生物数量达到这个数字时,会停止工作,最小值为1
  • incrementOnMobDeath‌:如果设为 true,刷怪笼将在生物被击杀时计数,而不是在生成时计数
  • incrementOnlyWhenMobDieOfPlayer‌:如果设为 true,刷怪笼将仅在生物被玩家击杀时计数
  • multiPlayerMobThresholdIncreaseRate‌:当多个玩家在这个刷怪笼附近时,这个倍率会应用于生成数量阈值的增加。计算公式:最终阈值 = 基础阈值 + (玩家数量 - 1) x 倍率 x 基础阈值

刷怪笼生成速率相关配置

仅在limitSpawnCount设置为true时生效,可以实现刷怪笼生成速度的动态变化:

  • spawnRateModifier‌:该倍率会在每次生物生成或击杀时应用于刷怪笼的生成延迟。可用于使生成的生物呈指数级加快或减慢。小于1则加快,大于1则减慢,等于1则不变,取值范围0.01~100.0,默认值1.0。
  • adjustSpawnRateOnMobDeath‌:如果设为 true,刷怪笼将在生物被击杀时调整生成速率,否则在生物生成时调整生成速率,默认值true。
  • minMinSpawnDelay‌:经过spawnRateModifier修改后的刷怪笼的最小生成延迟刻数的最小值,默认值20。
  • maxMinSpawnDelay‌:经过spawnRateModifier修改后的刷怪笼的最小生成延迟刻数的最大值,默认值400。
  • minMaxSpawnDelay‌:经过spawnRateModifier修改后的刷怪笼的最大生成延迟刻数的最小值,默认值80。
  • maxMaxSpawnDelay‌:经过spawnRateModifier修改后的刷怪笼的最大生成延迟刻数的最大值,默认值1600。

刷怪笼生成条件配置

用于改变刷怪笼生成规则的自定义选项:

  • forceSpawnerAllSpawns‌:如果设为 true,刷怪笼将不对任何实体执行生物特定的检查,例如动物生成需要草方块,大多数敌对生物需要在黑暗中生成,开启后你就不能通过人造光源来禁用刷怪笼了,默认值false。
  • checkSunlight‌:如果启用了forceSpawnerAllSpawns且将这个配置项设置为 true,将阻止敌对生物在阳光下生成,但仍可在雨中生成,默认值true。
  • onlySpawnInDoors‌:如果为true则只能在室内生成,主要用于配合失落的城市使用,默认值false。
  • useIndependentPlayerRange‌:使用水平和垂直玩家范围代替原版的球形范围检查,默认值false。
  • horizontalPlayerRange‌:玩家必须在这个水平范围内才能使刷怪笼生成生物,默认值16.0格。
  • verticalPlayerRange‌:玩家必须在这个垂直范围内才能使刷怪笼生成生物,默认值16.0格。

刷怪笼破坏掉落配置

用于配置刷怪笼方块自身被破坏时的掉落规则:

  • xpDropped‌:刷怪笼被破坏时掉落的最小经验值,默认值15。
  • randXpVariation‌:计算掉落经验值的公式为 xpDropped + rand(该值) + rand(该值),默认值15。
  • itemsDropped‌:刷怪笼被破坏时掉落的物品 ID 列表,格式为modid:item(:count(:chance)),数量和概率为可选参数,默认是空列表。

刷怪笼生成生物的战利品配置.

仅对刷怪笼生成的生物生效,完全不影响自然生成生物的掉落规则

defaultValues 全局默认战利品配置

  • xpMultiplier‌:刷怪笼生成的生物的经验值掉落倍率,最先被计算,默认值1.0。
  • flatXpIncrease‌:将添加给刷怪笼生成的生物的固定经验值修正,在乘以 xpMultiplier 之后计算,默认值0。
  • removeAllItems‌:移除此类刷怪笼生成的生物的所有现有物品掉落,之后会添加后续配置的“添加的物品”,默认值false。
  • removedItems‌:从生成的生物的掉落物中移除哪些物品,格式为modid:item,如果“移除所有物品”为 true,则此项无效。
  • addedItems‌:向生成的生物的掉落物中添加哪些物品,格式为modid:item(:count(:chance)),数量和概率为可选参数。

特定生物独立自定义配置

  • xpMultipliers‌:针对刷怪笼生成的某些生物的独立经验值掉落倍率配置,格式为modid:entity:xpMultiplier(:flatXp),flatXp 为可选参数。
  • itemDropRemovals‌:针对刷怪笼生成的某些生物的独立物品掉落移除配置,格式为modid:entity(,modid:item)(,modid:item)...,括号内的内容均为可选,可输入任意数量的物品;如果你不输入任何物品,则会移除该生物的所有掉落物,之后会自动添加对应生物的自定义新增掉落。
  • itemDropAdditions‌:针对刷怪笼生成的某些生物的独立物品掉落添加配置,格式为modid:entity,modid:item(:count(:chance))(,modid:item(:count(:chance)))...,括号内的内容均为可选,可输入任意数量的物品。

其他

新增/spawnertweaks reload指令,用于在游戏内重新加载配置,方便整合包作者测试数据(1.2.0版本之后)

The Mob Spawner Tweaks Team

profile avatar
  • 2
    Projects
  • 89
    Downloads

More from LeeCh914