TreasureMapForEmeralds

Link to treasuremapforemeralds

Importare la Classe

Link to importare-la-classe

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;

Interfacce Implementate

Link to interfacce-implementate

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