public class SlotMerchantResult extends Slot
| Modifier and Type | Field and Description |
|---|---|
private IMerchant |
merchant |
private InventoryMerchant |
merchantInventory |
private EntityPlayer |
player |
private int |
removeCount |
backgroundLocation, backgroundMap, backgroundName, inventory, slotNumber, xPos, yPos| Constructor and Description |
|---|
SlotMerchantResult(EntityPlayer player,
IMerchant merchant,
InventoryMerchant merchantInventory,
int slotIndex,
int xPosition,
int yPosition) |
| Modifier and Type | Method and Description |
|---|---|
ItemStack |
decrStackSize(int amount) |
private boolean |
doTrade(MerchantRecipe trade,
ItemStack firstItem,
ItemStack secondItem) |
boolean |
isItemValid(ItemStack stack) |
protected void |
onCrafting(ItemStack stack) |
protected void |
onCrafting(ItemStack stack,
int amount) |
ItemStack |
onTake(EntityPlayer thePlayer,
ItemStack stack) |
canTakeStack, getBackgroundLocation, getBackgroundMap, getBackgroundSprite, getHasStack, getItemStackLimit, getSlotIndex, getSlotStackLimit, getSlotTexture, getStack, isEnabled, isHere, isSameInventory, onSlotChange, onSlotChanged, onSwapCraft, putStack, setBackgroundLocation, setBackgroundNameprivate final InventoryMerchant merchantInventory
private final EntityPlayer player
private int removeCount
private final IMerchant merchant
public SlotMerchantResult(EntityPlayer player, IMerchant merchant, InventoryMerchant merchantInventory, int slotIndex, int xPosition, int yPosition)
public boolean isItemValid(ItemStack stack)
isItemValid in class Slotpublic ItemStack decrStackSize(int amount)
decrStackSize in class Slotprotected void onCrafting(ItemStack stack, int amount)
onCrafting in class Slotprotected void onCrafting(ItemStack stack)
onCrafting in class Slotpublic ItemStack onTake(EntityPlayer thePlayer, ItemStack stack)
private boolean doTrade(MerchantRecipe trade, ItemStack firstItem, ItemStack secondItem)