Package me.daddychurchill.CityWorld.Plugins

Source Code of me.daddychurchill.CityWorld.Plugins.RoomProvider

package me.daddychurchill.CityWorld.Plugins;

import me.daddychurchill.CityWorld.WorldGenerator;
import me.daddychurchill.CityWorld.Rooms.PlatRoom;
import me.daddychurchill.CityWorld.Support.Odds;
import me.daddychurchill.CityWorld.Support.RealChunk;
import me.daddychurchill.CityWorld.Support.Direction.Facing;

import java.util.ArrayList;
import java.util.List;

import org.bukkit.Material;

public abstract class RoomProvider extends Provider {

  protected List<PlatRoom> roomTypes;
 
  public RoomProvider() {
    super();
    roomTypes = new ArrayList<PlatRoom>();
  }
 
  private PlatRoom getRandomRoomGenerator(Odds odds) {
    int index = odds.getRandomInt(roomTypes.size());
    return roomTypes.get(index);
  }

  public void drawFixtures(WorldGenerator generator, RealChunk chunk,
      Odds odds, int floor, int x, int y, int z, int width,
      int height, int depth, Facing sideWithWall, Material materialWall, Material materialGlass) {
   
    PlatRoom roomGen = getRandomRoomGenerator(odds);
    if (roomGen != null)
      roomGen.drawFixture(generator, chunk, odds, floor, x, y, z, width, height, depth, sideWithWall, materialWall, materialGlass);
  }
}
TOP

Related Classes of me.daddychurchill.CityWorld.Plugins.RoomProvider

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.