Interface DensityFunction.EachApplier
- All Known Implementing Classes:
ChunkNoiseSampler
- Enclosing interface:
DensityFunction
public static interface DensityFunction.EachApplier
EachApplier is used to fill an array of densities, like a density buffer
or cache, with values from a density function.
This exists because ChunkNoiseSampler
uses itself as the block position passed to density functions and needs to set the
position fields correctly before calling sample, as well as setting fields
for the implementation of caches.
- Mappings:
Namespace Name named net/minecraft/world/gen/densityfunction/DensityFunction$EachApplierintermediary net/minecraft/class_6910$class_6911official dyr$a
-
Method Summary
Modifier and TypeMethodDescriptionat(int index) Returns the block position at a specific index of the density array.voidfill(double[] densities, DensityFunction densityFunction) Fills the density array using a density function.
-
Method Details
-
at
Returns the block position at a specific index of the density array.If you want to manually iterate the array and call
DensityFunction.sample(net.minecraft.world.gen.densityfunction.DensityFunction.NoisePos)to set the individual elements in an implementation ofDensityFunction.fill(double[], net.minecraft.world.gen.densityfunction.DensityFunction.EachApplier), this method can be used to get the block position required for that.- Returns:
- the block position at a specific index of the density array
- Implementation Note:
- This can have side effects.
- Mappings:
Namespace Name Mixin selector named atLnet/minecraft/world/gen/densityfunction/DensityFunction$EachApplier;at(I)Lnet/minecraft/world/gen/densityfunction/DensityFunction$NoisePos;intermediary method_40477Lnet/minecraft/class_6910$class_6911;method_40477(I)Lnet/minecraft/class_6910$class_6912;official aLdyr$a;a(I)Ldyr$b;
-
fill
Fills the density array using a density function.- Implementation Note:
- This can have side effects.
- Mappings:
Namespace Name Mixin selector named fillLnet/minecraft/world/gen/densityfunction/DensityFunction$EachApplier;fill([DLnet/minecraft/world/gen/densityfunction/DensityFunction;)Vintermediary method_40478Lnet/minecraft/class_6910$class_6911;method_40478([DLnet/minecraft/class_6910;)Vofficial aLdyr$a;a([DLdyr;)V
-