Hey! How would I make it so a sheep would spawn in colored? Heres my code: player.getWorld().spawnCreature(location, EntityType.SHEEP).setCustomName(ChatColor.AQUA + "Troll");;
Cast it to a Sheep. Code:java Sheep sheep = (Sheep) player.getWorld().spawnEntity(location, EntityType.SHEEP); sheep.setCustomName("HerpDerp");sheep.setColor(DyeColor.PINK);
yes I thought it whas something like: Code:java Entity entity = player.getWorld().spawnEntity(player.getLocation, EntityType.SHEEP);if(entity instanceof Sheep) {Sheep sheep = (Sheep) entity;sheep.setDyeColor(Color.BLUE);} I thought it whas something like this but I can be mistaken, however I'm not sure how it behaves on a command or spawn eggs.