Examples of canSpawn()


Examples of forestry.api.lepidopterology.IButterfly.canSpawn()

      return false;
   
    if(world.countEntities(EntityButterfly.class) > PluginLepidopterology.spawnConstraint)
      return false;
   
    if(!spawn.canSpawn(world, x, y, z))
      return false;
   
    if(world.isAirBlock(x - 1, y, z)) {
      attemptButterflySpawn(world, spawn, x - 1, y, z);
    } else if(world.isAirBlock(x + 1, y, z)) {
View Full Code Here

Examples of org.bukkit.generator.ChunkGenerator.canSpawn()

                // determine a location randomly
                int spawnX = random.nextInt(128) - 64, spawnZ = random.nextInt(128) - 64;
                GlowChunk chunk = getChunkAt(spawnX >> 4, spawnZ >> 4);
                //GlowServer.logger.info("determining spawn: " + chunk.getX() + " " + chunk.getZ());
                chunk.load(true)// I'm not sure there's a sane way around this
                for (int tries = 0; tries < 10 && !generator.canSpawn(this, spawnX, spawnZ); ++tries) {
                    spawnX += random.nextInt(128) - 64;
                    spawnZ += random.nextInt(128) - 64;
                }
                setSpawnLocation(spawnX, getHighestBlockYAt(spawnX, spawnZ), spawnZ);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.