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.LootContext;
名称类型可获得可设置描述
名称
blockEntity
类型
BlockEntity
可获得
true
可设置
false
描述
No Description Provided
名称
blockState
类型
BlockState
可获得
true
可设置
false
描述
No Description Provided
名称
damageSource
类型
DamageSource
可获得
true
可设置
false
描述
No Description Provided
名称
directKillerEntity
类型
Entity
可获得
true
可设置
false
描述
No Description Provided
名称
explosionRadius
类型
float
可获得
true
可设置
false
描述
No Description Provided
名称
killerEntity
类型
Entity
可获得
true
可设置
false
描述
No Description Provided
名称
lastDamagePlayer
类型
Player
可获得
true
可设置
false
描述
No Description Provided
名称
level
类型
ServerLevel
可获得
true
可设置
false
描述
No Description Provided
名称
luck
类型
float
可获得
true
可设置
false
描述
No Description Provided
名称
origin
类型
Vec3
可获得
true
可设置
false
描述
No Description Provided
名称
random
类型
Random
可获得
true
可设置
false
描述
No Description Provided
名称
thisEntity
类型
Entity
可获得
true
可设置
false
描述
No Description Provided
名称
tool
类型
IItemstack
可获得
true
可设置
false
描述
No Description Provided