Interface AbstractRandom

All Known Subinterfaces:
BaseSimpleRandom
All Known Implementing Classes:
AtomicSimpleRandom, BlockingSimpleRandom, ChunkRandom, SimpleRandom, Xoroshiro128PlusPlusRandom

public interface AbstractRandom
A reimplementation of Random.

There are four built-in implementations, three based on the classic Java algorithm and one using Xoroshiro128++ algorithm.

  • SimpleRandom: Silently breaks when used concurrently. Based on Random.
  • AtomicSimpleRandom: Throws when used concurrently. Based on Random.
  • BlockingSimpleRandom: Blocks the thread when used concurrently.. Based on Random.
  • invalid @link
    Xoroshiro128PlusPlusRandom
    : Silently breaks when used concurrently. Implements the Xoroshiro128++ algorithm.
Implementation Note:
Note that due to MC-239059, this is not an exact reimplementation of the Java random number generator algorithm.
Mappings:
Namespace Name
official akt
intermediary net/minecraft/class_5819
named net/minecraft/util/math/random/AbstractRandom
  • Field Details

    • field_38930

      @Deprecated static final double field_38930
      Deprecated.
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lakt;a:D
      intermediary field_38930 Lnet/minecraft/class_5819;field_38930:D
      named field_38930 Lnet/minecraft/util/math/random/AbstractRandom;field_38930:D
  • Method Details

    • createAtomic

      static AbstractRandom createAtomic()
      Mappings:
      Namespace Name Mixin selector
      official a Lakt;a()Lakt;
      intermediary method_43047 Lnet/minecraft/class_5819;method_43047()Lnet/minecraft/class_5819;
      named createAtomic Lnet/minecraft/util/math/random/AbstractRandom;createAtomic()Lnet/minecraft/util/math/random/AbstractRandom;
    • createBlocking

      @Deprecated static AbstractRandom createBlocking()
      Deprecated.
      Mappings:
      Namespace Name Mixin selector
      official b Lakt;b()Lakt;
      intermediary method_43050 Lnet/minecraft/class_5819;method_43050()Lnet/minecraft/class_5819;
      named createBlocking Lnet/minecraft/util/math/random/AbstractRandom;createBlocking()Lnet/minecraft/util/math/random/AbstractRandom;
    • createAtomic

      static AbstractRandom createAtomic(long seed)
      Mappings:
      Namespace Name Mixin selector
      official a Lakt;a(J)Lakt;
      intermediary method_43049 Lnet/minecraft/class_5819;method_43049(J)Lnet/minecraft/class_5819;
      named createAtomic Lnet/minecraft/util/math/random/AbstractRandom;createAtomic(J)Lnet/minecraft/util/math/random/AbstractRandom;
    • create

      static AbstractRandom create()
      Mappings:
      Namespace Name Mixin selector
      official c Lakt;c()Lakt;
      intermediary method_43053 Lnet/minecraft/class_5819;method_43053()Lnet/minecraft/class_5819;
      named create Lnet/minecraft/util/math/random/AbstractRandom;create()Lnet/minecraft/util/math/random/AbstractRandom;
    • derive

      AbstractRandom derive()
      Mappings:
      Namespace Name Mixin selector
      official d Lakt;d()Lakt;
      intermediary method_38420 Lnet/minecraft/class_5819;method_38420()Lnet/minecraft/class_5819;
      named derive Lnet/minecraft/util/math/random/AbstractRandom;derive()Lnet/minecraft/util/math/random/AbstractRandom;
    • createRandomDeriver

      RandomDeriver createRandomDeriver()
      Mappings:
      Namespace Name Mixin selector
      official e Lakt;e()Lcyn;
      intermediary method_38421 Lnet/minecraft/class_5819;method_38421()Lnet/minecraft/class_6574;
      named createRandomDeriver Lnet/minecraft/util/math/random/AbstractRandom;createRandomDeriver()Lnet/minecraft/util/math/random/RandomDeriver;
    • setSeed

      void setSeed(long seed)
      Mappings:
      Namespace Name Mixin selector
      official b Lakt;b(J)V
      intermediary method_43052 Lnet/minecraft/class_5819;method_43052(J)V
      named setSeed Lnet/minecraft/util/math/random/AbstractRandom;setSeed(J)V
    • nextInt

      int nextInt()
      Mappings:
      Namespace Name Mixin selector
      official f Lakt;f()I
      intermediary method_43054 Lnet/minecraft/class_5819;method_43054()I
      named nextInt Lnet/minecraft/util/math/random/AbstractRandom;nextInt()I
    • nextInt

      int nextInt(int bound)
      Mappings:
      Namespace Name Mixin selector
      official a Lakt;a(I)I
      intermediary method_43048 Lnet/minecraft/class_5819;method_43048(I)I
      named nextInt Lnet/minecraft/util/math/random/AbstractRandom;nextInt(I)I
    • nextBetween

      default int nextBetween(int min, int max)
      Mappings:
      Namespace Name Mixin selector
      official a Lakt;a(II)I
      intermediary method_39332 Lnet/minecraft/class_5819;method_39332(II)I
      named nextBetween Lnet/minecraft/util/math/random/AbstractRandom;nextBetween(II)I
    • nextLong

      long nextLong()
      Mappings:
      Namespace Name Mixin selector
      official g Lakt;g()J
      intermediary method_43055 Lnet/minecraft/class_5819;method_43055()J
      named nextLong Lnet/minecraft/util/math/random/AbstractRandom;nextLong()J
    • nextBoolean

      boolean nextBoolean()
      Mappings:
      Namespace Name Mixin selector
      official h Lakt;h()Z
      intermediary method_43056 Lnet/minecraft/class_5819;method_43056()Z
      named nextBoolean Lnet/minecraft/util/math/random/AbstractRandom;nextBoolean()Z
    • nextFloat

      float nextFloat()
      Mappings:
      Namespace Name Mixin selector
      official i Lakt;i()F
      intermediary method_43057 Lnet/minecraft/class_5819;method_43057()F
      named nextFloat Lnet/minecraft/util/math/random/AbstractRandom;nextFloat()F
    • nextDouble

      double nextDouble()
      Mappings:
      Namespace Name Mixin selector
      official j Lakt;j()D
      intermediary method_43058 Lnet/minecraft/class_5819;method_43058()D
      named nextDouble Lnet/minecraft/util/math/random/AbstractRandom;nextDouble()D
    • nextGaussian

      double nextGaussian()
      Mappings:
      Namespace Name Mixin selector
      official k Lakt;k()D
      intermediary method_43059 Lnet/minecraft/class_5819;method_43059()D
      named nextGaussian Lnet/minecraft/util/math/random/AbstractRandom;nextGaussian()D
    • nextPredictable

      default double nextPredictable(double base, double variance)
      Mappings:
      Namespace Name Mixin selector
      official a Lakt;a(DD)D
      intermediary method_43385 Lnet/minecraft/class_5819;method_43385(DD)D
      named nextPredictable Lnet/minecraft/util/math/random/AbstractRandom;nextPredictable(DD)D
    • skip

      default void skip(int count)
      Mappings:
      Namespace Name Mixin selector
      official b Lakt;b(I)V
      intermediary method_33650 Lnet/minecraft/class_5819;method_33650(I)V
      named skip Lnet/minecraft/util/math/random/AbstractRandom;skip(I)V
    • nextBetweenExclusive

      default int nextBetweenExclusive(int min, int max)
      Mappings:
      Namespace Name Mixin selector
      official b Lakt;b(II)I
      intermediary method_43051 Lnet/minecraft/class_5819;method_43051(II)I
      named nextBetweenExclusive Lnet/minecraft/util/math/random/AbstractRandom;nextBetweenExclusive(II)I