public class LootContext
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
LootContext.Builder |
static class |
LootContext.EntityTarget |
Modifier and Type | Field and Description |
---|---|
private DamageSource |
damageSource |
private Entity |
lootedEntity |
private LootTableManager |
lootTableManager |
private java.util.Set<LootTable> |
lootTables |
private float |
luck |
private EntityPlayer |
player |
private WorldServer |
world |
Constructor and Description |
---|
LootContext(float luckIn,
WorldServer worldIn,
LootTableManager lootTableManagerIn,
Entity lootedEntityIn,
EntityPlayer playerIn,
DamageSource damageSourceIn) |
Modifier and Type | Method and Description |
---|---|
boolean |
addLootTable(LootTable lootTableIn) |
Entity |
getEntity(LootContext.EntityTarget target) |
Entity |
getKiller() |
Entity |
getKillerPlayer() |
Entity |
getLootedEntity() |
int |
getLootingModifier() |
LootTableManager |
getLootTableManager() |
float |
getLuck() |
WorldServer |
getWorld() |
void |
removeLootTable(LootTable lootTableIn) |
private final float luck
private final WorldServer world
private final LootTableManager lootTableManager
@Nullable private final Entity lootedEntity
@Nullable private final EntityPlayer player
@Nullable private final DamageSource damageSource
private final java.util.Set<LootTable> lootTables
public LootContext(float luckIn, WorldServer worldIn, LootTableManager lootTableManagerIn, @Nullable Entity lootedEntityIn, @Nullable EntityPlayer playerIn, @Nullable DamageSource damageSourceIn)
@Nullable public Entity getLootedEntity()
@Nullable public Entity getKillerPlayer()
@Nullable public Entity getKiller()
public boolean addLootTable(LootTable lootTableIn)
public void removeLootTable(LootTable lootTableIn)
public LootTableManager getLootTableManager()
public float getLuck()
@Nullable public Entity getEntity(LootContext.EntityTarget target)
public WorldServer getWorld()
public int getLootingModifier()