BasicItemListing

Link to basicitemlisting

Importing the class

Link to importing-the-class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.api.villager.trade.type.BasicItemListing;

Implemented Interfaces

Link to implemented-interfaces

BasicItemListing implements the following interfaces. That means all methods defined in these interfaces are also available in BasicItemListing

ZenScript
Copy
new BasicItemListing(price as ItemStack, price2 as ItemStack, forSale as ItemStack, maxTrades as int, xp as int, priceMult as float) as BasicItemListing
new BasicItemListing(<item:minecraft:diamond>, <item:minecraft:diamond>, <item:minecraft:diamond>, 8, 2, 0.05);
ParameterTypeDescription
Parameter
price
Type
ItemStack
Description
The primary Item that is being given to the villager
Parameter
price2
Type
ItemStack
Description
The secondary item that is being given to the villager
Parameter
forSale
Type
ItemStack
Description
The Item that is being sold by the villager
Parameter
maxTrades
Type
int
Description
How many times can this trade be used
Parameter
xp
Type
int
Description
How much experience does this trade reward the villager
Parameter
priceMult
Type
float
Description
How much the price is affected by demand, Hero of the Village, and village reputation