Advertisement
Guest User

Untitled

a guest
Nov 20th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. private void removeBed(Location location) {
  2. int radius = 20;
  3. List<Block> blocks = new ArrayList<Block>();
  4. for(int x = location.getBlockX() - radius; x <= location.getBlockX() + radius; x++) {
  5. for(int y = location.getBlockY() - radius; y <= location.getBlockY() + radius; y++) {
  6. for(int z = location.getBlockZ() - radius; z <= location.getBlockZ() + radius; z++) {
  7.  
  8. if (location.getWorld().getBlockAt(x, y, z).getType().toString().contains("WOOL")){
  9. System.out.println("xDiff: "+(location.getWorld().getBlockAt(x, y, z).getLocation().getX()-location.getX())+"--"+"yDiff: "+(location.getWorld().getBlockAt(x, y, z).getLocation().getY()-location.getY())+"--"+"zDiff: "+(location.getWorld().getBlockAt(x, y, z).getLocation().getZ()-location.getZ()));
  10. System.out.println("------");
  11. }
  12.  
  13.  
  14. }
  15. }
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement