YATS/Forge Documentation
 All Classes Namespaces Files Functions Variables Enumerator Pages
cpw.mods.fml.common.registry.VillagerRegistry Class Reference

Classes

interface  IVillageCreationHandler
 
interface  IVillageTradeHandler
 

Public Member Functions

void registerVillagerType (int villagerId, String villagerSkin)
 
void registerVillageCreationHandler (IVillageCreationHandler handler)
 
void registerVillageTradeHandler (int villagerId, IVillageTradeHandler handler)
 

Static Public Member Functions

static VillagerRegistry instance ()
 
static String getVillagerSkin (int villagerType, String defaultSkin)
 
static Collection< Integer > getRegisteredVillagers ()
 
static void manageVillagerTrades (MerchantRecipeList recipeList, EntityVillager villager, int villagerType, Random random)
 
static void addExtraVillageComponents (ArrayList components, Random random, int i)
 
static Object getVillageComponent (StructureVillagePieceWeight villagePiece, ComponentVillageStartPiece startPiece, List pieces, Random random, int p1, int p2, int p3, int p4, int p5)
 
static void addEmeraldBuyRecipe (EntityVillager villager, MerchantRecipeList list, Random random, Item item, float chance, int min, int max)
 
static void addEmeraldSellRecipe (EntityVillager villager, MerchantRecipeList list, Random random, Item item, float chance, int min, int max)
 
static void applyRandomTrade (EntityVillager villager, Random rand)
 

Detailed Description

Registry for villager trading control

Author
cpw

Member Function Documentation

static void cpw.mods.fml.common.registry.VillagerRegistry.addEmeraldBuyRecipe ( EntityVillager  villager,
MerchantRecipeList  list,
Random  random,
Item  item,
float  chance,
int  min,
int  max 
)
static
static void cpw.mods.fml.common.registry.VillagerRegistry.addEmeraldSellRecipe ( EntityVillager  villager,
MerchantRecipeList  list,
Random  random,
Item  item,
float  chance,
int  min,
int  max 
)
static
static void cpw.mods.fml.common.registry.VillagerRegistry.addExtraVillageComponents ( ArrayList  components,
Random  random,
int  i 
)
static
static void cpw.mods.fml.common.registry.VillagerRegistry.applyRandomTrade ( EntityVillager  villager,
Random  rand 
)
static
static Collection<Integer> cpw.mods.fml.common.registry.VillagerRegistry.getRegisteredVillagers ( )
static

Returns a list of all added villager types

Returns
newVillagerIds
static Object cpw.mods.fml.common.registry.VillagerRegistry.getVillageComponent ( StructureVillagePieceWeight  villagePiece,
ComponentVillageStartPiece  startPiece,
List  pieces,
Random  random,
int  p1,
int  p2,
int  p3,
int  p4,
int  p5 
)
static
static String cpw.mods.fml.common.registry.VillagerRegistry.getVillagerSkin ( int  villagerType,
String  defaultSkin 
)
static

Callback to setup new villager types

Parameters
villagerType
defaultSkin
static VillagerRegistry cpw.mods.fml.common.registry.VillagerRegistry.instance ( )
static
static void cpw.mods.fml.common.registry.VillagerRegistry.manageVillagerTrades ( MerchantRecipeList  recipeList,
EntityVillager  villager,
int  villagerType,
Random  random 
)
static

Callback to handle trade setup for villagers

Parameters
recipeList
villager
villagerType
random
void cpw.mods.fml.common.registry.VillagerRegistry.registerVillageCreationHandler ( IVillageCreationHandler  handler)

Register a new village creation handler

Parameters
handler
void cpw.mods.fml.common.registry.VillagerRegistry.registerVillagerType ( int  villagerId,
String  villagerSkin 
)

Register a new skin for a villager type

Parameters
villagerId
villagerSkin
void cpw.mods.fml.common.registry.VillagerRegistry.registerVillageTradeHandler ( int  villagerId,
IVillageTradeHandler  handler 
)

Register a new villager trading handler for the specified villager type

Parameters
villagerId
handler

The documentation for this class was generated from the following file: