Skip to content

Commit

Permalink
Added an accessor for villagers
Browse files Browse the repository at this point in the history
  • Loading branch information
CovertJaguar committed Jan 7, 2013
1 parent 5509287 commit 224d933
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion fml/common/cpw/mods/fml/common/registry/VillagerRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
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;
Expand Down Expand Up @@ -148,7 +150,16 @@ public static String getVillagerSkin(int villagerType, String defaultSkin)
}
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
*
Expand Down

0 comments on commit 224d933

Please sign in to comment.