Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement