Class ChunkRandom
- All Implemented Interfaces:
BaseRandom,Random
- Mappings:
Namespace Name named net/minecraft/util/math/random/ChunkRandomintermediary net/minecraft/class_2919official dzx
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.minecraft.util.math.random.CheckedRandom
CheckedRandom.Splitter -
Field Summary
FieldsFields inherited from interface net.minecraft.util.math.random.BaseRandom
DOUBLE_MULTIPLIER, FLOAT_MULTIPLIERFields inherited from interface net.minecraft.util.math.random.Random
field_38930 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintstatic RandomgetSlimeRandom(int chunkX, int chunkZ, long worldSeed, long scrambler) intnext(int bits) voidsetCarverSeed(long worldSeed, int chunkX, int chunkZ) Seeds the randomizer to generate larger features such as caves, ravines, mineshafts and strongholds.voidsetDecoratorSeed(long populationSeed, int index, int step) Seeds the randomizer to generate a given feature.longsetPopulationSeed(long worldSeed, int blockX, int blockZ) Seeds the randomizer to create population features such as decorators and animals.voidsetRegionSeed(long worldSeed, int regionX, int regionZ, int salt) Seeds the randomizer to determine the start position of structure features such as temples, monuments and buried treasures within a region.voidsetSeed(long seed) split()Methods inherited from class net.minecraft.util.math.random.CheckedRandom
nextGaussianMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.util.math.random.BaseRandom
nextBoolean, nextDouble, nextFloat, nextInt, nextInt, nextLongMethods inherited from interface net.minecraft.util.math.random.Random
nextBetween, nextBetweenExclusive, nextTriangular, skip
-
Field Details
-
baseRandom
- Mappings:
Namespace Name Mixin selector named baseRandomLnet/minecraft/util/math/random/ChunkRandom;baseRandom:Lnet/minecraft/util/math/random/Random;intermediary field_35141Lnet/minecraft/class_2919;field_35141:Lnet/minecraft/class_5819;official dLdzx;d:Layw;
-
sampleCount
private int sampleCount- Mappings:
Namespace Name Mixin selector named sampleCountLnet/minecraft/util/math/random/ChunkRandom;sampleCount:Iintermediary field_28768Lnet/minecraft/class_2919;field_28768:Iofficial eLdzx;e:I
-
-
Constructor Details
-
ChunkRandom
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/util/math/random/ChunkRandom;<init>(Lnet/minecraft/util/math/random/Random;)Vintermediary <init>Lnet/minecraft/class_2919;<init>(Lnet/minecraft/class_5819;)Vofficial <init>Ldzx;<init>(Layw;)V
-
-
Method Details
-
getSampleCount
public int getSampleCount()- Mappings:
Namespace Name Mixin selector named getSampleCountLnet/minecraft/util/math/random/ChunkRandom;getSampleCount()Iintermediary method_35335Lnet/minecraft/class_2919;method_35335()Iofficial lLdzx;l()I
-
split
- Specified by:
splitin interfaceRandom- Overrides:
splitin classCheckedRandom- Mappings:
Namespace Name Mixin selector named splitLnet/minecraft/util/math/random/Random;split()Lnet/minecraft/util/math/random/Random;intermediary method_38420Lnet/minecraft/class_5819;method_38420()Lnet/minecraft/class_5819;official dLayw;d()Layw;
-
nextSplitter
- Specified by:
nextSplitterin interfaceRandom- Overrides:
nextSplitterin classCheckedRandom- Mappings:
Namespace Name Mixin selector named nextSplitterLnet/minecraft/util/math/random/Random;nextSplitter()Lnet/minecraft/util/math/random/RandomSplitter;intermediary method_38421Lnet/minecraft/class_5819;method_38421()Lnet/minecraft/class_6574;official eLayw;e()Ldzl;
-
next
public int next(int bits) - Specified by:
nextin interfaceBaseRandom- Overrides:
nextin classCheckedRandom- Mappings:
Namespace Name Mixin selector named nextLnet/minecraft/util/math/random/BaseRandom;next(I)Iintermediary method_43156Lnet/minecraft/class_6566;method_43156(I)Iofficial cLdyn;c(I)I
-
setSeed
public void setSeed(long seed) - Specified by:
setSeedin interfaceRandom- Overrides:
setSeedin classCheckedRandom- Mappings:
Namespace Name Mixin selector named setSeedLnet/minecraft/util/math/random/Random;setSeed(J)Vintermediary method_43052Lnet/minecraft/class_5819;method_43052(J)Vofficial bLayw;b(J)V
-
setPopulationSeed
public long setPopulationSeed(long worldSeed, int blockX, int blockZ) Seeds the randomizer to create population features such as decorators and animals.This method takes in the world seed and the negative-most block coordinates of the chunk. The coordinate pair provided is equivalent to (chunkX * 16, chunkZ * 16). The three values are mixed together through some layers of hashing to produce the population seed.
This function has been proved to be reversible through some exploitation of the underlying nextLong() weaknesses. It is also important to remember that since setSeed() truncates the 16 upper bits of world seed, only the 48 lowest bits affect the population seed output.
- Mappings:
Namespace Name Mixin selector named setPopulationSeedLnet/minecraft/util/math/random/ChunkRandom;setPopulationSeed(JII)Jintermediary method_12661Lnet/minecraft/class_2919;method_12661(JII)Jofficial aLdzx;a(JII)J
-
setDecoratorSeed
public void setDecoratorSeed(long populationSeed, int index, int step) Seeds the randomizer to generate a given feature. The salt, in the form ofindex + 10000 * stepassures that each feature is seeded differently, making the decoration feel more random. Even though it does a good job at doing so, many entropy issues arise from the salt being so small and result in weird alignments between features that have an index close apart.- Parameters:
populationSeed- the population seed computed insetPopulationSeed(long, int, int)index- the index of the feature in the feature liststep- the generation step's ordinal for this feature- Mappings:
Namespace Name Mixin selector named setDecoratorSeedLnet/minecraft/util/math/random/ChunkRandom;setDecoratorSeed(JII)Vintermediary method_12664Lnet/minecraft/class_2919;method_12664(JII)Vofficial bLdzx;b(JII)V
-
setCarverSeed
public void setCarverSeed(long worldSeed, int chunkX, int chunkZ) Seeds the randomizer to generate larger features such as caves, ravines, mineshafts and strongholds. It is also used to initiate structure start behavior such as rotation.Similar to the population seed, only the 48 lowest bits of the world seed affect the output since it the upper 16 bits are truncated in the setSeed() call.
- Mappings:
Namespace Name Mixin selector named setCarverSeedLnet/minecraft/util/math/random/ChunkRandom;setCarverSeed(JII)Vintermediary method_12663Lnet/minecraft/class_2919;method_12663(JII)Vofficial cLdzx;c(JII)V
-
setRegionSeed
public void setRegionSeed(long worldSeed, int regionX, int regionZ, int salt) Seeds the randomizer to determine the start position of structure features such as temples, monuments and buried treasures within a region.The region coordinates pair corresponds to the coordinates of the region the seeded chunk lies in. For example, a swamp hut region is 32 by 32 chunks meaning that all chunks that lie within that region get seeded the same way.
Similarly, the upper 16 bits of world seed also do not affect the region seed because they get truncated in the setSeed() call.
- Mappings:
Namespace Name Mixin selector named setRegionSeedLnet/minecraft/util/math/random/ChunkRandom;setRegionSeed(JIII)Vintermediary method_12665Lnet/minecraft/class_2919;method_12665(JIII)Vofficial aLdzx;a(JIII)V
-
getSlimeRandom
- Mappings:
Namespace Name Mixin selector named getSlimeRandomLnet/minecraft/util/math/random/ChunkRandom;getSlimeRandom(IIJJ)Lnet/minecraft/util/math/random/Random;intermediary method_12662Lnet/minecraft/class_2919;method_12662(IIJJ)Lnet/minecraft/class_5819;official aLdzx;a(IIJJ)Layw;
-