public class LootContext
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
LootContext.Builder |
static class |
LootContext.EntityTarget |
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() |
LootTableManager |
getLootTableManager() |
float |
getLuck() |
void |
removeLootTable(LootTable lootTableIn) |
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)