Interface EntityNumberProvider

All Superinterfaces:
net.minecraft.world.level.storage.loot.LootContextUser
All Known Implementing Classes:
AnimalMoodEntityNumberProvider, AttributeEntityNumberProvider, EntityEffectDurationNumberProvider, EntityPredicateNumberProvider, EquipmentNumberProvider, ExperienceLevelNumberProvider, FlatEntityNumberProvider, HealthEntityNumberProvider

@ParametersAreNonnullByDefault public interface EntityNumberProvider extends net.minecraft.world.level.storage.loot.LootContextUser
Entity-specific version of NumberProvider.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<EntityNumberProvider>
     
    static final com.mojang.serialization.Codec<EntityNumberProvider>
    Use CODEC instead.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    Get the approximate bounds for the output of this EntityNumberProvider on a best-effort basis.
    float
    getFloat(net.minecraft.world.entity.Entity entity, net.minecraft.world.level.storage.loot.LootContext lootContext)
     
    default int
    getInt(net.minecraft.world.entity.Entity entity, net.minecraft.world.level.storage.loot.LootContext lootContext)
     
    default float
    getMaxFloat(net.minecraft.world.entity.Entity entity, net.minecraft.world.level.storage.loot.LootContext context)
     

    Methods inherited from interface net.minecraft.world.level.storage.loot.LootContextUser

    getReferencedContextParams, validate
  • Field Details

  • Method Details

    • getFloat

      float getFloat(net.minecraft.world.entity.Entity entity, net.minecraft.world.level.storage.loot.LootContext lootContext)
    • getInt

      default int getInt(net.minecraft.world.entity.Entity entity, net.minecraft.world.level.storage.loot.LootContext lootContext)
    • getEstimate

      NumberEstimate getEstimate()
      Get the approximate bounds for the output of this EntityNumberProvider on a best-effort basis.
      See Also:
    • getMaxFloat

      @Experimental default float getMaxFloat(net.minecraft.world.entity.Entity entity, net.minecraft.world.level.storage.loot.LootContext context)
    • getEntityNumberProviderType

      LootEntityNumberProviderType getEntityNumberProviderType()