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 Copyimport crafttweaker.api.loot.LootParamsBuilder;
Static Methods
Link to static-methods
Name: create
Return Type: LootParamsBuilder
ZenScript CopyLootParamsBuilder.create(level as ServerLevel) as LootParamsBuilder
Parameter | Type |
---|---|
Parameter level | Type ServerLevel |
Methods
Link to methods
Name: build
Return Type: LootParams
ZenScript CopyLootParamsBuilder.build(params as LootContextParamSet) as LootParams
Parameter | Type |
---|---|
Parameter params | Type LootContextParamSet |
Name: getOptionalParameter
Return Type: @org.openzen.zencode.java.ZenCodeType.Nullable T
ZenScript CopyLootParamsBuilder.getOptionalParameter<T : Object>(param as LootContextParam<T>) as @org.openzen.zencode.java.ZenCodeType.Nullable T
Parameter | Type |
---|---|
Parameter param | Type LootContextParam<T> |
Parameter T | Type Object |
Name: getParameter
Return Type: T
ZenScript CopyLootParamsBuilder.getParameter<T : Object>(param as LootContextParam<T>) as T
Parameter | Type |
---|---|
Parameter param | Type LootContextParam<T> |
Parameter T | Type Object |
Name: withDynamicDrop
Return Type: LootParamsBuilder
ZenScript CopyLootParamsBuilder.withDynamicDrop(key as ResourceLocation, drop as DynamicDrop) as LootParamsBuilder
Parameter | Type |
---|---|
Parameter key | Type ResourceLocation |
Parameter drop | Type DynamicDrop |
Name: withLuck
Return Type: LootParamsBuilder
ZenScript CopyLootParamsBuilder.withLuck(luck as float) as LootParamsBuilder
Parameter | Type |
---|---|
Parameter luck | Type float |
Name: withOptionalParameter
Return Type: LootParamsBuilder
ZenScript CopyLootParamsBuilder.withOptionalParameter<T : Object>(param as LootContextParam<T>, value as @org.openzen.zencode.java.ZenCodeType.Nullable T) as LootParamsBuilder
Parameter | Type |
---|---|
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 CopyLootParamsBuilder.withParameter<T : Object>(param as LootContextParam<T>, value as T) as LootParamsBuilder
Parameter | Type |
---|---|
Parameter param | Type LootContextParam<T> |
Parameter value | Type T |
Parameter T | Type Object |
Properties
Link to properties
Type | Has Getter | Has Setter |
---|---|---|
Type ServerLevel | Has Getter true | Has Setter false |