Class MerchantContainer
- java.lang.Object
-
- net.minecraft.inventory.container.Container
-
- net.minecraft.inventory.container.MerchantContainer
-
public class MerchantContainer extends Container
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
canRestock
private int
merchantLevel
private boolean
showProgressBar
private MerchantInventory
tradeContainer
private IMerchant
trader
-
Fields inherited from class net.minecraft.inventory.container.Container
containerId, slots
-
-
Constructor Summary
Constructors Constructor Description MerchantContainer(int p_i50068_1_, PlayerInventory p_i50068_2_)
MerchantContainer(int p_i50069_1_, PlayerInventory p_i50069_2_, IMerchant p_i50069_3_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canRestock()
boolean
canTakeItemForPickAll(ItemStack p_94530_1_, Slot p_94530_2_)
int
getFutureTraderXp()
MerchantOffers
getOffers()
int
getTraderLevel()
int
getTraderXp()
private boolean
isSameItem(ItemStack p_217050_1_, ItemStack p_217050_2_)
private void
moveFromInventoryToPaymentSlot(int p_217053_1_, ItemStack p_217053_2_)
private void
playTradeSound()
ItemStack
quickMoveStack(PlayerEntity p_82846_1_, int p_82846_2_)
void
removed(PlayerEntity p_75134_1_)
void
setCanRestock(boolean p_223431_1_)
void
setMerchantLevel(int p_217043_1_)
void
setOffers(MerchantOffers p_217044_1_)
void
setSelectionHint(int p_75175_1_)
void
setShowProgressBar(boolean p_217045_1_)
void
setXp(int p_217052_1_)
boolean
showProgressBar()
void
slotsChanged(IInventory p_75130_1_)
boolean
stillValid(PlayerEntity p_75145_1_)
void
tryMoveItems(int p_217046_1_)
-
Methods inherited from class net.minecraft.inventory.container.Container
addDataSlot, addDataSlots, addSlot, addSlotListener, backup, broadcastChanges, canDragTo, canItemQuickReplace, checkContainerDataCount, checkContainerSize, clearContainer, clicked, clickMenuButton, consideredTheSameItem, getItems, getQuickcraftHeader, getQuickcraftMask, getQuickCraftSlotCount, getQuickcraftType, getRedstoneSignalFromBlockEntity, getRedstoneSignalFromContainer, getSlot, getType, isSynched, isValidQuickcraftType, moveItemStackTo, removeSlotListener, resetQuickCraft, setAll, setData, setItem, setSynched, stillValid
-
-
-
-
Field Detail
-
trader
private final IMerchant trader
-
tradeContainer
private final MerchantInventory tradeContainer
-
merchantLevel
private int merchantLevel
-
showProgressBar
private boolean showProgressBar
-
canRestock
private boolean canRestock
-
-
Constructor Detail
-
MerchantContainer
public MerchantContainer(int p_i50068_1_, PlayerInventory p_i50068_2_)
-
MerchantContainer
public MerchantContainer(int p_i50069_1_, PlayerInventory p_i50069_2_, IMerchant p_i50069_3_)
-
-
Method Detail
-
setShowProgressBar
public void setShowProgressBar(boolean p_217045_1_)
-
slotsChanged
public void slotsChanged(IInventory p_75130_1_)
- Overrides:
slotsChanged
in classContainer
-
setSelectionHint
public void setSelectionHint(int p_75175_1_)
-
stillValid
public boolean stillValid(PlayerEntity p_75145_1_)
- Specified by:
stillValid
in classContainer
-
getTraderXp
public int getTraderXp()
-
getFutureTraderXp
public int getFutureTraderXp()
-
setXp
public void setXp(int p_217052_1_)
-
getTraderLevel
public int getTraderLevel()
-
setMerchantLevel
public void setMerchantLevel(int p_217043_1_)
-
setCanRestock
public void setCanRestock(boolean p_223431_1_)
-
canRestock
public boolean canRestock()
-
canTakeItemForPickAll
public boolean canTakeItemForPickAll(ItemStack p_94530_1_, Slot p_94530_2_)
- Overrides:
canTakeItemForPickAll
in classContainer
-
quickMoveStack
public ItemStack quickMoveStack(PlayerEntity p_82846_1_, int p_82846_2_)
- Overrides:
quickMoveStack
in classContainer
-
playTradeSound
private void playTradeSound()
-
removed
public void removed(PlayerEntity p_75134_1_)
-
tryMoveItems
public void tryMoveItems(int p_217046_1_)
-
moveFromInventoryToPaymentSlot
private void moveFromInventoryToPaymentSlot(int p_217053_1_, ItemStack p_217053_2_)
-
setOffers
public void setOffers(MerchantOffers p_217044_1_)
-
getOffers
public MerchantOffers getOffers()
-
showProgressBar
public boolean showProgressBar()
-
-