LootParams
Link to lootparams
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.LootParams;
Methods
Link to methods
Name: addDynamicDrops
ZenScript CopyLootParams.addDynamicDrops(key as ResourceLocation, drop as Consumer<ItemStack>)
Parameter | Type |
---|---|
Parameter key | Type ResourceLocation |
Parameter drop | Type Consumer<ItemStack> |
Name: getOptionalParameter
Return Type: @org.openzen.zencode.java.ZenCodeType.Nullable T
ZenScript CopyLootParams.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: getParamOrNull
Return Type: @org.openzen.zencode.java.ZenCodeType.Nullable T
ZenScript CopyLootParams.getParamOrNull<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 CopyLootParams.getParameter<T : Object>(param as LootContextParam<T>) as T
Parameter | Type |
---|---|
Parameter param | Type LootContextParam<T> |
Parameter T | Type Object |
Name: hasParam
Return Type: boolean
ZenScript CopyLootParams.hasParam<T : Object>(param as LootContextParam<T>) as boolean
Parameter | Type |
---|---|
Parameter param | Type LootContextParam<T> |
Parameter T | Type Object |
Properties
Link to properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name level | Type ServerLevel | Has Getter true | Has Setter false |
Name luck | Type float | Has Getter true | Has Setter false |