Package me.daddychurchill.CityWorld.Context.SnowDunes

Source Code of me.daddychurchill.CityWorld.Context.SnowDunes.SnowDunesNatureContext

package me.daddychurchill.CityWorld.Context.SnowDunes;

import me.daddychurchill.CityWorld.WorldGenerator;
import me.daddychurchill.CityWorld.Context.NatureContext;
import me.daddychurchill.CityWorld.Plats.PlatLot;
import me.daddychurchill.CityWorld.Plats.SnowDunes.SnowDunesNatureLot;
import me.daddychurchill.CityWorld.Support.HeightInfo;
import me.daddychurchill.CityWorld.Support.PlatMap;
import me.daddychurchill.CityWorld.Support.HeightInfo.HeightState;

public class SnowDunesNatureContext extends NatureContext {

  public SnowDunesNatureContext(WorldGenerator generator) {
    super(generator);
    // TODO Auto-generated constructor stub
  }


  @Override
  public PlatLot createNaturalLot(WorldGenerator generator, PlatMap platmap, int x, int z) {
    return new SnowDunesNatureLot(platmap, platmap.originX + x, platmap.originZ + z);
  }
 
  @Override
  public PlatLot createSurfaceBuildingLot(WorldGenerator generator, PlatMap platmap, int x, int z, HeightInfo heights) {
    if (heights.averageHeight > generator.shapeProvider.findHighestFloodY(generator))
      return super.createSurfaceBuildingLot(generator, platmap, x, z, heights);
    return null;
  }
 
  @Override
  protected void populateSpecial(WorldGenerator generator, PlatMap platmap, int x, int y, int z, HeightState state) {
    if (y > generator.shapeProvider.findHighestFloodY(generator))
      super.populateSpecial(generator, platmap, x, y, z, state);
  }
 
}
TOP

Related Classes of me.daddychurchill.CityWorld.Context.SnowDunes.SnowDunesNatureContext

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.