Home Commands Examples Getting Started With Scripts Global Keywords
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

LootContext

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.

script.zs
import crafttweaker.api.loot.LootContext;

Members

Getter
script.zs
// LootContext.blockEntity as BlockEntity
myLootContext.blockEntity

Return Type: BlockEntity

Getter
script.zs
// LootContext.blockState as BlockState
myLootContext.blockState

Return Type: BlockState

Getter
script.zs
// LootContext.damageSource as DamageSource
myLootContext.damageSource

Return Type: DamageSource

Getter
script.zs
// LootContext.directKillerEntity as Entity
myLootContext.directKillerEntity

Return Type: Entity

Getter
script.zs
// LootContext.explosionRadius as float
myLootContext.explosionRadius

Return Type: float

Getter
script.zs
// LootContext.killerEntity as Entity
myLootContext.killerEntity

Return Type: Entity

Getter
script.zs
// LootContext.lastDamagePlayer as Player
myLootContext.lastDamagePlayer

Return Type: Player

Getter
script.zs
// LootContext.level as ServerLevel
myLootContext.level

Return Type: ServerLevel

Getter
script.zs
// LootContext.luck as float
myLootContext.luck

Return Type: float

Getter
script.zs
// LootContext.origin as Vec3
myLootContext.origin

Return Type: Vec3

Getter
script.zs
// LootContext.random as RandomSource
myLootContext.random

Return Type: RandomSource

Getter
script.zs
// LootContext.thisEntity as Entity
myLootContext.thisEntity

Return Type: Entity

Getter
script.zs
// LootContext.tool as IItemStack
myLootContext.tool

Return Type: IItemStack