Examples of DyeColor


Examples of org.bukkit.DyeColor

    }
   
    private static short getData(String data, int id) {
        // Wool and ink are special
        if (id == WOOL_ID) {
            DyeColor dye = Enums.getEnumFromString(DyeColor.class, data);
            if (dye == null) dye = DyeColor.getByWoolData(Byte.parseByte(data));
            return dye.getWoolData();
        } else if (id == DYE_ID) {
            DyeColor dye = Enums.getEnumFromString(DyeColor.class, data);
            if (dye == null) dye = DyeColor.getByDyeData(Byte.parseByte(data));
            return dye.getDyeData();
        }
        return (data.matches("(-)?[0-9]+") ? Short.parseShort(data) : 0);
    }
View Full Code Here

Examples of org.bukkit.DyeColor

    public static DyeColor matchDyeColor(String filter) throws CommandException {
        if (filter.equalsIgnoreCase("random")) {
            return DyeColor.getByData((byte) new Random().nextInt(15));
        }
        try {
            DyeColor match = DyeColor.valueOf(filter.toUpperCase());
            if (match != null) {
                return match;
            }
        } catch (IllegalArgumentException ignored) {}
        throw new CommandException("Unknown dye color name of '" + filter + "'.");
View Full Code Here

Examples of org.bukkit.DyeColor

  protected void generateTower(WorldGenerator generator, RealChunk chunk, TowerStyle style) {
   
    // set things up for darkness
    Material wallMaterial = Material.OBSIDIAN;
    Material trimMaterial = Material.AIR;
    DyeColor windowPrimaryColor = DyeColor.BLACK;
    DyeColor windowSecondaryColor = DyeColor.PURPLE;
   
    // adjust for lightness
    if (style == TowerStyle.LIGHT) {
      wallMaterial = Material.ENDER_STONE;
      trimMaterial = Material.GLOWSTONE;
View Full Code Here

Examples of org.bukkit.DyeColor

    int z1 = 4;
    int z2 = z1 + 8;
    int Height = FloorHeight;

    Material emptyMaterial = Material.AIR;
    DyeColor coreColor = odds.getRandomColor();
    DyeColor detailColor = odds.getRandomColor();
    boolean firstFloor = true;
   
    while (y + Height < y2) {
     
      // walls please
View Full Code Here

Examples of org.bukkit.DyeColor

    int z1 = 4;
    int z2 = z1 + 8;
    int y3 = y2 - 2;
   
    Material emptyMaterial = Material.AIR;
    DyeColor coreColor = odds.getRandomColor();
    DyeColor detailColor = odds.getRandomColor();
    boolean firstFloor = true;
   
    for (int y = y1; y < y3; y += FloorHeight) {
     
      // walls please
View Full Code Here

Examples of org.bukkit.DyeColor

    int x2 = x1 + buildingWidth;
    int z1 = x1;
    int z2 = z1 + buildingWidth;
   
    Material emptyMaterial = Material.AIR;
    DyeColor coreColor = odds.getRandomColor();
    DyeColor detailColor = odds.getRandomColor();
   
    // lower bit
    chunk.setClayWalls(x1 + 1, x2 - 1, y1, y1 + 1, z1 + 1, z2 - 1, coreColor);
    chunk.setClayWalls(x1 + 1, x2 - 1, y1 + 1, y1 + 2, z1 + 1, z2 - 1, coreColor);
   
View Full Code Here

Examples of org.bukkit.DyeColor

    int x2 = x1 + 12;
    int z1 = 2;
    int z2 = z1 + 12;
    int y3 = y2 - 5;

    DyeColor coreColor = odds.getRandomColor();
   
    // initial pylon
    chunk.setClay(x1 + 4, x2 - 4, y1, y1 + 2, z1 + 4, z2 - 4, coreColor);
   
    // rest of the pylon and balls
View Full Code Here

Examples of org.bukkit.DyeColor

  }
 
  public static void generateBallsyBuildingBall(SupportChunk chunk, Odds odds, int x, int y, int z) {
    if (odds.flipCoin()) {
     
      DyeColor ballColor = odds.getRandomColor();
     
      // bottom
      chunk.setClay(x + 1, x + 4, y, y + 1, z + 1, z + 4, ballColor);
     
      // sides
View Full Code Here

Examples of org.bukkit.DyeColor

    int z2 = z1 + 12;
    int ySegment = Math.max(1, (y2 - y1) / 5);
    int yRange = ySegment * 3;
    int yBase = y1 + ySegment;
   
    DyeColor coreColor = odds.getRandomColor();
    DyeColor detailColor = odds.getRandomColor();
   
    int colY1 = yBase + odds.getRandomInt(yRange);
    int colY2 = yBase + odds.getRandomInt(yRange);
    int colY3 = yBase + odds.getRandomInt(yRange);
    int colY4 = yBase + odds.getRandomInt(yRange);
View Full Code Here

Examples of org.bukkit.DyeColor

    int z1 = 4;
    int z2 = z1 + 8;
    int yBottom = y1 + 4;
    int yTop = y2;
   
    DyeColor coreColor = odds.getRandomColor();
    DyeColor detailColor = odds.getRandomColor();
   
    // supports
    chunk.setClay(x1 + 1, x1 + 3, y1, yBottom, z1 + 1, z1 + 3, detailColor);
    chunk.setClay(x1 + 1, x1 + 3, y1, yBottom, z2 - 3, z2 - 1, detailColor);
    chunk.setClay(x2 - 3, x2 - 1, y1, yBottom, z1 + 1, z1 + 3, detailColor);
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.