Examples of placeObject()


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

      if (y >= 63 && random.nextInt(lavaSurfaceOdd) != 0) {
        return;
      }
      final PondObject pond = new PondObject(random, PondObject.PondType.LAVA);
      if (pond.canPlaceObject(world, x, y, z)) {
        pond.placeObject(world, x, y, z);
      }
    }
  }

  public void setWaterOdd(int waterOdd) {
View Full Code Here

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

      if (y == -1 || !canes.canPlaceObject(world, x, y, z)) {
        continue;
      }
      successfulClusterCount++;
      canes.randomize();
      canes.placeObject(world, x, y, z);
      for (byte placed = 1; placed < maxClusterSize; placed++) {
        final int xx = x - 3 + random.nextInt(7);
        final int zz = z - 3 + random.nextInt(7);
        canes.randomize();
        if (canes.canPlaceObject(world, xx, y, zz)) {
View Full Code Here

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

      for (byte placed = 1; placed < maxClusterSize; placed++) {
        final int xx = x - 3 + random.nextInt(7);
        final int zz = z - 3 + random.nextInt(7);
        canes.randomize();
        if (canes.canPlaceObject(world, xx, y, zz)) {
          canes.placeObject(world, xx, y, zz);
        }
      }
      if (successfulClusterCount >= numberOfClusters) {
        return;
      }
View Full Code Here

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

    if (y == -1) {
      return;
    }
    final WellObject well = new WellObject();
    if (well.canPlaceObject(world, x, y, z)) {
      well.placeObject(world, x, y, z);
    }
  }

  private int getHighestWorkableBlock(World w, int x, int z) {
    int y = w.getSurfaceHeight(x, z);
View Full Code Here

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

  public void growTree(Player player, CommandArguments args) throws CommandException {
    args.assertCompletelyParsed();
    Point pos = player.getPhysics().getPosition();

    BigTreeObject tree = new BigTreeObject();
    tree.placeObject(pos.getWorld(), pos.getBlockX(), pos.getBlockY(), pos.getBlockZ());
    player.getPhysics().setPosition(pos.add(new Vector3f(0, 50, 0)));
  }

  // TODO - There needs to be a method that guarantees unique data values on a per-server basis
  private int mapId = 1;
View Full Code Here

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

      final int y = getHighestWorkableBlock(world, x, z);
      if (y == -1) {
        continue;
      }
      if (tree.canPlaceObject(world, x, y, z)) {
        tree.placeObject(world, x, y, z);
      }
    }
  }

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

Examples of org.spout.vanilla.world.generator.normal.structure.mineshaft.Mineshaft.placeObject()

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

Examples of org.spout.vanilla.world.generator.normal.structure.stronghold.Stronghold.placeObject()

    final Stronghold stronghold = new Stronghold(random);
    final int x = blockX + random.nextInt(2 * variation + 1) - variation;
    final int y = random.nextInt(randomElevation) + baseElevation;
    final int z = blockZ + random.nextInt(2 * variation + 1) - variation;
    if (stronghold.canPlaceObject(world, x, y, z)) {
      stronghold.placeObject(world, x, y, z);
      if (VanillaPlugin.getInstance().getEngine().debugMode()) {
        Spout.getLogger().log(Level.INFO, "Placed stronghold at: (" + x + ", " + y + ", " + z + ")");
      }
    }
  }
View Full Code Here

Examples of org.spout.vanilla.world.generator.normal.structure.temple.Temple.placeObject()

    temple.setRandom(random);
    final World world = chunk.getWorld();
    final int x = chunk.getBlockX(random);
    final int z = chunk.getBlockZ(random);
    if (temple.canPlaceObject(world, x, 0, z)) {
      temple.placeObject(world, x, 0, z);
    }
  }

  public void setOdd(int odd) {
    this.odd = odd;
View Full Code Here

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

        final World world = block.getWorld();
        final int x = block.getX();
        final int y = block.getY();
        final int z = block.getZ();
        if (mushroom.canPlaceObject(world, x, y, z)) {
          mushroom.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.