Package org.bukkit.entity

Examples of org.bukkit.entity.Sheep


        Villager villager = (Villager) entity1;
        villager.setProfession(ClosestMatches.villagerProfessions(type).get(0));
      } else if (type.startsWith("item:") && toSpawn == EntityType.DROPPED_ITEM){

      } else if (dye != null){
        Sheep sheep = (Sheep) entity1;
        sheep.setColor(dye);
      }
    }
   
    entity1.setVelocity(target.getEyeLocation().getDirection().multiply(2));
    entity1.setFallDistance(-999999999999F);
View Full Code Here


            Villager villager = (Villager) entity1;
            villager.setProfession(ClosestMatches.villagerProfessions(type).get(0));
          } else if (type.startsWith("item:") && toSpawn == EntityType.DROPPED_ITEM){

          } else if (dye != null){
            Sheep sheep = (Sheep) entity1;
            sheep.setColor(dye);
          }
        }
       
        entity1.setVelocity(p.getEyeLocation().getDirection().multiply(2));
        entity1.setFallDistance(-999999999999F);
View Full Code Here

          oce.setCatType(ClosestMatches.catType(type).get(0));
        }
       
        if (type.startsWith("sheepcolor:")){
          type = type.split(":")[1];
          Sheep sheep = (Sheep) entity;
          sheep.setColor(ClosestMatches.dyeColor(type).get(0));
        }
      }
    }
   
    LogHelper.showInfo("mobsSuccess#####[" + amount + " " + Utils.userFriendlyNames((type != null ? type + " " : "") + toSpawn.name()), sender, ChatColor.AQUA);
View Full Code Here

            }

            // Extra processing depending on the mob and drop type
            switch (target.getType()) {
                case SHEEP:
                    Sheep sheep = (Sheep) target;

                    if (drop.getType() == Material.WOOL) {
                        if (sheep.isSheared()) {
                            return;
                        }

                        drop = new Wool(sheep.getColor()).toItemStack(drop.getAmount());
                        sheep.setSheared(true);
                    }
                    break;

                case SKELETON:
                    if (((Skeleton) target).getSkeletonType() == SkeletonType.WITHER) {
View Full Code Here

        if (entity instanceof Sheep) {

            if(doesChestContain(Material.SHEARS)) {

                Sheep sh = (Sheep) entity;
                return !sh.isSheared();

            }
        }

        return false;
View Full Code Here

        if (entity instanceof Sheep) {

            if(doesChestContain(Material.SHEARS)) {

                Sheep sh = (Sheep) entity;
                if(sh.isSheared())
                    return false;
                sh.setSheared(true);
                return addToChest(new ItemStack(Material.WOOL, 3, sh.getColor().getWoolData()));
            }
        }

        return false;
    }
View Full Code Here

    if (canShear) {
      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;
          }
        }
      }
      lastShear = now;
View Full Code Here

TOP

Related Classes of org.bukkit.entity.Sheep

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.