|
|
|
@ -7,10 +7,7 @@ import org.bukkit.World;
|
|
|
|
|
import org.bukkit.block.Block;
|
|
|
|
|
import org.bukkit.util.Vector;
|
|
|
|
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.InvalidPropertiesFormatException;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Random;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
|
public class Function {
|
|
|
|
|
public static String serialiseBlockLocation(Location loc){
|
|
|
|
@ -129,6 +126,9 @@ public class Function {
|
|
|
|
|
Material.STONE_SLAB,
|
|
|
|
|
Material.WARPED_SLAB
|
|
|
|
|
);
|
|
|
|
|
public static Block searchForMaterial(Location startLoc, Vector searchDirection, Material searchMaterial){
|
|
|
|
|
return searchForMaterial(startLoc, searchDirection, searchMaterial, new ArrayList<>());
|
|
|
|
|
}
|
|
|
|
|
public static Block searchForMaterial(Location startLoc, Vector searchDirection, Material searchMaterial, List<Material> ignoreMaterials){
|
|
|
|
|
Location loc = new Location(startLoc.getWorld(), startLoc.getBlockX(), startLoc.getBlockY(), startLoc.getBlockZ());
|
|
|
|
|
for(int i=0; loc.getBlockY()>=0 && loc.getBlockY()<=255; loc.add(searchDirection)){
|
|
|
|
|