public class MerchantRecipe
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private ItemStack |
itemToBuy
Item the Villager buys.
|
private ItemStack |
itemToSell
Item the Villager sells.
|
private int |
maxTradeUses
Maximum times this trade can be used.
|
private boolean |
rewardsExp |
private ItemStack |
secondItemToBuy
Second Item the Villager buys.
|
private int |
toolUses
Saves how much has been tool used when put into to slot to be enchanted.
|
Constructor and Description |
---|
MerchantRecipe(ItemStack buy1,
Item sellItem) |
MerchantRecipe(ItemStack buy1,
ItemStack sell) |
MerchantRecipe(ItemStack buy1,
ItemStack buy2,
ItemStack sell) |
MerchantRecipe(ItemStack buy1,
ItemStack buy2,
ItemStack sell,
int toolUsesIn,
int maxTradeUsesIn) |
MerchantRecipe(NBTTagCompound tagCompound) |
Modifier and Type | Method and Description |
---|---|
void |
compensateToolUses()
Compensates
toolUses with maxTradeUses |
ItemStack |
getItemToBuy()
Gets the itemToBuy.
|
ItemStack |
getItemToSell()
Gets itemToSell.
|
int |
getMaxTradeUses() |
boolean |
getRewardsExp() |
ItemStack |
getSecondItemToBuy()
Gets secondItemToBuy.
|
int |
getToolUses() |
boolean |
hasSecondItemToBuy()
Gets if Villager has secondItemToBuy.
|
void |
increaseMaxTradeUses(int increment) |
void |
incrementToolUses() |
boolean |
isRecipeDisabled() |
void |
readFromTags(NBTTagCompound tagCompound) |
NBTTagCompound |
writeToTags() |
private ItemStack itemToBuy
private ItemStack secondItemToBuy
private ItemStack itemToSell
private int toolUses
private int maxTradeUses
private boolean rewardsExp
public MerchantRecipe(NBTTagCompound tagCompound)
public MerchantRecipe(ItemStack buy1, ItemStack buy2, ItemStack sell, int toolUsesIn, int maxTradeUsesIn)
public ItemStack getItemToBuy()
public ItemStack getSecondItemToBuy()
public boolean hasSecondItemToBuy()
public ItemStack getItemToSell()
public int getToolUses()
public int getMaxTradeUses()
public void incrementToolUses()
public void increaseMaxTradeUses(int increment)
public boolean isRecipeDisabled()
public void compensateToolUses()
toolUses
with maxTradeUses
public boolean getRewardsExp()
public void readFromTags(NBTTagCompound tagCompound)
public NBTTagCompound writeToTags()