public class MerchantTradeOffersEvent extends Event
IMerchant.getRecipes(EntityPlayer)
, allowing mods to modify trade offers depending
on the player. Be warned that this event is fired on both server and client; thus, modders
should ensure that they sync the needed data for this event themselves.Cancelable
.Event.HasResult
MinecraftForge.EVENT_BUS
.Event.HasResult, Event.Result
Constructor and Description |
---|
MerchantTradeOffersEvent(IMerchant merchant,
EntityPlayer player,
MerchantRecipeList list) |
Modifier and Type | Method and Description |
---|---|
MerchantRecipeList |
getList()
The recipe list (if not
null ) returned from this function may be modified. |
IMerchant |
getMerchant() |
EntityPlayer |
getPlayer() |
void |
setList(MerchantRecipeList list) |
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
public MerchantTradeOffersEvent(IMerchant merchant, EntityPlayer player, MerchantRecipeList list)
public MerchantRecipeList getList()
null
) returned from this function may be modified.public void setList(MerchantRecipeList list)
public IMerchant getMerchant()
public EntityPlayer getPlayer()