Modifier and Type | Field and Description |
---|---|
private int |
experience |
private MerchantInventory |
merchantInventory |
private PlayerEntity |
player |
private TradeOfferList |
recipeList |
Constructor and Description |
---|
SimpleMerchant(PlayerEntity playerEntity) |
Modifier and Type | Method and Description |
---|---|
PlayerEntity |
getCurrentCustomer() |
int |
getExperience() |
World |
getMerchantWorld() |
TradeOfferList |
getOffers() |
SoundEvent |
getYesSound() |
boolean |
isLeveledMerchant() |
void |
onSellingItem(ItemStack stack) |
void |
setCurrentCustomer(PlayerEntity customer) |
void |
setExperienceFromServer(int experience) |
void |
setOffersFromServer(TradeOfferList offers) |
void |
trade(TradeOffer offer) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canRefreshTrades, sendOffers
private final MerchantInventory merchantInventory
private final PlayerEntity player
private TradeOfferList recipeList
private int experience
public SimpleMerchant(PlayerEntity playerEntity)
@Nullable public PlayerEntity getCurrentCustomer()
getCurrentCustomer
in interface Merchant
public void setCurrentCustomer(@Nullable PlayerEntity customer)
setCurrentCustomer
in interface Merchant
public TradeOfferList getOffers()
@Environment(value=CLIENT) public void setOffersFromServer(@Nullable TradeOfferList offers)
setOffersFromServer
in interface Merchant
public void trade(TradeOffer offer)
public void onSellingItem(ItemStack stack)
onSellingItem
in interface Merchant
public World getMerchantWorld()
getMerchantWorld
in interface Merchant
public int getExperience()
getExperience
in interface Merchant
public void setExperienceFromServer(int experience)
setExperienceFromServer
in interface Merchant
public boolean isLeveledMerchant()
isLeveledMerchant
in interface Merchant
public SoundEvent getYesSound()
getYesSound
in interface Merchant