Package net.minecraft.entity
Class NPCMerchant
- java.lang.Object
-
- net.minecraft.entity.NPCMerchant
-
-
Field Summary
Fields Modifier and Type Field Description private MerchantInventory
container
private MerchantOffers
offers
private PlayerEntity
source
private int
xp
-
Constructor Summary
Constructors Constructor Description NPCMerchant(PlayerEntity p_i50184_1_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description World
getLevel()
SoundEvent
getNotifyTradeSound()
MerchantOffers
getOffers()
PlayerEntity
getTradingPlayer()
int
getVillagerXp()
void
notifyTrade(MerchantOffer p_213704_1_)
void
notifyTradeUpdated(ItemStack p_110297_1_)
void
overrideOffers(MerchantOffers p_213703_1_)
void
overrideXp(int p_213702_1_)
void
setTradingPlayer(PlayerEntity p_70932_1_)
boolean
showProgressBar()
-
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:
getTradingPlayer
in interfaceIMerchant
-
setTradingPlayer
public void setTradingPlayer(@Nullable PlayerEntity p_70932_1_)
- Specified by:
setTradingPlayer
in interfaceIMerchant
-
getOffers
public MerchantOffers getOffers()
-
overrideOffers
public void overrideOffers(@Nullable MerchantOffers p_213703_1_)
- Specified by:
overrideOffers
in interfaceIMerchant
-
notifyTrade
public void notifyTrade(MerchantOffer p_213704_1_)
- Specified by:
notifyTrade
in interfaceIMerchant
-
notifyTradeUpdated
public void notifyTradeUpdated(ItemStack p_110297_1_)
- Specified by:
notifyTradeUpdated
in interfaceIMerchant
-
getVillagerXp
public int getVillagerXp()
- Specified by:
getVillagerXp
in interfaceIMerchant
-
overrideXp
public void overrideXp(int p_213702_1_)
- Specified by:
overrideXp
in interfaceIMerchant
-
showProgressBar
public boolean showProgressBar()
- Specified by:
showProgressBar
in interfaceIMerchant
-
getNotifyTradeSound
public SoundEvent getNotifyTradeSound()
- Specified by:
getNotifyTradeSound
in interfaceIMerchant
-
-