Home Commands Examples Getting Started With Scripts Global Keywords
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

ItemListing

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.villager.trade.ItemListing;

Members

getOffer(traderEntity as Entity, random as RandomSource) as MerchantOffer
script.zs
// ItemListing.getOffer(traderEntity as Entity, random as RandomSource) as MerchantOffer;
myItemListing.getOffer(myEntity, myRandomSource);

Parameters:

traderEntity Type: Entity
random Type: RandomSource

Return Type: MerchantOffer