Diferencia entre revisiones de «Generador de Monstruos»

De WikiMinecraft
Saltar a: navegación, buscar
(Detailed spawning algorithm)
Línea 103: Línea 103:
 
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.
 
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 ===
+
=== Algoritmo detallado ===
  
This pseudo-code is derived from the decompiled source of 1.4.2.
+
Este pseudo-código se deriva de la fuente descompilada source 1.4.2.
 
<pre>
 
<pre>
 
every spawn cycle (every randInt(200,799) ticks when a player is within
 
every spawn cycle (every randInt(200,799) ticks when a player is within
Línea 168: Línea 168:
 
if all 4 mobs failed to spawn, repeat on the next tick
 
if all 4 mobs failed to spawn, repeat on the next tick
 
</pre>
 
</pre>
 
 
  
 
== Curiosidades ==
 
== Curiosidades ==

Revisión del 10:16 29 jul 2014

Generador de Monstruos
Generador de Monstruos.gif
Generador de Monstruos
Tipo

Bloque sólido

Requerimientos

No

Físicas

No

Transparencia

Sólo gráfica

Iluminación

No

Resistencia a explosiones

25

Dureza

?

Herramienta

Un pico de madera o mejor es requerido para romper éste bloque.

Renovable

?

Apilable

Si (64)

Inflamable

No

Primera aparición

Infdev (Seecret Friday Update 2)

Otorga

El mismo

Valor de datos

dec: 52 hex: 34 bin: 110100

Nombre

mob_spawner

Los generadores de monstruos (Monster Spawners en inglés) son bloques que tienen la apariencia de jaulas azules que se pueden encontrar en mazmorras, minas abandonadas, fortalezas y fortalezas del Nether. En el interior de estas jaulas hay pequeñas llamas que no producen luz y una versión en miniatura giratoria del mob que va a generar, que aumenta lentamente la velocidad antes de generar el próximo mob. Los generadores de monstruos pueden generar cualquier mob, pero si no se usa ningún editor sólo pueden generar zombis, esqueletos, arañas, arañas de cueva, llamas o lepismas.

Generador de monstruos esqueleto dentro.


Los jugadores de Minecraft han diseñado muchos tipos de trampas para matar mobs producidos por generadores, tales como fosos, lagos de lava, cactus o combinaciones de los ya mencionados. Una trampa que elimine mobs generados por un generador de monstruos permite al jugador conseguir experiencia rápidamente con pocos riesgos (ver trampas para generadores de monstruos).


El generador de monstruos es uno de los pocos bloques que no están disponibles en el modo Creativo, aunque se pueden coger los ya existentes y cambiarlos de sitio.


El bloque de generador de monstruos sólo se puede obtener a través del uso /give y de /setblock. En Pocket Edition, están disponibles en el inventario de creativo. Los generadores obtenidos con /give siempre sacan cerdos cuando se coloca. Los generadores que crean otras entidades se pueden colocar con el /setblock. Ejemplo de comando: /setblock <x> <y> <z> mob_spawner 0 replace {EntityId:"Cow"}

Localización

Los generadores de monstruos pueden encontrarse en los siguientes lugares, generando un tipo de mob elegido aleatoriamente:

Mazmorras

Generan zombis (posibilidad del 50%), esqueletos (25%) o arañas (25%). Un generador por mazmorra.

Minas Abandonadas

Siempre generan arañas de cueva. Se localizan en galerías horizontales, y se encuentran rodeadas por grandes masas de telaraña.

Fortalezas

Siempre generan lepismas. Se localizan en la sala del portal al Fin. Un generador por fortaleza.

Fortalezas del Nether

Siempre generan Llamas. Se localizan en los balcones exteriores de las fortalezas del Nether.

Los generadores de monstruos que ocurridos de forma natural no generan animales pasivos, creepers o endermans. Eso sí, si se utiliza un editor de mapas o un mod, se puede editar el mob generado y de este modo los generadores de monstruos pueden generar cualquier tipo de mob, incluido Enderdragons (aunque no pueden generar Gigantes).

Es imposible guardar en el inventario un generador de monstruos, a no ser que se utilicen cheats, mods, editores de inventario o el comando de servidor "/give" en un servidor. Los generadores de monstruos tampoco aparecen en el inventario del modo Creativo, pero pueden cogerse y cambiarse de sitio. Si un generador de monstruos es desplazado o ha perdido los datos de su tile de entidad, generará solamente cerdos.

Comportamiento

Un generador de monstruos genera mobs en el área que lo rodea, que suele coincidir con la zona en la que el tipo de mob suele generarse. Por ejemplo, los monstruos del Overworld sólo pueden generarse en la oscuridad (nivel de luz de 7 o menos), y los animales sólo se generan encima de hierba y con un nivel de luz mayor que 9. Sin embargo, algunos generadores de monstruos pueden generar mobs al aire, ignorando las reglas de spawn habituales.

Un generador de monstruos sólo se encuentra activo cuando un jugador está a menos de 16 bloques de él. Cuando el generador está activado, generará mobs dentro de un área de 8x3x8 bloques (8 de ancho, 3 de alto y 8 de largo), centrándose en la esquina del generador con las coordenadas x & z más bajas. Los mobs se generarán en cualquier zona del área que sea adecuada para el spawn, incluso si el generador de monstruos está rodeado de bloques.

En la dificultad Pacífica, los generadores de monstruos seguirán apareciendo, pero los mobs hostiles generados desaparecerán en el mismo momento en el que son generados (los hombrecerdo zombi, los Ghast y los cubos de magma tampoco se generarán). Esto hace que sea fácil preparar trampas para generadores sin ser molestado por los mobs. Aunque en dificultad Pacífica los mobs desaparecen al instante tras ser generados, el tiempo es suficiente para que el jugador sea empujado por un mob o que a un esqueleto generado le dé tiempo de lanzar una flecha.

Generador

Summary of maximum spawn volumes for common monster spawners
Mob type Required Volume Failure rate from 8×8×4 volume[note 1] Vertical
alignment
EntityCSS.png
Pig
8.9 × 8.9 × 2.9 2.531252%



EntityCSS.png
Cave Spider
8.7 × 8.7 × 2.5 1.531252%



EntityCSS.png
Silverfish
8.3 × 8.3 × 2.7 0.28125%



EntityCSS.png
Zombie

EntityCSS.png
Skeleton

EntityCSS.png
Blaze
8.6 x 8.6 x 3.8 1.125%




EntityCSS.png
Spider
9.4 × 9.4 × 2.9 6.125%



  1. 8×8×3 is the actual volume across which spawners spawn entities, but this volume only contains the entity's center. The failure rate assumes 8×8×4 because it is a popular misconception that 8×8×4 is the maximum efficiency volume of empty space for mob spawners - it actually depends on the size of the entities themselves. Note that 10x10x4 is guaranteed to accommodate all of the above mobs. Also note that this failure rate only accounts for failures due to attempting to spawn a mob at the edges of the spawn range, not other causes of failure such as mobs attempting to spawn intersecting the spawner block itself.

For all of the volumes listed in the table, the horizontal plane is centered on the northwestern corner of the spawner block. While the spawning volume for pigs is 8.9 × 8.9 × 2.9, the requirement of grass blocks that are necessary for pigs to spawn will reduce the actual volume in which they successfully spawn.

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. When it does spawn, it will "poof", and more lightless flames will temporarily appear around the Spawn block. 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 the monsters created by the spawner keep leaving the specified area then the monster spawner will continue spawning mobs indefinitely, provided the player is still within range.

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.

Algoritmo detallado

Este pseudo-código se deriva de la fuente descompilada source 1.4.2.

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, horse, mooshroom, pig, sheep, villager, 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 7 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 
		either:
  			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
		or:
			swamp biome, layer 51 through 69, light level 7 or less
	  
	  ghast:
		pass a 1 in 20 random test
	  
	  squid:
		must not collide with any other entities
		must be in layer 46-62
	  
	  giant:
		light level 7 or less
		light level 8 or more
		(since these conditions can't be true simultaneously, giant spawners don't work)
	  
	  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

Curiosidades

  • Un generador de monstruos que genere cerdos puede ser encontrado naturalmente en Supervivencia, aunque las probabilidades de que se genere (o que lo encuentres) son muy reducidas (quizás incluso extremadamente reducidas).
  • Mediante un editor o un programa externo se puede hacer que los generadores de monstruos generen objetos.

Véase también