Package org.cloudburstmc.server.math
Class BedrockRandom
java.lang.Object
java.util.Random
net.daporkchop.lib.random.impl.AbstractFastPRandom
org.cloudburstmc.server.math.BedrockRandom
- All Implemented Interfaces:
Serializable,net.daporkchop.lib.random.PRandom
public class BedrockRandom
extends net.daporkchop.lib.random.impl.AbstractFastPRandom
Bedrock-style PRNG.
Warning: very slow!
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class net.daporkchop.lib.random.impl.AbstractFastPRandom
DOUBLE_UNIT, FLOAT_UNIT, nextGaussian -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class net.daporkchop.lib.random.impl.AbstractFastPRandom
asJava, next, next, nextBoolean, nextByte, nextBytes, nextBytes, nextBytes32, nextBytes32Fast, nextBytes64, nextBytes64Fast, nextDouble, nextDouble, nextDouble, nextFloat, nextFloat, nextFloat, nextGaussian, nextGaussianDouble, nextGaussianFloat, nextInt, nextInt, nextLong, nextLong, nextShort, nextUnsignedInt, nextUnsignedLongMethods inherited from class java.util.Random
doubles, doubles, doubles, doubles, ints, ints, ints, ints, longs, longs, longs, longsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.daporkchop.lib.random.PRandom
shuffle, shuffle, shuffle, shuffle, shuffle, shuffle, shuffle, shuffle, shuffle, shuffle, shuffle, shuffle, shuffle, shuffle, shuffle, shuffle
-
Constructor Details
-
BedrockRandom
public BedrockRandom() -
BedrockRandom
public BedrockRandom(int seed)
-
-
Method Details
-
getThreadLocal
-
getSeed
public int getSeed() -
setSeed
public void setSeed(int seed) -
setSeed
public void setSeed(long seed) -
nextInt
public int nextInt()- Specified by:
nextIntin interfacenet.daporkchop.lib.random.PRandom- Specified by:
nextIntin classnet.daporkchop.lib.random.impl.AbstractFastPRandom
-
nextLong
public long nextLong()- Specified by:
nextLongin interfacenet.daporkchop.lib.random.PRandom- Specified by:
nextLongin classnet.daporkchop.lib.random.impl.AbstractFastPRandom
-
nextVector3
public com.nukkitx.math.vector.Vector3f nextVector3() -
nextGaussianVector3
public com.nukkitx.math.vector.Vector3f nextGaussianVector3()
-