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.
import crafttweaker.api.villager.trade.type.TreasureMapForEmeralds;
Implements
TreasureMapForEmeralds
implements the following interfaces:
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 tradescript.zs
Returns: A new TreasureMapForEmeralds
// 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: int
Type: int
- How many emeralds should the map cost displayName: string
Type: string
- The name of the map maxUses: int
Type: int
- How many times this trade can be used villagerXp: int
Type: int
- How much experience does this trade reward the villager
Return Type:
TreasureMapForEmeralds
getOffer(traderEntity as Entity, random as RandomSource) as MerchantOffer
// TreasureMapForEmeralds.getOffer(traderEntity as Entity, random as RandomSource) as MerchantOffer;myTreasureMapForEmeralds.getOffer(myEntity, myRandomSource);
Parameters:
random: RandomSource
Type: RandomSource
Return Type:
MerchantOffer