Merge pull request #158 from CovertJaguar/patch-2

Added an accessor for villagers
This commit is contained in:
cpw 2013-01-08 05:36:45 -08:00
commit 256aef5e0f

View file

@ -4,6 +4,8 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.Collection;
import java.util.Collections;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.item.Item;
@ -148,7 +150,16 @@ public class VillagerRegistry
}
return defaultSkin;
}
/**
* Returns a list of all added villager types
*
* @return newVillagerIds
*/
public static Collection<Integer> getRegisteredVillagers()
{
return Collections.unmodifiableCollection(instance().newVillagerIds);
}
/**
* Callback to handle trade setup for villagers
*