Class BasicFetchRateLimiter

java.lang.Object
net.minecraft.client.realms.gui.BasicFetchRateLimiter
All Implemented Interfaces:
FetchRateLimiter

@Environment(CLIENT) public class BasicFetchRateLimiter extends Object implements FetchRateLimiter
An operational rate limiter.
Mappings:
Namespace Name
official edc
intermediary net/minecraft/class_5782
named net/minecraft/client/realms/gui/BasicFetchRateLimiter
  • Field Details

    • period

      private final Duration period
      Mappings:
      Namespace Name Mixin selector
      official a Ledc;a:Ljava/time/Duration;
      intermediary field_28449 Lnet/minecraft/class_5782;field_28449:Ljava/time/Duration;
      named period Lnet/minecraft/client/realms/gui/BasicFetchRateLimiter;period:Ljava/time/Duration;
    • clock

      private final Supplier<Clock> clock
      Mappings:
      Namespace Name Mixin selector
      official b Ledc;b:Ljava/util/function/Supplier;
      intermediary field_28450 Lnet/minecraft/class_5782;field_28450:Ljava/util/function/Supplier;
      named clock Lnet/minecraft/client/realms/gui/BasicFetchRateLimiter;clock:Ljava/util/function/Supplier;
    • lastRun

      @Nullable private @Nullable Instant lastRun
      Mappings:
      Namespace Name Mixin selector
      official c Ledc;c:Ljava/time/Instant;
      intermediary field_28451 Lnet/minecraft/class_5782;field_28451:Ljava/time/Instant;
      named lastRun Lnet/minecraft/client/realms/gui/BasicFetchRateLimiter;lastRun:Ljava/time/Instant;
  • Constructor Details

    • BasicFetchRateLimiter

      public BasicFetchRateLimiter(Duration period)
      Mappings:
      Namespace Name Mixin selector
      official <init> Ledc;<init>(Ljava/time/Duration;)V
      intermediary <init> Lnet/minecraft/class_5782;<init>(Ljava/time/Duration;)V
      named <init> Lnet/minecraft/client/realms/gui/BasicFetchRateLimiter;<init>(Ljava/time/Duration;)V
    • BasicFetchRateLimiter

      protected BasicFetchRateLimiter(Duration period, Supplier<Clock> clock)
      Mappings:
      Namespace Name Mixin selector
      official <init> Ledc;<init>(Ljava/time/Duration;Ljava/util/function/Supplier;)V
      intermediary <init> Lnet/minecraft/class_5782;<init>(Ljava/time/Duration;Ljava/util/function/Supplier;)V
      named <init> Lnet/minecraft/client/realms/gui/BasicFetchRateLimiter;<init>(Ljava/time/Duration;Ljava/util/function/Supplier;)V
  • Method Details

    • onRun

      public void onRun()
      Notifies the tracker that the tracked task is run.
      Specified by:
      onRun in interface FetchRateLimiter
      Mappings:
      Namespace Name Mixin selector
      official a Ledf;a()V
      intermediary method_33421 Lnet/minecraft/class_5785;method_33421()V
      named onRun Lnet/minecraft/client/realms/gui/FetchRateLimiter;onRun()V
    • getRemainingPeriod

      public long getRemainingPeriod()
      Returns the time left before the next scheduled run of the tracked task.
      Specified by:
      getRemainingPeriod in interface FetchRateLimiter
      Returns:
      the time left before the next scheduled run of the tracked task
      Mappings:
      Namespace Name Mixin selector
      official b Ledf;b()J
      intermediary method_33422 Lnet/minecraft/class_5785;method_33422()J
      named getRemainingPeriod Lnet/minecraft/client/realms/gui/FetchRateLimiter;getRemainingPeriod()J