LootParamsBuilder
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
import crafttweaker.api.loot.LootParamsBuilder;Members
build(params as LootContextParamSet) as LootParams
myBuilder.build(myLootContextParamSet);Parameters:
params: LootContextParamSet Type: LootContextParamSet
Return Type:
LootParams
static create(level as ServerLevel) as Builder
LootParamsBuilder.create(myServerLevel);Parameters:
level: ServerLevel Type: ServerLevel
Return Type:
LootParamsBuilder
getOptionalParameter(param as LootContextParam<T>) as T?
myBuilder.getOptionalParameter<T>(myLootContextParam);Parameters:
param: LootContextParam<T> Type: LootContextParam<T>
Return Type:
T?
getParameter(param as LootContextParam<T>) as T
myBuilder.getParameter<T>(myLootContextParam);Parameters:
param: LootContextParam<T> Type: LootContextParam<T>
Return Type:
T
Getter
// Builder.level as ServerLevelmyBuilder.level
Return Type:
ServerLevel
withDynamicDrop(key as ResourceLocation, drop as DynamicDrop) as Builder
myBuilder.withDynamicDrop(myResourceLocation, myDynamicDrop);Parameters:
key: ResourceLocation Type: ResourceLocation drop: DynamicDrop Type: DynamicDrop
Return Type:
LootParamsBuilder
withLuck(luck as float) as Builder
myBuilder.withLuck(myFloat);Parameters:
luck: float Type: float
Return Type:
LootParamsBuilder
withOptionalParameter(param as LootContextParam<T>, value as T?) as Builder
// Builder.withOptionalParameter<T>(param as LootContextParam<T>, value as T?) as LootParamsBuilder;myBuilder.withOptionalParameter<T>(myLootContextParam, myT);Parameters:
param: LootContextParam<T> Type: LootContextParam<T> value: T? Type: T?
Return Type:
LootParamsBuilder
withParameter(param as LootContextParam<T>, value as T) as Builder
myBuilder.withParameter<T>(myLootContextParam, myT);Parameters:
param: LootContextParam<T> Type: LootContextParam<T> value: T Type: T
Return Type:
LootParamsBuilder