Class RandomTransform
java.lang.Object
com.sk89q.worldedit.extent.AbstractDelegateExtent
com.fastasyncworldedit.core.extent.ResettableExtent
com.fastasyncworldedit.core.extent.transform.SelectTransform
com.fastasyncworldedit.core.extent.transform.RandomTransform
- All Implemented Interfaces:
Extent
,InputExtent
,OutputExtent
,Serializable
- Direct Known Subclasses:
MultiTransform
Uses a random pattern of a weighted list of patterns.
- See Also:
-
Field Summary
Fields inherited from class com.sk89q.worldedit.extent.AbstractDelegateExtent
extent
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(ResettableExtent extent, double chance) Add a pattern to the weight list of patterns.getExtent
(int x, int z) getExtent
(int x, int y, int z) Methods inherited from class com.fastasyncworldedit.core.extent.transform.SelectTransform
createEntity, getExtent, getExtent, setBiome, setBiome, setBlock, setBlock
Methods inherited from class com.fastasyncworldedit.core.extent.ResettableExtent
init, setOrigin
Methods inherited from class com.sk89q.worldedit.extent.AbstractDelegateExtent
addPostProcessor, addProcessor, cancel, commit, commitBefore, disableHistory, disableQueue, enableQueue, fullySupports3DBiomes, getBiome, getBiomeType, getBlock, getBlock, getBrightness, getEmittedLight, getEntities, getEntities, getExtent, getFullBlock, getFullBlock, getMaximumPoint, getMaxY, getMinimumPoint, getMinY, getSkyLight, isQueueEnabled, relight, relightBlock, relightSky, removeEntity, setBlockLight, setChangeSet, setSkyLight, setTile, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.sk89q.worldedit.extent.Extent
addCaves, addOre, addOres, addSchems, apply, apply, center, contains, contains, countBlocks, countBlocks, enableHistory, generate, getBlockDistribution, getBlockDistributionWithData, getHighestTerrainBlock, getHighestTerrainBlock, getNearestSurfaceLayer, getNearestSurfaceTerrainBlock, getNearestSurfaceTerrainBlock, getNearestSurfaceTerrainBlock, getNearestSurfaceTerrainBlock, getNearestSurfaceTerrainBlock, isWorld, lazyCopy, regenerateChunk, replaceBlocks, replaceBlocks, replaceBlocks, setBlocks, setBlocks, setBlocks, spawnResource
Methods inherited from interface com.sk89q.worldedit.extent.InputExtent
getBiome, getBrightness, getEmittedLight, getHeightMap, getOpacity, getOpacity, getSkyLight
Methods inherited from interface com.sk89q.worldedit.extent.OutputExtent
setBiome, setBlockLight, setHeightMap, setSkyLight
-
Constructor Details
-
RandomTransform
public RandomTransform() -
RandomTransform
New instance- Parameters:
random
-SimpleRandom
used to choose between transforms, given weights
-
-
Method Details
-
getExtent
- Specified by:
getExtent
in classSelectTransform
-
getExtent
- Specified by:
getExtent
in classSelectTransform
-
setExtent
- Overrides:
setExtent
in classResettableExtent
-
add
Add a pattern to the weight list of patterns.The probability for the pattern added is chance / max where max is the sum of the probabilities of all added patterns.
- Parameters:
extent
- the extentchance
- the chance, which can be any positive number
-
getExtents
-
getCollection
-