NotEnoughAnimals
动物不会停止生成,在你加载新或已有的区块时随时生成,并且当你卸载实体时会消失
简介
在 beta 1.8 之前,动物会像敌对生物一样不断生成,但也会像敌对生物一样消失。但在 Minecraft beta 1.8 冒险更新之后,动物的生成机制发生了巨大变化。改变在于动物永远不会消失,但以每个区块拥有永久性的动物实体上限为代价,该上限会追踪在该区块中生成过的所有动物,因此一旦达到上限,该特定区块中将不再生成更多动物,该区块基本上变得“灭绝”了。 这一改变是为了防止农民在长时间离开农场后他们的牲畜消失。但这种改变让那些靠狩猎获取食物的人无法获得足够多的牲畜。此外,这对多人服务器来说非常糟糕,因为每个人在刚加入世界且没有装备时,很快就能达到那个实体上限,并通过杀死周围的一切来快速获取食物。
此插件的功能
本插件作为旧插件 BetterPassives 的改进重制版,试图解决这一问题并为猎人和农民找到平衡点。原版生成机制保持不变,但我们在此基础上添加了自定义的生成机制。当你加载一个区块(无论是新生成的还是已生成的),有一个概率——由配置文件决定(默认为 65%)——该区块会成为生成区块,在其中生成动物。然后,随机确定生成尝试次数,其最小值和最大值也由配置文件决定。
但当服务器卸载实体时,如果这些实体是由本插件生成的且不满足不消失的条件,它们将会消失。
你如何保留你的实体呢?你可以让它们符合原版决定它们是否应该消失的标准,例如使用命名牌,但你也可以喂养它们或繁殖它们使它们成为家畜,本质上它们及其所有后代都不会消失。
此插件不影响敌对实体、水生实体等的生成!建议仅用于控制陆地动物的生成!
实际效果
示例(请忽略被狼攻击的羊)
在服务器出生点使用 /neaglow 命令显示所有由 NotEnoughAnimals 生成的实体发光的效果
快速开始
首先,确保你满足以下要求:
然后按照以下步骤安装此插件:
- 从 Releases 页面或你正在阅读此内容的任何网站下载最新版本
- 将
NotEnoughAnimals.jar 放入服务器的 plugins/ 文件夹中
- 重启服务器,或者如果你有插件管理器,只需加载此插件即可
- 如有需要,调整
plugins/NotEnoughAnimals/config.yml 中的配置
面向服务器管理员
性能
生成检查仅在区块加载时进行。
消失检查仅在实体卸载时进行。
插件不运行持续的计时逻辑。
管理
你可以通过查看实体是否具有 _m 记分板标签来识别哪些牲畜是由本插件生成的。你也可以通过查看实体是否具有 _d 记分板标签来识别哪些牲畜是家畜。
命令
/neareload - 重新加载此插件的配置文件
/neaglow - 调试功能,使由本插件生成的实体发光
配置
以下是默认配置文件,附带一些注释以帮助你理解其含义。
# NotEnoughAnimals configuration file
# 你加载的区块成为生成实体的区块的概率
# 1.0 = 100%, 0.0 = 0%
spawning-chunk-chance: 0.65
# 在生成区块中尝试生成实体的次数
spawn-tries:
min: 1
max: 5
每种实体的生成要求
spawn-rules:
# 允许的环境。每个环境可以是 NORMAL、NETHER 或 THE_END
- environments: [NORMAL]
允许的生物群系
生物群系名称列表请参考
biomes: [PLAINS, SUNFLOWER_PLAINS]
允许站立的方块,"#" 表示插入一个方块标签的内容
方块材质名称列表请参考
标签名称列表请参考
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
在这些条件下可以生成的实体类型
实体类型名称列表请参考
types: [COW, SHEEP, PIG, CHICKEN, HORSE, DONKEY]
- environments: [NORMAL]
biomes: [FOREST, FLOWER_FOREST, BIRCH_FOREST, OLD_GROWTH_BIRCH_FOREST]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [SHEEP, PIG, CHICKEN, COW, WOLF]
- environments: [NORMAL]
biomes: [DARK_FOREST]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [SHEEP, PIG, CHICKEN, COW]
- environments: [NORMAL]
biomes: [TAIGA, OLD_GROWTH_PINE_TAIGA, OLD_GROWTH_SPRUCE_TAIGA]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [WOLF, FOX, RABBIT, SHEEP, PIG, CHICKEN, COW]
- environments: [NORMAL]
biomes: [SNOWY_TAIGA]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [WOLF, FOX, RABBIT, SHEEP, PIG, CHICKEN, COW]
- environments: [NORMAL]
biomes: [SNOWY_PLAINS, SNOWY_SLOPES, ICE_SPIKES]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [POLAR_BEAR, RABBIT, FOX]
- environments: [NORMAL]
biomes: [GROVE, FROZEN_PEAKS, JAGGED_PEAKS]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [RABBIT, FOX, GOAT]
- environments: [NORMAL]
biomes: [STONY_PEAKS, WINDSWEPT_HILLS, WINDSWEPT_GRAVELLY_HILLS]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [GOAT, SHEEP, LLAMA]
- environments: [NORMAL]
biomes: [WINDSWEPT_FOREST]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [SHEEP, PIG, CHICKEN, COW, LLAMA]
- environments: [NORMAL]
biomes: [MEADOW]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [DONKEY, SHEEP, RABBIT]
- environments: [NORMAL]
biomes: [CHERRY_GROVE]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [SHEEP, PIG, CHICKEN, BEE]
- environments: [NORMAL]
biomes: [JUNGLE, BAMBOO_JUNGLE, SPARSE_JUNGLE]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [CHICKEN, OCELOT, PARROT, PANDA]
- environments: [NORMAL]
biomes: [SAVANNA, SAVANNA_PLATEAU, WINDSWEPT_SAVANNA]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [HORSE, DONKEY, SHEEP, COW, PIG, CHICKEN]
- environments: [NORMAL]
biomes: [DESERT]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [RABBIT]
- environments: [NORMAL]
biomes: [SWAMP, MANGROVE_SWAMP]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [FROG]
- environments: [NORMAL]
biomes: [MUSHROOM_FIELDS]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [MOOSHROOM]
- environments: [NORMAL]
biomes: [BEACH, SNOWY_BEACH, STONY_SHORE]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [TURTLE]
### 许可证
本项目是自由软件:你可以依据自由软件基金会发布的 GNU 通用公共许可证(GPL)第 3 版,或(由你选择的)任何后续版本,对其再分发和/或修改。
完整文本请参阅 [LICENSE](https://github.com/someo3n/NotEnoughAnimals/blob/master/LICENSE?raw=true) 文件。
NotEnoughAnimals
Animals never stop spawning, spawn anytime you load fresh or existing chunks and now despawn when you unload entities
Introduction
Before beta 1.8, animals would spawn constantly like hostile mobs
but would despawn like hostile mobs. But Minecraft, after its beta 1.8 Adventure Update, changed how animals
spawning mechanics dramatically. The changes were that animals did not
ever despawn, but at the cost of each chunk having a permanent animal mob cap that tracks all animals ever spawned
in that chunk and so, once that cap was reached no more animals spawned in that specific chunk and the chunk was basically
"extinct" of animals. This change was made so that farmers did not have their mobs
despawn after a long trip away from their farm. But this change made the hunting for
food kind of people not get as many mobs as farmers. Also, this sucked for multiplayer
servers since everyone quickly reached that mob cap when they first joined the world
and were without gear and killed everything in their vicinity to quickly get some food.
The features of this plugin
This plugin, as an improved recreation of an old plugin called BetterPassives, tries to
fix this issue and find a balance both for hunters and farmers. The vanilla spawning mechanics
stay intact, but we also add our own spawning mechanics on top of vanilla. When you load a
chunk, fresh or already generated, there is a chance -determined by the configuration file-
(defaults to 65%) that that chunk which you loaded is a spawning chunk, where animals spawn.
Then an amount of spawning tries is determined randomly with the minimum and maximum values
for the RNG being also determined by the configuration file.
But when the server unloads entities, if those entities were spawned by this plugin and don't fit
the criteria for not despawning they will be despawned.
How will you keep your entities? Well you can make them fit the vanilla criteria that determine
if they should despawn or not, like name tagging them for example, but you can also feed them
or breed them to make them domestic mobs and essentially they and their all their generations
will not despawn.
This plugin does not affect how hostile entities, aquatic entities, etc. spawn! It is recommended
to use it only for controlling how land animals spawn!
In action
Example (don't mind the sheep being attacked by the wolf)
Example at a server's spawn with all the NotEnoughAnimals spawned entities glowing
Quick start
First, make sure you fit these requirements:
Then follow these steps to install the plugin:
- Download the latest release from the Releases page or from whatever website your reading this on
- Place
NotEnoughAnimals.jar into your server's plugins/ folder
- Restart the server or just load this plugin if you have a plugin manager
- Adjust the configuration in
plugins/NotEnoughAnimals/config.yml if needed
For server admins
Performance
Spawning checks only occur when chunks are loaded.
Despawning checks only occur when entities are unloaded.
The plugin does not run constant ticking logic.
Management
You can see which mobs were spawned by this plugin by seeing if they have
the _m scoreboard tag. You can also see which mobs are domestic by seeing if they have the
_d scoreboard tag.
Commands
/neareload - Reload the configuration file of this plugin
/neaglow - Debugging feature to make entities spawned by this plugin glow
Configuration
Here is the default configuration file, with some comments to help you understand what is
going on.
# NotEnoughAnimals configuration file
# The chance for a chunk that you load to be a chunk where entities will spawn
# 1.0 = 100%, 0.0 = 0%
spawning-chunk-chance: 0.65
# How much times to try to spawn entities in a spawning chunk
spawn-tries:
min: 1
max: 5
# Spawning requirements for each entity
spawn-rules:
# Allowed environments. Each one can be NORMAL, NETHER or THE_END
- environments: [NORMAL]
# Allowed biomes
# Refer to https://jd.papermc.io/paper/1.21.11/org/bukkit/block/Biome.html
# for a biome name list
biomes: [PLAINS, SUNFLOWER_PLAINS]
# Allowed blocks to stand on, "#" means insert the contents of a block tag
# Refer to https://jd.papermc.io/paper/1.21.11/org/bukkit/Material.html
# for a material name list
# And refer to https://jd.papermc.io/paper/1.21.11/org/bukkit/Tag.html
# for a tags name list
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
# Entity types that can spawn under these conditions
# Refer to https://jd.papermc.io/paper/1.21.11/org/bukkit/entity/EntityType.html
# for an entity type names list
types: [COW, SHEEP, PIG, CHICKEN, HORSE, DONKEY]
- environments: [NORMAL]
biomes: [FOREST, FLOWER_FOREST, BIRCH_FOREST, OLD_GROWTH_BIRCH_FOREST]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [SHEEP, PIG, CHICKEN, COW, WOLF]
- environments: [NORMAL]
biomes: [DARK_FOREST]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [SHEEP, PIG, CHICKEN, COW]
- environments: [NORMAL]
biomes: [TAIGA, OLD_GROWTH_PINE_TAIGA, OLD_GROWTH_SPRUCE_TAIGA]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [WOLF, FOX, RABBIT, SHEEP, PIG, CHICKEN, COW]
- environments: [NORMAL]
biomes: [SNOWY_TAIGA]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [WOLF, FOX, RABBIT, SHEEP, PIG, CHICKEN, COW]
- environments: [NORMAL]
biomes: [SNOWY_PLAINS, SNOWY_SLOPES, ICE_SPIKES]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [POLAR_BEAR, RABBIT, FOX]
- environments: [NORMAL]
biomes: [GROVE, FROZEN_PEAKS, JAGGED_PEAKS]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [RABBIT, FOX, GOAT]
- environments: [NORMAL]
biomes: [STONY_PEAKS, WINDSWEPT_HILLS, WINDSWEPT_GRAVELLY_HILLS]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [GOAT, SHEEP, LLAMA]
- environments: [NORMAL]
biomes: [WINDSWEPT_FOREST]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [SHEEP, PIG, CHICKEN, COW, LLAMA]
- environments: [NORMAL]
biomes: [MEADOW]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [DONKEY, SHEEP, RABBIT]
- environments: [NORMAL]
biomes: [CHERRY_GROVE]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [SHEEP, PIG, CHICKEN, BEE]
- environments: [NORMAL]
biomes: [JUNGLE, BAMBOO_JUNGLE, SPARSE_JUNGLE]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [CHICKEN, OCELOT, PARROT, PANDA]
- environments: [NORMAL]
biomes: [SAVANNA, SAVANNA_PLATEAU, WINDSWEPT_SAVANNA]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [HORSE, DONKEY, SHEEP, COW, PIG, CHICKEN]
- environments: [NORMAL]
biomes: [DESERT]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [RABBIT]
- environments: [NORMAL]
biomes: [SWAMP, MANGROVE_SWAMP]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [FROG]
- environments: [NORMAL]
biomes: [MUSHROOM_FIELDS]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [MOOSHROOM]
- environments: [NORMAL]
biomes: [BEACH, SNOWY_BEACH, STONY_SHORE]
on-top-of: ["#ANIMALS_SPAWNABLE_ON"]
types: [TURTLE]
License
This project is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
See the LICENSE file for the full text.
评论 0
登录后参与评分
还没有评论,来抢沙发吧