Class ExpandMerchant
java.lang.Object
com.blamejared.crafttweaker.natives.entity.type.villager.ExpandMerchant
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanRestock(net.minecraft.world.item.trading.Merchant internal) Checks if the merchant can restock.static net.minecraft.sounds.SoundEventgetNotifyTradeSound(net.minecraft.world.item.trading.Merchant internal) Gets the notify trade sound of the merchant.static net.minecraft.world.item.trading.MerchantOffersgetOffers(net.minecraft.world.item.trading.Merchant internal) Gets theMerchantOffersof the merchant.static net.minecraft.world.entity.player.PlayergetTradingPlayer(net.minecraft.world.item.trading.Merchant internal) Gets the trading player of the merchant.static intgetVillagerXp(net.minecraft.world.item.trading.Merchant internal) Gets the villager XP of the merchant.static booleanisClientSide(net.minecraft.world.item.trading.Merchant internal) Checks if the merchant is on the client side.static voidnotifyTrade(net.minecraft.world.item.trading.Merchant internal, net.minecraft.world.item.trading.MerchantOffer offer) Notifies the merchant that a trade has occurred.static voidnotifyTradeUpdated(net.minecraft.world.item.trading.Merchant internal, net.minecraft.world.item.ItemStack stack) Notifies the merchant that the trade has been updated.static voidopenTradingScreen(net.minecraft.world.item.trading.Merchant internal, net.minecraft.world.entity.player.Player player, net.minecraft.network.chat.Component displayName, int level) Opens the trading screen for the merchant.static voidsetTradingPlayer(net.minecraft.world.item.trading.Merchant internal, net.minecraft.world.entity.player.Player player) Sets the trading player of the merchant.static booleanshowProgressBar(net.minecraft.world.item.trading.Merchant internal) Gets if the merchant should show the progress bar.
-
Constructor Details
-
ExpandMerchant
public ExpandMerchant()
-
-
Method Details
-
setTradingPlayer
public static void setTradingPlayer(net.minecraft.world.item.trading.Merchant internal, net.minecraft.world.entity.player.Player player) Sets the trading player of the merchant.- Parameters:
player- The player to set as the trading player.
-
getTradingPlayer
public static net.minecraft.world.entity.player.Player getTradingPlayer(net.minecraft.world.item.trading.Merchant internal) Gets the trading player of the merchant.- Returns:
- The trading player of the merchant.
-
getOffers
public static net.minecraft.world.item.trading.MerchantOffers getOffers(net.minecraft.world.item.trading.Merchant internal) Gets theMerchantOffersof the merchant.- Returns:
- The
MerchantOffersof the merchant.
-
notifyTrade
public static void notifyTrade(net.minecraft.world.item.trading.Merchant internal, net.minecraft.world.item.trading.MerchantOffer offer) Notifies the merchant that a trade has occurred.- Parameters:
offer- TheMerchantOfferthat occurred.
-
notifyTradeUpdated
public static void notifyTradeUpdated(net.minecraft.world.item.trading.Merchant internal, net.minecraft.world.item.ItemStack stack) Notifies the merchant that the trade has been updated.- Parameters:
stack- TheItemStackthat was traded.
-
getVillagerXp
public static int getVillagerXp(net.minecraft.world.item.trading.Merchant internal) Gets the villager XP of the merchant.- Returns:
- The villager XP of the merchant.
-
showProgressBar
public static boolean showProgressBar(net.minecraft.world.item.trading.Merchant internal) Gets if the merchant should show the progress bar.- Returns:
- If the merchant should show the progress bar.
-
getNotifyTradeSound
public static net.minecraft.sounds.SoundEvent getNotifyTradeSound(net.minecraft.world.item.trading.Merchant internal) Gets the notify trade sound of the merchant.- Returns:
- The notify trade sound of the merchant.
-
canRestock
public static boolean canRestock(net.minecraft.world.item.trading.Merchant internal) Checks if the merchant can restock.- Returns:
- true if the merchant can restock.
-
openTradingScreen
public static void openTradingScreen(net.minecraft.world.item.trading.Merchant internal, net.minecraft.world.entity.player.Player player, net.minecraft.network.chat.Component displayName, int level) Opens the trading screen for the merchant.- Parameters:
player- The player to open the trading screen for.displayName- The display name of the merchant.level- The level of the merchant.
-
isClientSide
public static boolean isClientSide(net.minecraft.world.item.trading.Merchant internal) Checks if the merchant is on the client side.- Returns:
- true if the merchant is on the client side.
-