Examples of placeObject()


Examples of org.spout.api.generator.WorldGeneratorObject.placeObject()

      if (!force) {
        return;
      }
      player.sendMessage("Forcing placement.");
    }
    object.placeObject(world, x, y, z);
    if (object instanceof RandomizableObject) {
      ((RandomizableObject) object).randomize();
    }
  }
View Full Code Here

Examples of org.spout.vanilla.world.generator.nether.object.GlowstonePatchObject.placeObject()

      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

Examples of org.spout.vanilla.world.generator.nether.structure.fortress.Fortress.placeObject()

      final Fortress fortress = new Fortress(random);
      final int x = blockX + random.nextInt(VARIATION * 2 + 1) - VARIATION;
      final int y = random.nextInt(RAND_Y + 1) + BASE_Y;
      final int z = blockZ + random.nextInt(VARIATION * 2 + 1) - VARIATION;
      if (fortress.canPlaceObject(world, x, y, z)) {
        fortress.placeObject(world, x, y, z);
      }
    }
  }
}
View Full Code Here

Examples of org.spout.vanilla.world.generator.normal.object.BlockPatchObject.placeObject()

      final int x = chunk.getBlockX(random);
      final int z = chunk.getBlockZ(random);
      final int y = getHighestWorkableBlock(world, x, z);
      sand.randomize();
      if (y != -1 && sand.canPlaceObject(world, x, y, z)) {
        sand.placeObject(world, x, y, z);
      }
    }
    final BlockPatchObject clay = new BlockPatchObject(VanillaMaterials.CLAY_BLOCK);
    clay.setHeightRadius((byte) 1);
    clay.getOverridableMaterials().clear();
View Full Code Here

Examples of org.spout.vanilla.world.generator.normal.object.BlockPatchObject.placeObject()

      final int x = chunk.getBlockX(random);
      final int z = chunk.getBlockZ(random);
      final int y = getHighestWorkableBlock(world, x, z);
      clay.randomize();
      if (y != -1 && clay.canPlaceObject(world, x, y, z)) {
        clay.placeObject(world, x, y, z);
      }
    }
    for (byte count = 0; count < secondSandAmount; count++) {
      final int x = chunk.getBlockX(random);
      final int z = chunk.getBlockZ(random);
View Full Code Here

Examples of org.spout.vanilla.world.generator.normal.object.CactusStackObject.placeObject()

      final int x = chunk.getBlockX(random);
      final int z = chunk.getBlockZ(random);
      final int y = getHighestWorkableBlock(world, x, z);
      cactus.randomize();
      if (y != -1 && cactus.canPlaceObject(world, x, y, z)) {
        cactus.placeObject(world, x, y, z);
      }
    }
  }

  private int getHighestWorkableBlock(World world, int x, int z) {
View Full Code Here

Examples of org.spout.vanilla.world.generator.normal.object.DungeonObject.placeObject()

      final int x = chunk.getBlockX(random);
      final int z = chunk.getBlockZ(random);
      final int y = random.nextInt(128);
      dungeon.randomize();
      if (dungeon.canPlaceObject(world, x, y, z)) {
        dungeon.placeObject(world, x, y, z);
      }
    }
  }

  public void setAttempts(int attempts) {
View Full Code Here

Examples of org.spout.vanilla.world.generator.normal.object.HugeMushroomObject.placeObject()

      final int x = chunk.getBlockX(random);
      final int z = chunk.getBlockZ(random);
      final int y = getHighestWorkableBlock(world, x, z);
      mushroom.randomize();
      if (y != -1 && mushroom.canPlaceObject(world, x, y, z)) {
        mushroom.placeObject(world, x, y, z);
      }
    }
  }

  private int getHighestWorkableBlock(World world, int x, int z) {
View Full Code Here

Examples of org.spout.vanilla.world.generator.normal.object.OreObject.placeObject()

        final int x = chunk.getBlockX(random);
        final int y = random.nextInt(oreType.getMaxHeight() - oreType.getMinHeight())
            + oreType.getMinHeight();
        final int z = chunk.getBlockZ(random);
        if (ore.canPlaceObject(world, x, y, z)) {
          ore.placeObject(world, x, y, z);
        }
      }
    }
  }
View Full Code Here

Examples of org.spout.vanilla.world.generator.normal.object.PondObject.placeObject()

      final int z = chunk.getBlockZ(random);
      final int y = random.nextInt(128);
      if (!LogicUtil.equalsAny(world.getBiome(x, y, z), VanillaBiomes.DESERT, VanillaBiomes.DESERT_HILLS)) {
        final PondObject pond = new PondObject(random, PondObject.PondType.WATER);
        if (pond.canPlaceObject(world, x, y, z)) {
          pond.placeObject(world, x, y, z);
        }
      }
    }
    if (random.nextInt(lavaOdd) == 0) {
      final int x = chunk.getBlockX(random);
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.