Class Xoroshiro128PlusPlusRandom

java.lang.Object
net.minecraft.util.math.random.Xoroshiro128PlusPlusRandom
All Implemented Interfaces:
Random

public class Xoroshiro128PlusPlusRandom extends Object implements Random
Xoroshiro128++ based pseudo random number generator.
Implementation Note:
The actual implementation can be found on Xoroshiro128PlusPlusRandomImpl.
Mappings:
Namespace Name
named net/minecraft/util/math/random/Xoroshiro128PlusPlusRandom
intermediary net/minecraft/class_6677
official dzw
  • Field Details

    • FLOAT_MULTIPLIER

      private static final float FLOAT_MULTIPLIER
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named FLOAT_MULTIPLIER Lnet/minecraft/util/math/random/Xoroshiro128PlusPlusRandom;FLOAT_MULTIPLIER:F
      intermediary field_35148 Lnet/minecraft/class_6677;field_35148:F
      official c Ldzw;c:F
    • DOUBLE_MULTIPLIER

      private static final double DOUBLE_MULTIPLIER
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named DOUBLE_MULTIPLIER Lnet/minecraft/util/math/random/Xoroshiro128PlusPlusRandom;DOUBLE_MULTIPLIER:D
      intermediary field_35149 Lnet/minecraft/class_6677;field_35149:D
      official d Ldzw;d:D
    • CODEC

      public static final com.mojang.serialization.Codec<Xoroshiro128PlusPlusRandom> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/util/math/random/Xoroshiro128PlusPlusRandom;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_44880 Lnet/minecraft/class_6677;field_44880:Lcom/mojang/serialization/Codec;
      official b Ldzw;b:Lcom/mojang/serialization/Codec;
    • implementation

      private Xoroshiro128PlusPlusRandomImpl implementation
      Mappings:
      Namespace Name Mixin selector
      named implementation Lnet/minecraft/util/math/random/Xoroshiro128PlusPlusRandom;implementation:Lnet/minecraft/util/math/random/Xoroshiro128PlusPlusRandomImpl;
      intermediary field_35150 Lnet/minecraft/class_6677;field_35150:Lnet/minecraft/class_6676;
      official e Ldzw;e:Ldzv;
    • gaussianGenerator

      private final GaussianGenerator gaussianGenerator
      Mappings:
      Namespace Name Mixin selector
      named gaussianGenerator Lnet/minecraft/util/math/random/Xoroshiro128PlusPlusRandom;gaussianGenerator:Lnet/minecraft/util/math/random/GaussianGenerator;
      intermediary field_35151 Lnet/minecraft/class_6677;field_35151:Lnet/minecraft/class_6672;
      official f Ldzw;f:Ldyx;
  • Constructor Details

    • Xoroshiro128PlusPlusRandom

      public Xoroshiro128PlusPlusRandom(long seed)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/util/math/random/Xoroshiro128PlusPlusRandom;<init>(J)V
      intermediary <init> Lnet/minecraft/class_6677;<init>(J)V
      official <init> Ldzw;<init>(J)V
    • Xoroshiro128PlusPlusRandom

      public Xoroshiro128PlusPlusRandom(RandomSeed.XoroshiroSeed seed)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/util/math/random/Xoroshiro128PlusPlusRandom;<init>(Lnet/minecraft/util/math/random/RandomSeed$XoroshiroSeed;)V
      intermediary <init> Lnet/minecraft/class_6677;<init>(Lnet/minecraft/class_6673$class_6674;)V
      official <init> Ldzw;<init>(Ldzk$a;)V
    • Xoroshiro128PlusPlusRandom

      public Xoroshiro128PlusPlusRandom(long seedLo, long seedHi)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/util/math/random/Xoroshiro128PlusPlusRandom;<init>(JJ)V
      intermediary <init> Lnet/minecraft/class_6677;<init>(JJ)V
      official <init> Ldzw;<init>(JJ)V
    • Xoroshiro128PlusPlusRandom

      private Xoroshiro128PlusPlusRandom(Xoroshiro128PlusPlusRandomImpl implementation)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/util/math/random/Xoroshiro128PlusPlusRandom;<init>(Lnet/minecraft/util/math/random/Xoroshiro128PlusPlusRandomImpl;)V
      intermediary <init> Lnet/minecraft/class_6677;<init>(Lnet/minecraft/class_6676;)V
      official <init> Ldzw;<init>(Ldzv;)V
  • Method Details

    • split

      public Random split()
      Specified by:
      split in interface Random
      Mappings:
      Namespace Name Mixin selector
      named split Lnet/minecraft/util/math/random/Random;split()Lnet/minecraft/util/math/random/Random;
      intermediary method_38420 Lnet/minecraft/class_5819;method_38420()Lnet/minecraft/class_5819;
      official d Layv;d()Layv;
    • nextSplitter

      public RandomSplitter nextSplitter()
      Specified by:
      nextSplitter in interface Random
      Mappings:
      Namespace Name Mixin selector
      named nextSplitter Lnet/minecraft/util/math/random/Random;nextSplitter()Lnet/minecraft/util/math/random/RandomSplitter;
      intermediary method_38421 Lnet/minecraft/class_5819;method_38421()Lnet/minecraft/class_6574;
      official e Layv;e()Ldzi;
    • setSeed

      public void setSeed(long seed)
      Specified by:
      setSeed in interface Random
      Mappings:
      Namespace Name Mixin selector
      named setSeed Lnet/minecraft/util/math/random/Random;setSeed(J)V
      intermediary method_43052 Lnet/minecraft/class_5819;method_43052(J)V
      official b Layv;b(J)V
    • nextInt

      public int nextInt()
      Specified by:
      nextInt in interface Random
      Mappings:
      Namespace Name Mixin selector
      named nextInt Lnet/minecraft/util/math/random/Random;nextInt()I
      intermediary method_43054 Lnet/minecraft/class_5819;method_43054()I
      official f Layv;f()I
    • nextInt

      public int nextInt(int bound)
      Specified by:
      nextInt in interface Random
      Mappings:
      Namespace Name Mixin selector
      named nextInt Lnet/minecraft/util/math/random/Random;nextInt(I)I
      intermediary method_43048 Lnet/minecraft/class_5819;method_43048(I)I
      official a Layv;a(I)I
    • nextLong

      public long nextLong()
      Specified by:
      nextLong in interface Random
      Mappings:
      Namespace Name Mixin selector
      named nextLong Lnet/minecraft/util/math/random/Random;nextLong()J
      intermediary method_43055 Lnet/minecraft/class_5819;method_43055()J
      official g Layv;g()J
    • nextBoolean

      public boolean nextBoolean()
      Specified by:
      nextBoolean in interface Random
      Mappings:
      Namespace Name Mixin selector
      named nextBoolean Lnet/minecraft/util/math/random/Random;nextBoolean()Z
      intermediary method_43056 Lnet/minecraft/class_5819;method_43056()Z
      official h Layv;h()Z
    • nextFloat

      public float nextFloat()
      Specified by:
      nextFloat in interface Random
      Mappings:
      Namespace Name Mixin selector
      named nextFloat Lnet/minecraft/util/math/random/Random;nextFloat()F
      intermediary method_43057 Lnet/minecraft/class_5819;method_43057()F
      official i Layv;i()F
    • nextDouble

      public double nextDouble()
      Specified by:
      nextDouble in interface Random
      Mappings:
      Namespace Name Mixin selector
      named nextDouble Lnet/minecraft/util/math/random/Random;nextDouble()D
      intermediary method_43058 Lnet/minecraft/class_5819;method_43058()D
      official j Layv;j()D
    • nextGaussian

      public double nextGaussian()
      Specified by:
      nextGaussian in interface Random
      Mappings:
      Namespace Name Mixin selector
      named nextGaussian Lnet/minecraft/util/math/random/Random;nextGaussian()D
      intermediary method_43059 Lnet/minecraft/class_5819;method_43059()D
      official k Layv;k()D
    • skip

      public void skip(int count)
      Specified by:
      skip in interface Random
      Mappings:
      Namespace Name Mixin selector
      named skip Lnet/minecraft/util/math/random/Random;skip(I)V
      intermediary method_33650 Lnet/minecraft/class_5819;method_33650(I)V
      official b Layv;b(I)V
    • next

      private long next(int bits)
      Returns bits upper bits of random value.
      Returns:
      bits upper bits of random value
      Implementation Note:
      In Xoroshiro128++, the lower bits have to be discarded in order to ensure proper randomness. For example, to obtain a double, the upper 53 bits should be used instead of the lower 53 bits.
      Mappings:
      Namespace Name Mixin selector
      named next Lnet/minecraft/util/math/random/Xoroshiro128PlusPlusRandom;next(I)J
      intermediary method_39008 Lnet/minecraft/class_6677;method_39008(I)J
      official c Ldzw;c(I)J