LootParamsBuilder

Link to lootparamsbuilder

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.loot.LootParamsBuilder;

Name: create

Return Type: LootParamsBuilder

ZenScript
Copy
LootParamsBuilder.create(level as ServerLevel) as LootParamsBuilder
ParameterType
Parameter
level
Type
ServerLevel

Name: build

Return Type: LootParams

ZenScript
Copy
LootParamsBuilder.build(params as LootContextParamSet) as LootParams
ParameterType
Parameter
params
Type
LootContextParamSet

Link to getOptionalParameter

Name: getOptionalParameter

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

ZenScript
Copy
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

Name: getParameter

Return Type: T

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

Name: withDynamicDrop

Return Type: LootParamsBuilder

ZenScript
Copy
LootParamsBuilder.withDynamicDrop(key as ResourceLocation, drop as DynamicDrop) as LootParamsBuilder
ParameterType
Parameter
key
Type
ResourceLocation
Parameter
drop
Type
DynamicDrop

Name: withLuck

Return Type: LootParamsBuilder

ZenScript
Copy
LootParamsBuilder.withLuck(luck as float) as LootParamsBuilder
ParameterType
Parameter
luck
Type
float

Link to withOptionalParameter

Name: withOptionalParameter

Return Type: LootParamsBuilder

ZenScript
Copy
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

Name: withParameter

Return Type: LootParamsBuilder

ZenScript
Copy
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
TypeHas GetterHas Setter
Type
ServerLevel
Has Getter
true
Has Setter
false