Class RandomTextureUtil
java.lang.Object
com.fastasyncworldedit.core.util.TextureUtil
com.fastasyncworldedit.core.util.DelegateTextureUtil
com.fastasyncworldedit.core.util.CachedTextureUtil
com.fastasyncworldedit.core.util.RandomTextureUtil
- All Implemented Interfaces:
TextureHolder
-
Nested Class Summary
Nested classes/interfaces inherited from class TextureUtil
TextureUtil.BiomeColor -
Field Summary
Fields inherited from class CachedTextureUtil
colorBiomeMap, colorBlockMap, colorLayerMap, parentFields inherited from class TextureUtil
blockColors, blockDistance, distances, validBiomes, validBlockIds, validColors, validLayerBlocks, validLayerColors, validMixBiomeColors, validMixBiomeIds -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intaddRandomColor(int c1, int c2) fork()Create a copy of thisTextureUtilinstance if required for thread safety.booleangetIsBlockCloserThanBiome(char[] blockAndBiomeIdOutput, int color, int biomePriority) getNearestBiome(int color) Get the biome most closely matching a color based on the block's average colorgetNearestBlock(int color) Get the block most closely matching a color based on the block's average colorMethods inherited from class CachedTextureUtil
getNearestLayerMethods inherited from class DelegateTextureUtil
calculateLayerArrays, getBiome, getBiomeMix, getColor, getColor, getDarkerBlock, getDarkerBlock, getFolder, getLighterBlock, getLighterBlock, getNearestBlock, getNearestBlock, getNextNearestBlock, hasAlpha, loadModTexturesMethods inherited from class TextureUtil
averageColor, averageColor, colorDistance, combineTransparency, fromBlocks, fromClipboard, fromMask, getTextureUtil, getValidBlockIds, hueDistance, multiplyColor
-
Constructor Details
-
RandomTextureUtil
- Throws:
FileNotFoundException
-
-
Method Details
-
fork
Description copied from class:TextureUtilCreate a copy of thisTextureUtilinstance if required for thread safety.- Overrides:
forkin classCachedTextureUtil- Returns:
- either this
TextureUtilinstance if thread safe or a new copied instance.
-
addRandomColor
protected int addRandomColor(int c1, int c2) -
getIsBlockCloserThanBiome
public boolean getIsBlockCloserThanBiome(char[] blockAndBiomeIdOutput, int color, int biomePriority) - Overrides:
getIsBlockCloserThanBiomein classDelegateTextureUtil
-
getNearestBiome
Description copied from class:TextureUtilGet the biome most closely matching a color based on the block's average color- Overrides:
getNearestBiomein classCachedTextureUtil- Parameters:
color- color to match- Returns:
- matching block
-
getNearestBlock
Description copied from class:TextureUtilGet the block most closely matching a color based on the block's average color- Overrides:
getNearestBlockin classCachedTextureUtil- Parameters:
color- color to match- Returns:
- matching block
-