TreasureMapForEmeralds

Link to treasuremapforemeralds

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;

已实现的接口

Link to 已实现的接口

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);
参数类型描述
参数
emeraldCost
类型
int
描述
How many emeralds should the map cost
参数
destination
类型
资源位置
描述
What should the map lead the player to
参数
displayName
类型
string
描述
The name of the map
参数
destinationType
类型
MapDecorationType
描述
The type of destination t
参数
maxUses
类型
int
描述
How many times this trade can be used
参数
villagerXp
类型
int
描述
How much experience does this trade reward the villager