public class SlotMerchantResult extends Slot
| Modifier and Type | Field and Description |
|---|---|
private int |
field_75231_g |
private IMerchant |
theMerchant
"Instance" of the Merchant.
|
private InventoryMerchant |
theMerchantInventory
Merchant's inventory.
|
private EntityPlayer |
thePlayer
The Player whos trying to buy/sell stuff.
|
inventory, slotNumber, xDisplayPosition, yDisplayPosition| 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)
Decrease the size of the stack in slot (first int arg) by the amount of the second int arg.
|
private boolean |
doTrade(MerchantRecipe trade,
ItemStack firstItem,
ItemStack secondItem) |
boolean |
isItemValid(ItemStack stack)
Check if the stack is a valid item for this slot.
|
protected void |
onCrafting(ItemStack stack)
the itemStack passed in is the output - ie, iron ingots, and pickaxes, not ore and wood.
|
protected void |
onCrafting(ItemStack stack,
int amount)
the itemStack passed in is the output - ie, iron ingots, and pickaxes, not ore and wood.
|
void |
onPickupFromSlot(EntityPlayer playerIn,
ItemStack stack) |
canBeHovered, canTakeStack, getHasStack, getItemStackLimit, getSlotStackLimit, getSlotTexture, getStack, isHere, onSlotChange, onSlotChanged, putStackprivate final InventoryMerchant theMerchantInventory
private EntityPlayer thePlayer
private int field_75231_g
private final IMerchant theMerchant
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 void onPickupFromSlot(EntityPlayer playerIn, ItemStack stack)
onPickupFromSlot in class Slotprivate boolean doTrade(MerchantRecipe trade, ItemStack firstItem, ItemStack secondItem)