Package org.bukkit

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


    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

    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

    int x1 = 2;
    int x2 = x1 + 12;
    int z1 = 2;
    int z2 = z1 + 12;
   
    DyeColor coreColor = odds.getRandomColor();
    DyeColor detailColor = odds.getRandomColor();
   
    Material emptyMaterial = Material.AIR;
    for (int i = 0; i < 7; i++) {
      int y = y1 + i * 2;
      chunk.setClayWalls(x1 + i, x2 - i, y, y + 2, z1 + i, z2 - i, coreColor);
View Full Code Here

    // if we have not placed something in the center... place a "ART!" like thingy
    if (somethingInTheCenter) {
     
      // simple glass or colored blocks?
      boolean crystalArt = chunkOdds.playOdds(Odds.oddsLikely);
      DyeColor solidColor = chunkOdds.getRandomColor();
      boolean multiColorArt = chunkOdds.playOdds(Odds.oddsLikely);
     
      // now the "art"
      for (int x = 6; x < 10; x++)
        for (int y = y1 + 4; y < y1 + 8; y++)
          for (int z = 6; z < 10; z++) {
           
            // pick a color
            DyeColor blockColor = multiColorArt ? chunkOdds.getRandomColor() : solidColor;
           
            // place a block
            if (chunkOdds.flipCoin())
              chunk.setThinGlass(x, y, z, blockColor);
            else
View Full Code Here

  private final static Material matLog = Material.LOG;
 
  public void generateCampground(WorldGenerator generator, RealChunk chunk, DataContext context, Odds odds, int baseY) {
   
    // what are we made of?
    DyeColor matColor = odds.getRandomColor();
    boolean matCamo = odds.playOdds(Odds.oddsSomewhatUnlikely);
   
    // direction?
    if (odds.flipCoin()) {
     
View Full Code Here

   
    // string please
    if (attachString(chunk, balloonX, attachY, balloonY1, balloonZ)) {
     
      // pick the colors
      DyeColor primaryColor = getPrimaryColor(generator, odds);
      DyeColor secondaryColor = getSecondaryColor(generator, odds);
     
      // draw the balloon
      chunk.setWool(balloonX, balloonX + 1, balloonY1, balloonY1 + 2, balloonZ, balloonZ + 1, primaryColor);
     
      chunk.setWool(balloonX - 1, balloonX + 2, balloonY1 + 2, balloonY1 + 4, balloonZ - 1, balloonZ + 2, primaryColor);
View Full Code Here

   
    // are we attached?
    if (strung) {
     
      // pick the colors
      DyeColor primaryColor = getPrimaryColor(generator, odds);
      DyeColor secondaryColor = getSecondaryColor(generator, odds);
     
      // draw the bottom of the blimp
      chunk.setCircle(8, 8, 3, balloonY1 - 1, Material.WOOL, primaryColor);
      chunk.setCircle(8, 8, 4, balloonY1, balloonY1 + 3, Material.WOOL, primaryColor);
      chunk.setCircle(8, 8, 5, balloonY1 + 3, balloonY1 + 7, Material.WOOL, primaryColor);
      chunk.setCircle(8, 8, 6, balloonY1 + 7, Material.WOOL, primaryColor);
     
      // middle of the blimp
      int step = 2 + odds.getRandomInt(4);
      int y = balloonY1 + 8;
      do {
        DyeColor color = primaryColor;
        if (y % step != 0)
          color = secondaryColor;
        chunk.setCircle(8, 8, 6, y, Material.WOOL, color);
        y++;
      } while (y < balloonY2 - 3);
View Full Code Here

      List<Entity> entities = entity.getNearbyEntities(radius, 2, radius);
      for (Entity i : entities) {
        if (EntityType.SHEEP.equals(i.getType())) {
          Sheep sheep = (Sheep) i;
          if ((shears > 0) && (!sheep.isSheared())) {
            DyeColor color = sheep.getColor();
            byte data = color.getData();
            wool[data] += 1 + ((int) (Math.random() * 2.0));
            sheep.setSheared(true);
            --shears;
          }
        }
 
View Full Code Here

    public static BannerPattern fromNBT(List<CompoundTag> tag) {
        BannerPattern.Builder builder = BannerPattern.builder();
        for (CompoundTag layer : tag) {
            BannerPattern.LayerTexture type = BannerPattern.LayerTexture.getByCode(layer.getString("Pattern"));
            DyeColor color = DyeColor.getByDyeData((byte) layer.getInt("Color"));
            builder.layer(type, color);
        }
        return builder.build();
    }
View Full Code Here

TOP

Related Classes of org.bukkit.DyeColor

Copyright © 2018 www.massapicom. 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.