Spawn

From Better Than Wolves Wiki
(Redirected from Hardcore Spawn)
Jump to: navigation, search

Spawning refers to players and mobs being created and placed in the game world.

One of the biggest change in BTW is called Hardcore Spawn (or HCS) which causes the player to respawn in a random location after death, rather than respawning at the world's original spawn.


Mechanics

When the player dies, upon respawning they will appear in a random location within a large area around the world's original spawn. In singleplayer, this will reset the time to morning and will stop any ongoing weather effects.

This will generally require the player to survive long enough to get a compass to find their way back to spawn.


Frequent Respawns

Respawning multiple times within 10 minutes of the initial respawn will cause the player to appear within the same general area of the initial respawn. Each subsequent respawn within this time will decrease the amount of health and hunger that the player spawns with.


Ranges

The minimum range of hardcore spawn is always 1000 blocks. As progression milestones are reached in the world, the maximum range will increase.

Progression milestone Maximum range
Pre-nether 2000 blocks
Post-nether 3000 blocks
Post-wither 4000 blocks
Post-end 5000 blocks


Mitigation

A steel beacon will allow the player to bind themselves to it, and if they die within the beacon's range then they will respawn at the beacon.

In multiplayer, there are a couple ways to help with hardcore spawn. Before accessing the nether, if a player dies, then any other players who die within 20 minutes will respawn at the same location. After accessing the nether this no longer functions. However, Pile of Soul Sand may be used. Within 20 minutes of the player's death, someone may right click while holding a pile of soul sand. This will consume the pile and spawn a cloud of particles, which will drift towards their respawn location.


Large Biomes

Large biomes increases all respawn radii by 4 times in order to match the biome size increase offered by the world type.


Animal spawning

In BTW, animals will only spawn in newly generated chunks, and will never respawn. This combined with Hostile mobs hunting animals at night makes them die off quickly around the player.


Approximately one in ten newly generated chunks will contain mobs, usually in packs of up to four of the same species. They will always spawn on the highest available block in a column i.e. the one that can see the sky. For an animal to spawn on it, this block must be opaque]] and the two blocks above it must be transparent. The block does not need to be grass nor does it need to be illuminated (as it does with Mob Spawning).

Animals do not spawn in desert or ocean biomes, with the exception of squid.

Randomness for animal spawning is derived from the world seed, which means that worlds with the same seed will generate chunks with the same animals in the same places.

Unlike monsters, animals do not spontaneously despawn, except for wild ocelots.


(anything below is still some outdated vanilla info not updated for BTW, and may not be true anymore -Batto)

Mob spawning

Mobs are broadly divided into four categories: hostile, friendly, water (i.e. Squid) and ambient (i.e. Bat). Hostile mobs have a spawning cycle once every game tick (1/20th of a second). Water mobs have only one spawning cycle every 400 ticks (20 seconds).

Mobs spawn naturally within a 15x15 chunk (240x240 block) area around the player. When there are multiple players, mobs can spawn within this distance of any of them. However, mobs that move farther than 128 blocks from any player will immediately despawn, so the mob spawning area is effectively limited to spheres with a radius of 128 blocks, centered at each player.

Mob caps are directly proportional to the total number of chunks eligible for spawning. To calculate the cap, the spawning area is expanded by one chunk in every direction, so that it is 17x17 chunks in size, and then the total number of chunks is plugged into the following formula:

 cap = constant * chunks / 256

Each mob category has a separate cap and a different constant in the formula:

 Hostile = 70
 Passive = 10
 Ambient (Bats) = 15
 Water = 5

In single player mode, the chunk count is 17x17 = 289, and the caps work out to:

 Hostile = 79
 Passive = 11
 Ambient = 16
 Water = 5

In multiplayer, chunks that are in range of multiple players are only counted once. So the more spread out the players are, the more chunks will be covered and the higher the caps will be.

The cap is checked once at the beginning of each spawning cycle. If the number of living mobs in a category is over its cap, the entire spawning cycle for that category is skipped.

For each spawning cycle, one attempt is made to spawn a pack of mobs in each eligible chunk. A random location in the chunk is chosen to be the center point of the pack. For the pack to spawn at all, the center block must be water for water mobs and air for all other mobs. Note that in the latter case, it must actually be an air block. Any other block, even a non-colliding one, will prevent the entire pack from spawning.

If the pack location is suitable, 12 attempts are made to spawn up to 4 mobs (8 for Wolves, 1 for Ghasts) within a 41x1x41 area centered at that block (that's a 41x41 square that is one block high). Mobs will spawn with the lowest part of their body inside this area. For each spawn attempt, a block location within the pack area is chosen at random. Though the pack area extends 21 blocks out from the center, the random location is heavily skewed toward the center of the pack. Approximately 85% of spawns will be within 5 blocks of the pack center, and 99% within 10 blocks of the center.

All mobs within a pack are the same species. The species for the entire pack is chosen randomly from those eligible to spawn at the location of the first spawn attempt in the pack:

Each individual spawn attempt succeeds only if all of the following conditions are met:

  • There must be no players and no player spawn points within a 24 block distance (spherical) of the spawning block
  • If it's a squid, then...
    • the spawning block must contain liquid (water or lava)
    • the spawning block must be between level 45 and 62, inclusive
    • the spawning mob must not be obstructed by other mobs
  • If it's not a squid, then...
    • the spawning block itself must be non-opaque and non-liquid
    • the block directly below it must be opaque
    • the block directly above it must be non-opaque
    • the spawning mob must not be obstructed by blocks, other mobs, or water
  • If it's an animal, then...
    • the block directly below the spawning block must be grass
    • the light level of the spawning block must be 9 or brighter
  • if it's an ocelot, then...
    • the spawning block must be above level 62
    • the block directly below the spawning block must be grass or leaves
    • there is a 1/3 chance the spawn will fail
  • If it's a hostile mob in the overworld, then...
    • the light level of the spawning block must be 7 or darker, and more light increases the chance that the spawn will fail
    • sunlight falling on the spawning block further increases the chance that the spawn will fail, by up to 50%
  • If it's a Slime, then...
    • the spawning block must be in a chunk eligible to spawn slimes (see the Slime page for details)
    • the spawning block must be below level 40
    • if the spawn is in a swamp biome, the light level just has to be low
    • there is an additional 90% chance the spawn will fail, thus slimes only spawn 1/10th as often as other mobs, all other things being equal
  • If it's a Ghast, then there is a 95% chance the spawn will fail, thus ghasts only spawn 1/20th as often as other mobs

If all of these conditions are met then the mob is spawned. The pack is complete when 4 mobs have spawned (or 8 wolves, or 1 ghast), or 12 attempts have been made, whichever comes first. The exception(s) to these rules is the Enderdragon

Notes

  • Due to the general block checks, all mobs besides squid must spawn on top of an opaque block with at least two blocks of headroom, even ghasts, etc. However, short mobs can spawn in a one block high space if the block above is transparent, like a glass block or piston.
  • While individual mobs can spawn inside signs, pressure plates, and other non-opaque blocks, packs cannot. They need a completely empty block in the center. Since a pack spawns all at one level, there needs to be some air blocks right above a flat surface to allow mobs to spawn on it, and more air blocks will always allow more spawning.
  • Similarly, buildings surrounded by air will spawn more mobs inside than underground rooms because packs that spawn outside of the building can spawn mobs inside it.
  • The mob caps tend to be reached in seconds. Because of this, mobs can be funneled into a spawning room by preventing them from spawning outside of it.
  • The caps also mean that the faster mobs are killed, the faster they will spawn.
  • Because the caps are only checked at the beginning of a spawn cycle, they can be dramatically exceeded when a large number of mobs spawn in a single cycle. This happens often with squid, which have a fairly low cap (5 in single player) but can spawn in the hundreds in a single cycle, in an area with lots of water.
  • In multiplayer, mob caps are shared by all players, no matter where they are. If one player can make a lot of mobs spawn near them, say, with a mob farm, players elsewhere in the world will see fewer mobs of the same category. Likewise, if a player can prevent mobs from spawning near them, perhaps by hanging around a large body of water and illuminating nearby caves, they will effectively dump their mobs on everyone else.
  • Mobs used to not spawn above y co-ordinate 240 due to a bug, but as of 1.4.6 this is fixed and mobs now can spawn above level 240.
  • In multiplayer, if the server.properties file has "view-distance=9" or below, mob spawning is severely reduced (or they de-spawn too quickly), and may result in the player encountering no mobs at all. Set the view distance to 10 or higher to ensure mobs spawn correctly.


Other types of spawning

A Monster Spawner causes mobs to spawn constantly in the area around it.

A thrown chicken egg has a 1 in 8 chance of spawning a chicken, and an additional 1 in 32 chance of spawning 4 chickens from a single egg, so there is a total of 1 in 256 chance for a single thrown egg to spawn 4 chickens.

Cows, chickens, pigs, sheep, mooshrooms, villagers, ocelots and wolves can breed. All of this requires a player to breed them.

Two snow blocks in the overworld placed on top of each other, with a pumpkin or Jack 'o' Lantern, causes a Snow Golem to spawn. Likewise, replacing the Snow Blocks with iron blocks (with an extra one on opposite sides of the higher block) will cause an Iron Golem to spawn. Iron Golems can also spawn in villages (though the algorithm that causes this has not yet been determined). Withers can also be spawned by placing blocks.

In Creative, the player can use Spawn Eggs to spawn most mobs.

A Monster Egg will spawn a silverfish if broken, or if a nearby silverfish is attacked.

A single Ender Dragon spawns in The End.

Medium and large slimes and magma cubes will spawn more of them, but in a smaller size.


Despawning

Monsters (not holding items or wearing armor) and squid (but not animals), including hostile wolves as of 1.1, can cease to exist, or "despawn", under certain conditions:

  • A mob will immediately despawn if ever there is no player within 128 blocks of it. Note that this appears to be a sphere, not a cylinder from map top to bottom.
  • A mob that has had no player within 32 blocks of it for more than 30 seconds has a 1 in 800 chance of despawning on each game tick (1/20th of a second). Therefore, the half-life of monsters not within 32 blocks of a player is 27.73 seconds, after the initial 30 seconds have elapsed.
  • All hostile mobs (including those that are holding items) in a world will despawn if the difficulty is set to peaceful, regardless as to where the player is positioned in the world.

In multiplayer, despawning does not occur while there are no players in the game.

Trivia

  • Sometimes it is possible for the world spawn to be underground or in the ocean.
  • World spawns can even be inside a dungeon. (very rarely)