renamed query_noise to sample_noise
This commit is contained in:
1 parent
aa57b586cb
commit
74e177d18d
2 files changed
+6
-6
No files matched your search
@@ -505,19 +505,19 @@ Returns the map colour of a block at position. One of:
|
||||
`'brown_terracotta'`, `'green_terracotta'`, `'red_terracotta'`, `'black_terracotta'`,
|
||||
`'crimson_nylium'`, `'crimson_stem'`, `'crimson_hyphae'`, `'warped_nylium'`, `'warped_stem'`, `'warped_hyphae'`, `'warped_wart'`
|
||||
|
||||
### `query_noise(pos, ...type?)`
|
||||
### `sample_noise(pos, ...type?)`
|
||||
|
||||
Queries the multi noise value(s) on the given position.
|
||||
Samples the multi noise value(s) on the given position.
|
||||
If no type is passed, returns a map of `continentalness`, `depth`, `erosion`, `humidity`, `temperature`, `weirdness`.
|
||||
Otherwise, returns the map of that specific noise.
|
||||
|
||||
<pre>
|
||||
// without type
|
||||
query_noise(pos) => {continentalness: 0.445300012827, erosion: 0.395399987698, temperature: 0.165399998426, ...}
|
||||
sample_noise(pos) => {continentalness: 0.445300012827, erosion: 0.395399987698, temperature: 0.165399998426, ...}
|
||||
// passing type as multiple arguments
|
||||
query_noise(pos, 'pillarRareness', 'aquiferBarrier') => {aquiferBarrier: -0.205013844481, pillarRareness: 1.04772473438}
|
||||
sample_noise(pos, 'pillarRareness', 'aquiferBarrier') => {aquiferBarrier: -0.205013844481, pillarRareness: 1.04772473438}
|
||||
// passing types as a list with unpacking operator
|
||||
query_noise(pos, ...['spaghetti3dFirst', 'spaghetti3dSecond']) => {spaghetti3dFirst: -0.186052125186, spaghetti3dSecond: 0.211626790923}
|
||||
sample_noise(pos, ...['spaghetti3dFirst', 'spaghetti3dSecond']) => {spaghetti3dFirst: -0.186052125186, spaghetti3dSecond: 0.211626790923}
|
||||
</pre>
|
||||
|
||||
Available types:
|
||||
|
||||
@@ -1571,7 +1571,7 @@ public class WorldAccess {
|
||||
}
|
||||
|
||||
@ScarpetFunction(maxParams = -1)
|
||||
public Value query_noise(Context c, @Locator.Block BlockPos pos, String... noiseQueries) {
|
||||
public Value sample_noise(Context c, @Locator.Block BlockPos pos, String... noiseQueries) {
|
||||
int mappedX = BiomeCoords.fromBlock(pos.getX());
|
||||
int mappedY = BiomeCoords.fromBlock(pos.getY());
|
||||
int mappedZ = BiomeCoords.fromBlock(pos.getZ());
|
||||
|
||||
Reference in new issue
Block a user