Пример #1
0
 /**
  * Scroll painting backwards
  *
  * @param v Sniper caller
  */
 @Override
 protected final void powder(final com.thevoxelbox.voxelsniper.SnipeData v) {
   PaintingWrapper.paint(v.owner().getPlayer(), true, true, 0);
 }
Пример #2
0
  @Override
  public final void parameters(final String[] par, final com.thevoxelbox.voxelsniper.SnipeData v) {
    if (par[1].equalsIgnoreCase("info")) {
      v.sendMessage(ChatColor.GOLD + "Erode brush parameters");
      v.sendMessage(ChatColor.RED + "NOT for litesnipers:");
      v.sendMessage(ChatColor.GREEN + "b[number] (ex:   b23) Sets your sniper brush size.");
      v.sendMessage(
          ChatColor.AQUA
              + "e[number] (ex:  e3) Sets the number of minimum exposed faces to erode a block.");
      v.sendMessage(
          ChatColor.BLUE
              + "f[number] (ex:  f5) Sets the number of minumum faces containing a block to place a block.");
      v.sendMessage(
          ChatColor.DARK_BLUE
              + "re[number] (ex:  re3) Sets the number of recursions the brush will perform erosion.");
      v.sendMessage(
          ChatColor.DARK_GREEN
              + "rf[number] (ex:  rf5) Sets the number of recursions the brush will perform filling.");
      v.sendMessage(
          ChatColor.AQUA
              + "/b d false -- will turn off true circle algorithm /b b true will switch back. (true is default for this brush.)");
      v.sendMessage(ChatColor.GOLD + "For user-friendly pre-sets, type /b e info2.");
      return;
    }
    if (par[1].equalsIgnoreCase("info2")) {
      v.sendMessage(
          ChatColor.GOLD
              + "User-friendly Preset Options.  These are for the arrow.  Powder will do reverse for the first two (for fast switching):");
      v.sendMessage(ChatColor.BLUE + "OK for litesnipers:");
      v.sendMessage(
          ChatColor.GREEN + "/b e melt -- for melting away protruding corners and edges.");
      v.sendMessage(ChatColor.AQUA + "/b e fill -- for building up inside corners");
      v.sendMessage(
          ChatColor.AQUA
              + "/b e smooth -- For the most part, does not change total number of blocks, but smooths the shape nicely.  Use as a finishing touch for the most part, before overlaying grass and trees, etc.");
      v.sendMessage(
          ChatColor.BLUE
              + "/b e lift-- More or less raises each block in the brush area blockPositionY one"); // Giltwist
      return;
    }
    for (int x = 1; x < par.length; x++) {
      try {
        if (par[x].startsWith("melt")) {
          this.fillRecursion = 1;
          this.erodeRecursion = 1;
          this.fillFace = 5;
          this.erodeFace = 2;
          v.owner().setBrushSize(10);
          v.sendMessage(ChatColor.AQUA + "Melt mode. (/b e e2 f5 re1 rf1 b10)");
          continue;
        } else if (par[x].startsWith("fill")) {
          this.fillRecursion = 1;
          this.erodeRecursion = 1;
          this.fillFace = 2;
          this.erodeFace = 5;
          v.owner().setBrushSize(8);
          v.sendMessage(ChatColor.AQUA + "Fill mode. (/b e e5 f2 re1 rf1 b8)");
          continue;
        } else if (par[x].startsWith("smooth")) {
          this.fillRecursion = 1;
          this.erodeRecursion = 1;
          this.fillFace = 3;
          this.erodeFace = 3;
          v.owner().setBrushSize(16);
          v.sendMessage(ChatColor.AQUA + "Smooth mode. (/b e e3 f3 re1 rf1 b16)");
          continue;
        } else if (par[x].startsWith("lift")) { // Giltwist
          this.fillRecursion = 1;
          this.erodeRecursion = 0;
          this.fillFace = 1;
          this.erodeFace = 6;
          v.owner().setBrushSize(10);
          v.sendMessage(ChatColor.AQUA + "Lift mode. (/b e e6 f1 re0 rf1 b10)");
          continue;
        } else if (par[x].startsWith("true")) {
          this.trueCircle = 0.5;
          v.sendMessage(ChatColor.AQUA + "True circle mode ON." + this.erodeRecursion);
          continue;
        } else if (par[x].startsWith("false")) {
          this.trueCircle = 0;
          v.sendMessage(ChatColor.AQUA + "True circle mode OFF." + this.erodeRecursion);
          continue;
        } else if (par[x].startsWith("rf")) {
          this.fillRecursion = Integer.parseInt(par[x].replace("rf", ""));
          v.sendMessage(ChatColor.BLUE + "Fill recursion amount set to " + this.fillRecursion);
          continue;
        } else if (par[x].startsWith("re")) {
          this.erodeRecursion = Integer.parseInt(par[x].replace("re", ""));
          v.sendMessage(ChatColor.AQUA + "Erosion recursion amount set to " + this.erodeRecursion);
          continue;

        } else if (par[x].startsWith("f")) {
          this.fillFace = Integer.parseInt(par[x].replace("f", ""));
          v.sendMessage(ChatColor.BLUE + "Fill minumum touching faces set to " + this.fillFace);
          continue;
        } else if (par[x].startsWith("b")) {
          v.owner().setBrushSize(Integer.parseInt(par[x].replace("b", "")));
          // v.sendMessage(ChatColor.GREEN + "Brush size set to " + v.brushSize); // -
          // setBrushSize(#) already prints info
          continue;
        } else if (par[x].startsWith("e")) {
          this.erodeFace = Integer.parseInt(par[x].replace("e", ""));
          v.sendMessage(ChatColor.AQUA + "Erosion minimum exposed faces set to " + this.erodeFace);
          continue;
        } else {
          v.sendMessage(
              ChatColor.RED
                  + "Invalid brush parameters! use the info parameter to display parameter info.");
        }
      } catch (final Exception e) {
        v.sendMessage(
            ChatColor.RED
                + "Invalid brush parameters! \""
                + par[x]
                + "\" is not a valid statement. Please use the 'info' parameter to display parameter info.");
      }
    }
  }
 @Override
 protected final void powder(final SnipeData v) {
   if (this.set(this.getLastBlock(), v)) {
     v.owner().getPlayer().sendMessage(ChatColor.GRAY + "Point one");
   }
 }