Template:TranslationNeeded
| 稀有度 | |
|---|---|
| 创造标签页(JE) |
刷怪蛋 |
| 创造分类(BE) |
自然 |
| 合适挖掘工具 | |
| 硬度 |
7.5 |
| 爆炸抗性 | |
| 引燃几率 | |
| 烧毁几率 | |
| 熔岩可燃性 | |
| 窒息生物 | |
| 红石导体 | |
| 最大堆叠 | |
| 亮度 |
否 |
| 光照透明 |
是 |
| 可再生 |
否 |
| 命名空间ID |
spawner |
“刷怪箱”或“生物生成器”是一种在地牢、废弃矿井、要塞和下界要塞中能够发现的,透明、深灰色各自框架结构的方块。在方块内有不提供任何亮度的火焰,和一个它会产生的不断旋转的缩小版生物。它旋转的速度会越来越快,直到一个生物被生成。
玩家已经设计了很多种陷阱杀死刷怪箱产生的生物,如利用高处坠亡、溺死、岩浆灼烧、仙人掌刺伤或者以上组合起来的陷阱。这可以使得玩家以非常小的代价获得经验并获得该生物的掉落物。(参考:刷怪塔)
“刷怪箱”是少数不能在创造模式中使用的方块之一。
出现
刷怪箱可能会在以下地点出现:
- 地牢
- 产生僵尸(50%几率),骷髅(25%几率)或者蜘蛛(24%几率),在蜘蛛刷怪箱中产生蜘蛛骑士(1%几率)。每个地牢仅有一个刷怪箱。
- 废弃矿井
- 产生洞穴蜘蛛。一般位于水平的隧道中,并且被大量的蜘蛛网所包围。
- 要塞
- 产生蠹虫,位于传送门方块所在的房间。每个要塞仅有一个。
- 下界要塞
- 产生烈焰人。位于有楼梯引领上去的阳台上。
自然产生的刷怪箱不会产生不抵抗的生物,以及爬行者、末影人。当然,如果有一个地图编辑器或Mod可以让刷怪箱产生所有种类的生物,它就会像期待的那样运行。
没有任何手段能够把刷怪箱存在你的物品栏中(即使在创造模式也不行),除非使用一个Mod,或一个物品栏修改器,或在多人服务器中使用“/give”指令。如果刷怪箱被那样放置,或者一个刷怪箱丢失了它的贴图文件,它就会产生猪。
Spawning Behavior
A spawner will spawn mobs in the surrounding area, provided suitable spawning locations for the block's mob type can be found in the area. Spawning conditions vary from mob to mob. For example, Overworld monsters can only spawn in darkness (light level 8 or below), and animals must spawn on top of grass with a light level 9 or above. However, spawner blocks can spawn mobs in mid-air, ignoring general rules about spawning on solid ground.
A monster spawner is only active when a player is within a euclidean distance of 17 blocks from the spawner. While the block is active, it will spawn mobs within an 8x3x8 block area (8 wide and 3 high and 8 deep), centered on the corner of the spawner block with the lower x and z coordinates. Mobs can spawn anywhere in this range that is suitable, even if the immediate vicinity of the spawner block itself is not suitable. The horizontal distribution is nonlinear, with positions near the spawner more likely than ones farther away.
The block will attempt to spawn 4 mobs at randomly chosen points within the spawning area, then wait anywhere from 200 to 799 ticks (10 to 40 seconds) before spawning again. As it waits, the mob inside the block will spin faster and faster. Except for spawning on a solid block, all of the usual requirements for spawning must be met (not in a solid block, correct light level, etc.), so the spawner will often produce fewer than 4 mobs. If the block fails to spawn any mobs because it did not pick any suitable locations, it will repeat this process every tick until it succeeds. Only when it manages to spawn at least one mob will it start waiting for the next cycle. If, at the time of spawning, 6 or more monsters of the block's type are present within a 17x9x17 area (17 wide and 9 high and 17 deep), centered on the spawner block, the spawner "poofs" without creating any monsters and then waits for the next cycle.
Note that while mobs are spawned at a discrete y coordinate, the x and z coordinates are real-valued, i.e. not aligned to blocks. Mobs will spawn with their legs at either the same level as the spawner block, one block above it, or one block below it, but horizontally, a mob can spawn with its center point anywhere within the 8x8 range. Since the mob itself takes up some horizontal space, this must be added to the range of the spawner to get the full dimensions of the area they can potentially occupy.
Spawners can be given unusual entity IDs like Minecart or Boat to make a decorative block with the named entity spinning inside the cage. However, when the spawner attempts to spawn such an entity, the game will crash.
In Peaceful difficulty, Monster Spawner blocks will still appear, but any spawned hostile mobs will disappear the instant they spawn. (Zombie Pigmen, Magma Cubes, and Ghasts will not spawn at all.) This makes it easy to make the traps without being troubled by the mobs. The brief instant that the monster exists in the world before being removed is enough time for the player to be pushed around, for the sound file to play, and occasionally for Skeletons to fire arrows.
Detailed Spawning algorithm
This pseudo-code is derived from the decompiled source of Minecraft 1.2.3.
every spawn cycle (every randInt(200,799) ticks when a player is in range of the spawner),
loop 4 times {
if there are 6 or more of the mob type in the 17x9x17 area around the spawner, skip this spawn cycle
calculate spawnerX = X coordinate of center of spawner - 0.5
calculate spawnerY = Y coordinate of center of spawner - 0.5
calculate spawnerZ = Z coordinate of center of spawner - 0.5
calculate x coordinate of mob = spawnerX + (randDouble() - randDouble()) * 4, randDouble being a random number between 0 and 1
calculate y coordinate of mob = spawnerY + a random whole number between -1 and 1
calculate z coordinate of mob = spawnerZ + (randDouble() - randDouble()) * 4, randDouble being a random number between 0 and 1
if all of the conditions specific to the mob type are met, spawn the mob {
chicken, cow, mooshroom, pig, sheep, wolf:
block below spawning block is grass
spawning block has a light level of 9 or higher
ocelot:
pass a 2/3 random test
block below spawning block is grass or leaves
on layer 63 or higher
creeper, enderman, skeleton, spider, cave spider, zombie:
light level 8 or less
silverfish:
light level 8 or less, no players within 5 blocks
slime:
difficulty is not set to peaceful or slime size is small
spawn block y coordinate is less than 40
the chunk containing the spawn block is a slime chunk (1 in 10 chance)
pass a 1 in 10 random test
ghast:
pass a 1 in 20 random test
squid:
must not collide with any other entities
must be in layer 46-62
all except squid and slimes:
must not collide with any blocks or other entities
must not collide with water or lava
}
}
if all 4 mobs failed to spawn, repeat on the next tick
一些Bug
- 在服务器支持的多人游戏中,如果一个刷怪箱被毁坏(如TNT),这个刷怪箱会被删除。但是它里面的火焰将一直存在,直到访客或玩家登出然后再重新登入。
琐事
- 选择一个生物让刷怪箱产生是不可能的,因为不同的刷怪箱有不同的贴图文件。
- 刷怪箱能够在附近的洞穴里产生怪物,只要是在它8*8*3的范围内,即使是在刷怪箱露天的情况下。
- 刷怪箱内的模型也像其它生物一样有着它自己的ID号码,但它只能在一些特定的角度看到,且自Beta1.8版本以来就不在能看到了。
- 因为刷怪箱是以贴图形式存在的,所以它不能被活塞所推动。
- 刷怪箱在接近地表的地方出现而被沙子掩埋是完全可能的,它产生的怪物会在沙石下的缝隙中产生。
- 和其它的透明方块不同,把火把放在刷怪箱上是可以的。
- 两个刷怪箱天然地产生在一起是完全可能的。
- 一个蜘蛛刷怪箱可能产生蜘蛛骑士,但是骷髅刷怪箱不能产生蜘蛛骑士。
- 刷怪箱能够通过在它的四周火把被暂时废止。
产生生物
- 当玩家在一个刷怪箱没有空间产生生物的地方采矿时,生物有时会产生在你刚刚采矿而产生的空间里。玩家在没有使刷怪箱失效的情况下采集苔石时因此要格外小心。据推测,这种情况会发生,是因为刷怪箱在电光石火间,得到了一个在刚刚的方块所占用空间刷新的机会。
- 一个刷怪箱会一次产生1个,2个,3个甚至4个生物。
刷怪箱内的缩小化生物
- 当玩家不在判定范围内时,刷怪箱内的生物会停止旋转,刷怪箱也会停止释放火焰粒子。
- 当刷怪箱将要产生生物时,刷怪箱内的缩小生物会旋转得更快。它所能旋转的最小和最大速度都已被设定。
修改刷怪箱
- 如果一个刷怪箱被修改,用来产生恶魂、巨人、鱿鱼、铁傀儡、村民、末影人或末影龙,它在刷怪箱内的模型将会缩小。但是它们不能很好地相适应于笼子,因为它们的比例系数和其它生物一样。
- 修改一个刷怪箱为非生物实体(如船)将会使游戏崩溃。
History
- Monster Spawners were added in Seecret Friday Update 2 in Infdev. Before Beta, they were named Mob Spawners. When first released, they could be picked up and when placed, they spawned Pigs.
- The miniature mob model displayed inside the monster spawner was enabled again in Beta 1.2 after being missing for several versions.
- In Beta 1.9 Pre-release 1, its texture was changed to a darker color.
- In 1.9 pre-releases 4 and 5 it was possible to obtain a Monster Spawner using a tool enchanted with Silk Touch. When placed they would only spawn pigs. Silk Touch was made ineffective on spawners in Beta 1.9 pre-release 6.
- As of 1.9 prerelease 5, Squid spawners only work in a narrow elevation range, approximately 45 to 60.
- As of the Minecraft 1.0, monster spawners are easier to destroy.
- As of snapshot 12w06a, mob spawners show the mob it is spawning in multiplayer; previously it always showed a pig.
Gallery
- 2011-12-21 21.48.20.png
A picture of a blaze spawner in a nether fortress
- 2011-11-27 12.33.58.png
A dungeon, connected to another dungeon, with two spawners
- 2011-03-15 14.05.55.png
A Giant spawner
- 2011-03-15 14.06.55.png
A Ghast spawner
See also
- Dungeon
- Monster Spawner Traps
References