Class CustomerWaitTimeNumberProvider

java.lang.Object
com.petrolpark.core.data.loot.numberprovider.CustomerWaitTimeNumberProvider
All Implemented Interfaces:
IEstimableNumberProvider, net.minecraft.world.level.storage.loot.LootContextUser, net.minecraft.world.level.storage.loot.providers.number.NumberProvider

public class CustomerWaitTimeNumberProvider extends Object implements IEstimableNumberProvider

petrolpark:customer_wait_time

Get the amount of time the ICustomer provided in the LootContext has been waiting for their order, or 1 if they are not a waiting ICustomer. No arguments.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    A rough estimate for the output of this Number Provider, for display purposes only.
    float
    getFloat(net.minecraft.world.level.storage.loot.LootContext context)
     
    float
    getMaxFloat(net.minecraft.world.level.storage.loot.LootContext context)
    The maximum possible value this Number Provider can give, ignoring any randomness.
    Set<net.minecraft.world.level.storage.loot.parameters.LootContextParam<?>>
     
    net.minecraft.world.level.storage.loot.providers.number.LootNumberProviderType
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

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

    validate

    Methods inherited from interface net.minecraft.world.level.storage.loot.providers.number.NumberProvider

    getInt
  • Constructor Details

    • CustomerWaitTimeNumberProvider

      public CustomerWaitTimeNumberProvider()
  • Method Details

    • getFloat

      public float getFloat(@Nonnull net.minecraft.world.level.storage.loot.LootContext context)
      Specified by:
      getFloat in interface net.minecraft.world.level.storage.loot.providers.number.NumberProvider
    • getEstimate

      public NumberEstimate getEstimate()
      Description copied from interface: IEstimableNumberProvider
      A rough estimate for the output of this Number Provider, for display purposes only.
      Specified by:
      getEstimate in interface IEstimableNumberProvider
    • getMaxFloat

      public float getMaxFloat(net.minecraft.world.level.storage.loot.LootContext context)
      Description copied from interface: IEstimableNumberProvider
      The maximum possible value this Number Provider can give, ignoring any randomness.
      Specified by:
      getMaxFloat in interface IEstimableNumberProvider
    • getType

      public net.minecraft.world.level.storage.loot.providers.number.LootNumberProviderType getType()
      Specified by:
      getType in interface net.minecraft.world.level.storage.loot.providers.number.NumberProvider
    • getReferencedContextParams

      public Set<net.minecraft.world.level.storage.loot.parameters.LootContextParam<?>> getReferencedContextParams()
      Specified by:
      getReferencedContextParams in interface net.minecraft.world.level.storage.loot.LootContextUser