Package net.minecraft.util.math.random
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 onRandom.AtomicSimpleRandom: Throws when used concurrently. Based onRandom.BlockingSimpleRandom: Blocks the thread when used concurrently.. Based onRandom.-
: Silently breaks when used concurrently. Implements the Xoroshiro128++ algorithm.
invalid @link
Xoroshiro128PlusPlusRandom
- 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 alfintermediary net/minecraft/class_5819named net/minecraft/util/math/random/AbstractRandom
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic AbstractRandomcreate()static AbstractRandomstatic AbstractRandomcreateAtomic(long seed) static AbstractRandomDeprecated.derive()default intnextBetween(int min, int max) default intnextBetweenExclusive(int min, int max) booleandoublefloatdoubleintnextInt()intnextInt(int bound) longnextLong()default doublenextPredictable(double base, double variance) voidsetSeed(long seed) default voidskip(int count)
-
Field Details
-
field_38930
Deprecated.- See Also:
- Mappings:
Namespace Name Mixin selector official aLalf;a:Dintermediary field_38930Lnet/minecraft/class_5819;field_38930:Dnamed field_38930Lnet/minecraft/util/math/random/AbstractRandom;field_38930:D
-
-
Method Details
-
createAtomic
- Mappings:
Namespace Name Mixin selector official aLalf;a()Lalf;intermediary method_43047Lnet/minecraft/class_5819;method_43047()Lnet/minecraft/class_5819;named createAtomicLnet/minecraft/util/math/random/AbstractRandom;createAtomic()Lnet/minecraft/util/math/random/AbstractRandom;
-
createBlocking
Deprecated.- Mappings:
Namespace Name Mixin selector official bLalf;b()Lalf;intermediary method_43050Lnet/minecraft/class_5819;method_43050()Lnet/minecraft/class_5819;named createBlockingLnet/minecraft/util/math/random/AbstractRandom;createBlocking()Lnet/minecraft/util/math/random/AbstractRandom;
-
createAtomic
- Mappings:
Namespace Name Mixin selector official aLalf;a(J)Lalf;intermediary method_43049Lnet/minecraft/class_5819;method_43049(J)Lnet/minecraft/class_5819;named createAtomicLnet/minecraft/util/math/random/AbstractRandom;createAtomic(J)Lnet/minecraft/util/math/random/AbstractRandom;
-
create
- Mappings:
Namespace Name Mixin selector official cLalf;c()Lalf;intermediary method_43053Lnet/minecraft/class_5819;method_43053()Lnet/minecraft/class_5819;named createLnet/minecraft/util/math/random/AbstractRandom;create()Lnet/minecraft/util/math/random/AbstractRandom;
-
derive
AbstractRandom derive()- Mappings:
Namespace Name Mixin selector official dLalf;d()Lalf;intermediary method_38420Lnet/minecraft/class_5819;method_38420()Lnet/minecraft/class_5819;named deriveLnet/minecraft/util/math/random/AbstractRandom;derive()Lnet/minecraft/util/math/random/AbstractRandom;
-
createRandomDeriver
RandomDeriver createRandomDeriver()- Mappings:
Namespace Name Mixin selector official eLalf;e()Lczd;intermediary method_38421Lnet/minecraft/class_5819;method_38421()Lnet/minecraft/class_6574;named createRandomDeriverLnet/minecraft/util/math/random/AbstractRandom;createRandomDeriver()Lnet/minecraft/util/math/random/RandomDeriver;
-
setSeed
void setSeed(long seed) - Mappings:
Namespace Name Mixin selector official bLalf;b(J)Vintermediary method_43052Lnet/minecraft/class_5819;method_43052(J)Vnamed setSeedLnet/minecraft/util/math/random/AbstractRandom;setSeed(J)V
-
nextInt
int nextInt()- Mappings:
Namespace Name Mixin selector official fLalf;f()Iintermediary method_43054Lnet/minecraft/class_5819;method_43054()Inamed nextIntLnet/minecraft/util/math/random/AbstractRandom;nextInt()I
-
nextInt
int nextInt(int bound) - Mappings:
Namespace Name Mixin selector official aLalf;a(I)Iintermediary method_43048Lnet/minecraft/class_5819;method_43048(I)Inamed nextIntLnet/minecraft/util/math/random/AbstractRandom;nextInt(I)I
-
nextBetween
default int nextBetween(int min, int max) - Mappings:
Namespace Name Mixin selector official aLalf;a(II)Iintermediary method_39332Lnet/minecraft/class_5819;method_39332(II)Inamed nextBetweenLnet/minecraft/util/math/random/AbstractRandom;nextBetween(II)I
-
nextLong
long nextLong()- Mappings:
Namespace Name Mixin selector official gLalf;g()Jintermediary method_43055Lnet/minecraft/class_5819;method_43055()Jnamed nextLongLnet/minecraft/util/math/random/AbstractRandom;nextLong()J
-
nextBoolean
boolean nextBoolean()- Mappings:
Namespace Name Mixin selector official hLalf;h()Zintermediary method_43056Lnet/minecraft/class_5819;method_43056()Znamed nextBooleanLnet/minecraft/util/math/random/AbstractRandom;nextBoolean()Z
-
nextFloat
float nextFloat()- Mappings:
Namespace Name Mixin selector official iLalf;i()Fintermediary method_43057Lnet/minecraft/class_5819;method_43057()Fnamed nextFloatLnet/minecraft/util/math/random/AbstractRandom;nextFloat()F
-
nextDouble
double nextDouble()- Mappings:
Namespace Name Mixin selector official jLalf;j()Dintermediary method_43058Lnet/minecraft/class_5819;method_43058()Dnamed nextDoubleLnet/minecraft/util/math/random/AbstractRandom;nextDouble()D
-
nextGaussian
double nextGaussian()- Mappings:
Namespace Name Mixin selector official kLalf;k()Dintermediary method_43059Lnet/minecraft/class_5819;method_43059()Dnamed nextGaussianLnet/minecraft/util/math/random/AbstractRandom;nextGaussian()D
-
nextPredictable
default double nextPredictable(double base, double variance) - Mappings:
Namespace Name Mixin selector official aLalf;a(DD)Dintermediary method_43385Lnet/minecraft/class_5819;method_43385(DD)Dnamed nextPredictableLnet/minecraft/util/math/random/AbstractRandom;nextPredictable(DD)D
-
skip
default void skip(int count) - Mappings:
Namespace Name Mixin selector official bLalf;b(I)Vintermediary method_33650Lnet/minecraft/class_5819;method_33650(I)Vnamed skipLnet/minecraft/util/math/random/AbstractRandom;skip(I)V
-
nextBetweenExclusive
default int nextBetweenExclusive(int min, int max) - Mappings:
Namespace Name Mixin selector official bLalf;b(II)Iintermediary method_43051Lnet/minecraft/class_5819;method_43051(II)Inamed nextBetweenExclusiveLnet/minecraft/util/math/random/AbstractRandom;nextBetweenExclusive(II)I
-