Home Commands Examples Getting Started With Scripts Global Keywords

LootParamsBuilder

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.

script.zs
import crafttweaker.api.loot.LootParamsBuilder;

Static Methods

Return Type: LootParamsBuilder

script.zs
LootParamsBuilder.create(level as ServerLevel) as LootParamsBuilder
ParameterType
Parameter
level
Type
ServerLevel

Methods

Return Type: LootParams

script.zs
LootParamsBuilder.build(params as LootContextParamSet) as LootParams
ParameterType
Parameter
params
Type
LootContextParamSet

Return Type: @org.openzen.zencode.java.ZenCodeType.Nullable T

script.zs
LootParamsBuilder.getOptionalParameter<T : Object>(param as LootContextParam<T>) as @org.openzen.zencode.java.ZenCodeType.Nullable T
ParameterType
Parameter
param
Type
LootContextParam<T>
Parameter
T
Type
Object

Return Type: T

script.zs
LootParamsBuilder.getParameter<T : Object>(param as LootContextParam<T>) as T
ParameterType
Parameter
param
Type
LootContextParam<T>
Parameter
T
Type
Object

Return Type: LootParamsBuilder

script.zs
LootParamsBuilder.withDynamicDrop(key as ResourceLocation, drop as DynamicDrop) as LootParamsBuilder
ParameterType
Parameter
key
Type
ResourceLocation
Parameter
drop
Type
DynamicDrop

Return Type: LootParamsBuilder

script.zs
LootParamsBuilder.withLuck(luck as float) as LootParamsBuilder
ParameterType
Parameter
luck
Type
float

Return Type: LootParamsBuilder

script.zs
LootParamsBuilder.withOptionalParameter<T : Object>(param as LootContextParam<T>, value as @org.openzen.zencode.java.ZenCodeType.Nullable T) as LootParamsBuilder
ParameterType
Parameter
param
Type
LootContextParam<T>
Parameter
value
Type
@org.openzen.zencode.java.ZenCodeType.Nullable T
Parameter
T
Type
Object

Return Type: LootParamsBuilder

script.zs
LootParamsBuilder.withParameter<T : Object>(param as LootContextParam<T>, value as T) as LootParamsBuilder
ParameterType
Parameter
param
Type
LootContextParam<T>
Parameter
value
Type
T
Parameter
T
Type
Object

Properties

TypeHas GetterHas Setter
Type
ServerLevel
Has Getter
true
Has Setter
false