TreasureMapForEmeralds

Link to treasuremapforemeralds

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

Implemented Interfaces

Link to implemented-interfaces

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

Name: create

Creates a new TreasureMapForEmeralds trade

Returns: A new TreasureMapForEmeralds
Return Type: TreasureMapForEmeralds

ZenScript
Copy
// 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);
ParameterTypeDescription
Parameter
emeraldCost
Type
int
Description
How many emeralds should the map cost
Parameter
destination
Type
ResourceLocation
Description
What should the map lead the player to
Parameter
displayName
Type
string
Description
The name of the map
Parameter
destinationType
Type
MapDecorationType
Description
The type of destination t
Parameter
maxUses
Type
int
Description
How many times this trade can be used
Parameter
villagerXp
Type
int
Description
How much experience does this trade reward the villager