Package net.minecraft.entity
Class NPCMerchant
- java.lang.Object
-
- net.minecraft.entity.NPCMerchant
-
-
Field Summary
Fields Modifier and Type Field Description private MerchantInventorycontainerprivate MerchantOffersoffersprivate PlayerEntitysourceprivate intxp
-
Constructor Summary
Constructors Constructor Description NPCMerchant(PlayerEntity p_i50184_1_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WorldgetLevel()SoundEventgetNotifyTradeSound()MerchantOffersgetOffers()PlayerEntitygetTradingPlayer()intgetVillagerXp()voidnotifyTrade(MerchantOffer p_213704_1_)voidnotifyTradeUpdated(ItemStack p_110297_1_)voidoverrideOffers(MerchantOffers p_213703_1_)voidoverrideXp(int p_213702_1_)voidsetTradingPlayer(PlayerEntity p_70932_1_)booleanshowProgressBar()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraft.entity.merchant.IMerchant
canRestock, openTradingScreen
-
-
-
-
Field Detail
-
container
private final MerchantInventory container
-
source
private final PlayerEntity source
-
offers
private MerchantOffers offers
-
xp
private int xp
-
-
Constructor Detail
-
NPCMerchant
public NPCMerchant(PlayerEntity p_i50184_1_)
-
-
Method Detail
-
getTradingPlayer
@Nullable public PlayerEntity getTradingPlayer()
- Specified by:
getTradingPlayerin interfaceIMerchant
-
setTradingPlayer
public void setTradingPlayer(@Nullable PlayerEntity p_70932_1_)- Specified by:
setTradingPlayerin interfaceIMerchant
-
getOffers
public MerchantOffers getOffers()
-
overrideOffers
public void overrideOffers(@Nullable MerchantOffers p_213703_1_)- Specified by:
overrideOffersin interfaceIMerchant
-
notifyTrade
public void notifyTrade(MerchantOffer p_213704_1_)
- Specified by:
notifyTradein interfaceIMerchant
-
notifyTradeUpdated
public void notifyTradeUpdated(ItemStack p_110297_1_)
- Specified by:
notifyTradeUpdatedin interfaceIMerchant
-
getVillagerXp
public int getVillagerXp()
- Specified by:
getVillagerXpin interfaceIMerchant
-
overrideXp
public void overrideXp(int p_213702_1_)
- Specified by:
overrideXpin interfaceIMerchant
-
showProgressBar
public boolean showProgressBar()
- Specified by:
showProgressBarin interfaceIMerchant
-
getNotifyTradeSound
public SoundEvent getNotifyTradeSound()
- Specified by:
getNotifyTradeSoundin interfaceIMerchant
-
-