Спавнер мобів

Матеріал з Minecraft Wiki
Перейти до: навігація, пошук
Спавнер мобів
Spawner.pngPig Spawner.pngZombie Spawner.pngSkeleton Spawner.pngSpider Spawner.pngCave Spider Spawner.pngSilverfish Spawner.pngBlaze Spawner.png
Тип

Твердий блок

Вимоги

Нi

Фізика

Нi

Прозорість

Так

Висвітлення

Нi

Вибухостійкість

{{{tntres}}}

Міцність

7.5

Інструмент

Поновлюваний

Нi

Складається

Так (64)

Займистий

Ні

Перша поява

Infdev (Seecret Friday Update 2)

Дроп

Цей же блок

Ідентифікатор блоку-об'єкта

MobSpawner

Значення даних

dec: 52 hex: 34 bin: 110100

Ім'я

Див. Значення даних

Попередження.svg
Цю статтю потрібно терміново оновити. Ви можете допомогти, оновивши вміст статті згідно з останніми версіями Minecraft.

Спавнери — це блоки, які мають вигляд темно-синьої клітки, які можна знайти в закинутих шахтах, фортецях. В середині клітки there are flames that do not give off any light and a miniature spinning version of the mob that will spawn, which slowly increases speed until the next mob spawns. Spawners can spawn any mob. However without the use of an inventory editor or custom map they only spawn zombies, skeletons, spiders, cave spiders, blazes, or silverfish.

Players have designed many traps to kill mobs from spawners, employing a long fall, drowning, lava, cactus or a combination of these, which allow the player to collect drops or experience in great numbers with little risk (see monster spawner traps.)

The monster spawner is only available through use of the /give cheat.

Occurrence

A monster spawner with a skeleton inside.

Spawners can occur in these places, spawning mobs chosen randomly when generated:

Dungeons
Spawns Zombies (50% chance), Skeletons (25%), or Spiders (25%). One per dungeon.
Покинуті шахти
Spawns Cave Spiders. Located in horizontal tunnels, heavily surrounded by Cobwebs.
Strongholds
Spawns Silverfish. Located in the End Portal room. One per stronghold.
Nether Fortresses
Spawns Blazes. Located on balconies with stairs leading up to them.

Naturally occurring spawners will not spawn passive animals, Creepers, or Endermen. However, if a map editor or mod is used to create a spawner for any mob, excluding a giant zombie, it will function as expected (so it will even spawn Enderdragons!)

There is no way to obtain a spawner in your inventory in Survival mode, unless you turn on cheats, or use mods with an inventory editor program, or use the "/give" operator command in a multiplayer server. It does not appear in the Creative mode inventory, but can be obtained using the pick block feature. If such a spawner is placed, or if a spawner is missing its tile entity data, it will spawn pigs.

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 7 or below), and animals must spawn 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 radius of 16 blocks from the spawner. While the block is active, it will spawn mobs within an 8 × 3 × 8 block area (8 wide and 3 high and 8 long), 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 39.95 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 17 × 9 × 17 area (17 wide and 9 high and 17 long), centered on the spawner block, the spawner "poofs" without creating any monsters and then waits for the next cycle. However, if there are more of the mob outside of the specified range, then the monster spawner will continue spawning mobs indefinitely.

Note that while mobs are spawned at an integer y coordinate, the x and z coordinates are fractions, 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 8 × 8 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 Minecraft versions above 1.2.5, this is no longer the case.

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 1.2.5.

every spawn cycle (every randInt(200,799) ticks when a player is within
    17 blocks 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 integer 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

	  blaze:
		light level 11 or less

	  silverfish:
		light level 11 or less, or on Stone blocks
		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

Bugs

  • If a Monster Spawner is destroyed in multiplayer by a server process (e.g. TNT) the box will be deleted, but the flames inside will remain, until the client/player logs off and back onto the server.(Tested on Xbox 360 and PC)
  • The spawning distance is two blocks off vertically in multiplayer. Even if the client shows flames in the spawner block you have to go up two more blocks for the Monster Spawner to actually spawn mobs.
  • If you shoot an Arrow at a Monster Spawner, in a dark room, in Creative Mode, The flames will grow very glitchy, with the appearance of many different spawners on top of each other (condensed). (Only tested on multiplayer)
  • In 12w27a and the Xbox 360 Edition, spawners show pigs, but spawn the correct mob.
  • In the pre release version of 1.3, the model in the spawner spins extremely fast, which makes it difficult to determine when monsters will spawn from the spawner. Due to the stroboscopic effect the rotation may seem irregular.

Notes

  • As of version 1.3.1, mining a mob spawner gives 15–43 experience, similar to coal, lapis lazuli, diamond and emerald ores. A stack of spawners when mined will give roughly 40 lvl.
  • It's impossible to choose the mob to spawn when placing a Mob Spawner (without mods), because it has tile data.
  • The model inside the monster spawner has an ID number like all other mobs, though it is only visible at certain angles and cannot be seen since Beta 1.8.
  • Since monster spawners are stored as tile entities, they cannot be pushed by pistons.
  • It is possible for a monster spawner to occur near the surface and completely buried in sand, with monsters spawning in small gaps underneath sandstone.
  • Unlike most other transparent blocks, it is possible to place torches on a monster spawner.
  • It is possible for two monster spawners to naturally occur directly side-by-side.
  • As of version 1.2.5, monster spawners are available in creative mode by using the Pick Block button on a natural generated monster spawner. When placed, they will spawn pigs, if there is a grass block in the vicinity of the spawner.
  • The traditional torch on the spawner may not be sufficient to completely disable it. Lighting the walls as well is safer.
Spawning
  • When mining near a monster spawner that has no valid places to spawn, sometimes a monster will spawn immediately after a block is mined. The player should take caution for this reason while collecting Moss Stone from a dungeon but hasn't destroyed the monster spawner. It's speculated this might happen because the spawner gets a chance to spawn before the lighting calculation for the space the block occupied.
  • A monster spawner may spawn 1, 2, 3 or even 4 mobs at once [1]
  • If the game is set on Peaceful, the mobs will spawn, but will immediately despawn, as usual. In some cases, mobs will play their sound file before they de-spawn. It is also possible for a skeleton to shoot its arrow at the player before it de-spawns, though this is very rare.
The miniature mob inside the spawner
  • If the player is not within range, the miniature mob inside the spawner will stop spinning, and the mob spawner will stop emitting fire particles.
  • The miniature mob inside the mob spawner will spin faster when it is about to spawn monsters. There are set minimum and maximum speeds for which the miniature mob can rotate.

Trivia

  • As of version 12w22a, mining a mob spawner gives 15–43 experience, similar to coal, lapis lazuli, redstone, diamond and emerald ores. A stack of spawners when mined will give roughly 40 lvl.
  • It is possible to choose which mob a spawner will spawn, but unless you know what each mob in its tile data is, this will be difficult.
  • Since monster spawners are stored as tile entities, they cannot be pushed by pistons.
  • It is possible for a monster spawner to occur near the surface and completely buried in sand, with monsters spawning in small gaps underneath sandstone.
  • Unlike most other transparent blocks, it is possible to place torches on a monster spawner.
  • It is possible for two monster spawners to naturally occur directly side-by-side.
  • As of version 1.2.5, monster spawners are available in creative mode by using the Pick Block button on a natural generated monster spawner. When placed, they will spawn pigs, if there is a grass block in the vicinity of the spawner.
  • The traditional torch on the spawner may not be sufficient to completely disable it. Lighting the walls as well is safer.
  • When mining near a monster spawner that has no valid places to spawn, sometimes a monster will spawn immediately after a block is mined. The player should take caution for this reason while collecting Moss Stone from a dungeon but hasn't destroyed the monster spawner. It's speculated this might happen because the spawner gets a chance to spawn before the lighting calculation for the space the block occupied.
  • A monster spawner may spawn 1, 2, 3 or even 4 mobs at once [1]
  • If the game is set on Peaceful, the mobs will spawn, but will immediately de-spawn, as usual. In some cases, mobs will play their sound file before they de-spawn. It is also possible for a skeleton to shoot its arrow at the player before it de-spawns.
  • If the player is not within range, the miniature mob inside the spawner will stop spinning, and the mob spawner will stop emitting fire particles, along with not working all together.
  • The miniature mob inside the mob spawner will spin faster when it is about to spawn monsters. There are set minimum and maximum speeds for which the miniature mob can rotate.
  • Zombie Pigmen spawners cannot be disabled with light. They can spawn at any light level.
  • As of 1.0.1, Monster Spawners now show a miniature figure of the mob they will spawn (Single Player only, Xbox 360 Edition).
  • It is possible that spawners may be obtainable in survival mode, as shown by Minecart with Spawner.

History

Java Edition Infdev
Seecret Friday Update 2 Added mob spawners. They could be picked up and when placed, spawned pigs.
June 27, 2010 Mob spawners given a unique ID, reducing crashes.
Java Edition Beta
?Changed name from mob spawner to monster spawner.
1.2 Monster spawners again now show a rotating model inside of what they spawn in single player after being missing for several versions.
1.9-pre1 Changed monster spawner texture to a darker color.
1.9-pre4 It was now possible to obtain a monster spawner using a tool enchanted with Silk Touch. When placed they would only spawn pigs.
1.9-pre4 Silk Touch is now ineffective on spawners.
1.9-pre5 Squid spawners now only work in a narrow elevation range, from 46 to 62.
Java Edition
1.0.0 Monster spawners are now easier to destroy.
12w06a Monster spawners now show the mob they are spawning in multiplayer; previously it always showed a pig.
12w22a Monster spawners will now drop experience when destroyed.
12w26a Monster spawners now support extra data pertaining to what they spawn. For example, they can spawn Charged Creepers, Endermen holding specific blocks, previously unavailable Green Robe Villagers, and Villagers offering specific deals. They can also spawn non-mob entities, like specific dropped items, primed TNT, boats and minecarts.

Gallery

See also

References

  1. а б [1] Video clearly showing two, three and four mobs spawning at the same time from a monster spawner.