Examples of GlowstonePatchObject


Examples of org.spout.vanilla.world.generator.nether.object.GlowstonePatchObject

  public void populate(Chunk chunk, Random random) {
    if (chunk.getY() != 4) {
      return;
    }
    final World world = chunk.getWorld();
    final GlowstonePatchObject glowstone = new GlowstonePatchObject();
    glowstone.setRandom(random);
    for (int amount = getAmount(random); amount > 0; amount--) {
      final int x = chunk.getBlockX(random);
      final int y = random.nextInt(NetherGenerator.HEIGHT);
      final int z = chunk.getBlockZ(random);
      glowstone.randomize();
      if (glowstone.canPlaceObject(world, x, y, z)) {
        glowstone.placeObject(world, x, y, z);
      }
    }
  }
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.