类 MerchantMenu
java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
net.minecraft.world.inventory.MerchantMenu
-
字段概要
字段修饰符和类型字段说明private static final int
private boolean
private static final int
private static final int
private int
protected static final int
protected static final int
protected static final int
private static final int
private static final int
private static final int
private boolean
private final MerchantContainer
private final Merchant
private static final int
private static final int
从类继承的字段 net.minecraft.world.inventory.AbstractContainerMenu
CARRIED_SLOT_SIZE, containerId, QUICKCRAFT_HEADER_CONTINUE, QUICKCRAFT_HEADER_END, QUICKCRAFT_HEADER_START, QUICKCRAFT_TYPE_CHARITABLE, QUICKCRAFT_TYPE_CLONE, QUICKCRAFT_TYPE_GREEDY, SLOT_CLICKED_OUTSIDE, slots
-
构造器概要
构造器构造器说明MerchantMenu
(int pContainerId, Inventory pPlayerInventory) MerchantMenu
(int pContainerId, Inventory pPlayerInventory, Merchant pTrader) -
方法概要
修饰符和类型方法说明boolean
boolean
canTakeItemForPickAll
(ItemStack pStack, Slot pSlot) int
int
int
private void
moveFromInventoryToPaymentSlot
(int pPaymentSlotIndex, ItemStack pPaymentSlot) private void
quickMoveStack
(Player pPlayer, int pIndex) void
void
setCanRestock
(boolean pCanRestock) void
setMerchantLevel
(int pLevel) void
setOffers
(MerchantOffers pOffers) void
setSelectionHint
(int pCurrentRecipeIndex) void
setShowProgressBar
(boolean pShowProgressBar) void
setXp
(int pXp) boolean
void
slotsChanged
(Container pInventory) boolean
stillValid
(Player pPlayer) void
tryMoveItems
(int pSelectedMerchantRecipe) 从类继承的方法 net.minecraft.world.inventory.AbstractContainerMenu
addDataSlot, addDataSlots, addSlot, addSlotListener, broadcastChanges, broadcastFullState, canDragTo, canItemQuickReplace, checkContainerDataCount, checkContainerSize, clearContainer, clicked, clickMenuButton, findSlot, getCarried, getItems, getQuickcraftHeader, getQuickcraftMask, getQuickCraftPlaceCount, getQuickcraftType, getRedstoneSignalFromBlockEntity, getRedstoneSignalFromContainer, getSlot, getStateId, getType, incrementStateId, initializeContents, isValidQuickcraftType, isValidSlotIndex, moveItemStackTo, removeSlotListener, resetQuickCraft, resumeRemoteUpdates, sendAllDataToRemote, setCarried, setData, setItem, setRemoteCarried, setRemoteSlot, setRemoteSlotNoCopy, setSynchronizer, stillValid, suppressRemoteUpdates, transferState
-
字段详细资料
-
PAYMENT1_SLOT
protected static final int PAYMENT1_SLOT- 另请参阅:
-
PAYMENT2_SLOT
protected static final int PAYMENT2_SLOT- 另请参阅:
-
RESULT_SLOT
protected static final int RESULT_SLOT- 另请参阅:
-
INV_SLOT_START
private static final int INV_SLOT_START- 另请参阅:
-
INV_SLOT_END
private static final int INV_SLOT_END- 另请参阅:
-
USE_ROW_SLOT_START
private static final int USE_ROW_SLOT_START- 另请参阅:
-
USE_ROW_SLOT_END
private static final int USE_ROW_SLOT_END- 另请参阅:
-
SELLSLOT1_X
private static final int SELLSLOT1_X- 另请参阅:
-
SELLSLOT2_X
private static final int SELLSLOT2_X- 另请参阅:
-
BUYSLOT_X
private static final int BUYSLOT_X- 另请参阅:
-
ROW_Y
private static final int ROW_Y- 另请参阅:
-
trader
-
tradeContainer
-
merchantLevel
private int merchantLevel -
showProgressBar
private boolean showProgressBar -
canRestock
private boolean canRestock
-
-
构造器详细资料
-
MerchantMenu
-
MerchantMenu
-
-
方法详细资料
-
setShowProgressBar
public void setShowProgressBar(boolean pShowProgressBar) -
slotsChanged
- 覆盖:
slotsChanged
在类中AbstractContainerMenu
-
setSelectionHint
public void setSelectionHint(int pCurrentRecipeIndex) -
stillValid
- 指定者:
stillValid
在类中AbstractContainerMenu
-
getTraderXp
public int getTraderXp() -
getFutureTraderXp
public int getFutureTraderXp() -
setXp
public void setXp(int pXp) -
getTraderLevel
public int getTraderLevel() -
setMerchantLevel
public void setMerchantLevel(int pLevel) -
setCanRestock
public void setCanRestock(boolean pCanRestock) -
canRestock
public boolean canRestock() -
canTakeItemForPickAll
-
quickMoveStack
- 指定者:
quickMoveStack
在类中AbstractContainerMenu
-
playTradeSound
private void playTradeSound() -
removed
- 覆盖:
removed
在类中AbstractContainerMenu
-
tryMoveItems
public void tryMoveItems(int pSelectedMerchantRecipe) -
moveFromInventoryToPaymentSlot
-
setOffers
-
getOffers
-
showProgressBar
public boolean showProgressBar()
-