public class MerchantRecipe extends java.lang.Object implements Recipe
| 构造器和说明 |
|---|
MerchantRecipe(ItemStack result,
int maxUses) |
MerchantRecipe(ItemStack result,
int uses,
int maxUses,
boolean experienceReward) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addIngredient(ItemStack item) |
java.util.List<ItemStack> |
getIngredients() |
int |
getMaxUses()
Get the maximum number of uses this trade has.
|
ItemStack |
getResult()
得到这个配方的结果.
|
int |
getUses()
Get the number of times this trade has been used.
|
boolean |
hasExperienceReward()
Whether to reward experience for the trade.
|
void |
removeIngredient(int index) |
void |
setExperienceReward(boolean flag)
Set whether to reward experience for the trade.
|
void |
setIngredients(java.util.List<ItemStack> ingredients) |
void |
setMaxUses(int maxUses)
Set the maximum number of uses this trade has.
|
void |
setUses(int uses)
Set the number of times this trade has been used.
|
public MerchantRecipe(ItemStack result, int maxUses)
public MerchantRecipe(ItemStack result, int uses, int maxUses, boolean experienceReward)
public ItemStack getResult()
Recipe原文: Get the result of this recipe.
public void addIngredient(ItemStack item)
public void removeIngredient(int index)
public void setIngredients(java.util.List<ItemStack> ingredients)
public java.util.List<ItemStack> getIngredients()
public int getUses()
public void setUses(int uses)
uses - the number of usespublic int getMaxUses()
public void setMaxUses(int maxUses)
maxUses - the maximum number of time this trade can be usedpublic boolean hasExperienceReward()
public void setExperienceReward(boolean flag)
flag - whether to reward experience for completing this trade