LootContext

Holds all information that may be obtainable from a loot table roll, allowing for identifying key information.

Not all parameters are present at all times, for obvious reasons. For example, information related to an entity will not be available if the loot table being rolled is the one for a block.

Diese Klasse importieren

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.

import crafttweaker.api.loot.LootContext;

Properties

NameTypeHas GetterHas Setter
blockStateMCBlockState?truefalse
damageSourceDamageSource?truefalse
directKillerEntityMCEntity?truefalse
explosionRadiusfloattruefalse
killerEntityMCEntity?truefalse
lastDamagePlayerMCPlayerEntity?truefalse
lootTableIdMCResource-Standorttruefalse
lootingModifierinttruefalse
luckfloattruefalse
originMCVector3d?truefalse
thisEntityMCEntity?truefalse
tileEntityMCTileEntity?truefalse
toolIItemStacktruefalse
worldMCWorld?truefalse