private boolean needBlimpLot(PlatMap platmap, int x, int z) {
   if (platmap.isNaturalLot(x, z)) {
     return platmap.isStructureLot(x - 1, z)
         || platmap.isStructureLot(x + 1, z)
         || platmap.isStructureLot(x, z - 1)
         || platmap.isStructureLot(x, z + 1);
   } else return false;
 }
 @Override
 protected void validateLots(WorldGenerator generator, PlatMap platmap) {
   // find blimp moorings
   for (int x = 0; x < PlatMap.Width; x++) {
     for (int z = 0; z < PlatMap.Width; z++) {
       if (needBlimpLot(platmap, x, z))
         platmap.setLot(
             x, z, new FloatingBlimpLot(platmap, platmap.originX + x, platmap.originZ + z));
     }
   }
 }
Beispiel #3
0
  public PlatLot createRoundaboutStatueLot(
      WorldGenerator generator, PlatMap platmap, int x, int z) {

    // grab potential platlot's random
    Odds odds = platmap.getChunkOddsGenerator(platmap.originX + x, platmap.originZ + z);

    // what way are we facing?
    Direction.Facing facing = odds.getFacing();

    // see if there is a schematic out there that fits
    Clipboard clip = mapsSchematics.getSingleLot(generator, platmap, odds, x, z);
    if (clip != null) {

      // create it then
      return new ClipboardRoundaboutLot(
          platmap, platmap.originX + x, platmap.originZ + z, clip, facing, 0, 0);

    } else return new RoundaboutStatueLot(platmap, platmap.originX + x, platmap.originZ + z);
  }