TreasureMapForEmeralds

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.type.TreasureMapForEmeralds;

Implements

TreasureMapForEmeralds implements the following interfaces:

ItemListing

Members

static create(emeraldCost as int, destination as ResourceLocation, displayName as string, destinationType as Type, maxUses as int, villagerXp as int) as TreasureMapForEmeralds
Creates a new TreasureMapForEmeralds trade

Returns: A new TreasureMapForEmeralds

script.zs
// TreasureMapForEmeralds.create(emeraldCost as int, destination as ResourceLocation, displayName as string, destinationType as MapDecorationType, maxUses as int, villagerXp as int) as TreasureMapForEmeralds;
TreasureMapForEmeralds.create(1, <resource:minecraft:ruined_portal>, "Ruined Portal", <constant:minecraft:world/map/decorationtype:mansion>, 16, 2);

Parameters:

emeraldCost Type: int - How many emeralds should the map cost
destination Type: ResourceLocation - What should the map lead the player to
displayName Type: string - The name of the map
destinationType Type: MapDecorationType - The type of destination t
maxUses Type: int - How many times this trade can be used
villagerXp Type: int - How much experience does this trade reward the villager

Return Type: TreasureMapForEmeralds

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

Parameters:

traderEntity Type: Entity
random Type: RandomSource

Return Type: MerchantOffer