Class LootContext


  • public final class LootContext
    extends Object
    Represents additional information a LootTable can use to modify it's generated loot.
    • Field Detail

    • Method Detail

      • getLocation

        @NotNull
        public Location getLocation()
        The Location to store where the loot will be generated.
        Returns:
        the Location of where the loot will be generated
      • getLuck

        public float getLuck()
        Represents the PotionEffectType.LUCK that an entity can have. The higher the value the better chance of receiving more loot.
        Returns:
        luck
      • getLootedEntity

        @Nullable
        public Entity getLootedEntity()
        Get the Entity that was killed. Can be null.
        Returns:
        the looted entity or null