Package com.fastasyncworldedit.core.util
Class DelegateTextureUtil
java.lang.Object
com.fastasyncworldedit.core.util.TextureUtil
com.fastasyncworldedit.core.util.DelegateTextureUtil
- All Implemented Interfaces:
TextureHolder
- Direct Known Subclasses:
CachedTextureUtil
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fastasyncworldedit.core.util.TextureUtil
TextureUtil.BiomeColor -
Field Summary
Fields inherited from class com.fastasyncworldedit.core.util.TextureUtil
blockColors, blockDistance, distances, validBiomes, validBlockIds, validColors, validLayerBlocks, validLayerColors, validMixBiomeColors, validMixBiomeIds -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfork()Create a copy of thisTextureUtilinstance if required for thread safety.getBiome(int biome) Get theTextureUtil.BiomeColorentry from a biome's IDintgetBiomeMix(int[] biomeIdsOutput, int color) intGet the integer representation of a biomes's RGBA color when applied to grass.intGet the integer representation of a block's RGBA color.getDarkerBlock(int color) Get the next darkest blockgetDarkerBlock(BlockType block) Get the next darkest blockbooleangetIsBlockCloserThanBiome(char[] blockAndBiomeIdOutput, int color, int biomePriority) getLighterBlock(int color) Get the next lightest blockgetLighterBlock(BlockType block) Get the next lightest blockgetNearestBiome(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 colorgetNearestBlock(int color, boolean darker) getNearestBlock(BlockType block, boolean darker) getNearestLayer(int color) Returns the block combined ids as an array.getNextNearestBlock(int color) Get the block most closely matching a color, without matching the color, based on the block's average colorbooleanhasAlpha(int color) voidMethods inherited from class com.fastasyncworldedit.core.util.TextureUtil
averageColor, averageColor, colorDistance, combineTransparency, fromBlocks, fromClipboard, fromMask, getTextureUtil, getValidBlockIds, hueDistance, multiplyColor
-
Constructor Details
-
DelegateTextureUtil
- Throws:
FileNotFoundException
-
-
Method Details
-
fork
Description copied from class:TextureUtilCreate a copy of thisTextureUtilinstance if required for thread safety.- Overrides:
forkin classTextureUtil- Returns:
- either this
TextureUtilinstance if thread safe or a new copied instance.
-
getNearestBlock
Description copied from class:TextureUtilGet the block most closely matching a color based on the block's average color- Overrides:
getNearestBlockin classTextureUtil- Parameters:
color- color to match- Returns:
- matching block
-
getNextNearestBlock
Description copied from class:TextureUtilGet the block most closely matching a color, without matching the color, based on the block's average color- Overrides:
getNextNearestBlockin classTextureUtil- Parameters:
color- color to match- Returns:
- matching block
-
getNearestLayer
Description copied from class:TextureUtilReturns the block combined ids as an array.- Overrides:
getNearestLayerin classTextureUtil
-
getLighterBlock
Description copied from class:TextureUtilGet the next lightest block- Overrides:
getLighterBlockin classTextureUtil- Parameters:
block- input block- Returns:
- next lightest block
-
getDarkerBlock
Description copied from class:TextureUtilGet the next darkest block- Overrides:
getDarkerBlockin classTextureUtil- Parameters:
block- input block- Returns:
- next darkest block
-
getLighterBlock
Description copied from class:TextureUtilGet the next lightest block- Overrides:
getLighterBlockin classTextureUtil- Parameters:
color- input color- Returns:
- next lightest block
-
getDarkerBlock
Description copied from class:TextureUtilGet the next darkest block- Overrides:
getDarkerBlockin classTextureUtil- Parameters:
color- input color- Returns:
- next darkest block
-
getColor
Description copied from class:TextureUtilGet the integer representation of a block's RGBA color.- Overrides:
getColorin classTextureUtil- Parameters:
block- input block- Returns:
- integer RGBA color
-
getColor
Description copied from class:TextureUtilGet the integer representation of a biomes's RGBA color when applied to grass.- Overrides:
getColorin classTextureUtil- Parameters:
biome- input biome- Returns:
- integer RGBA color
-
getIsBlockCloserThanBiome
public boolean getIsBlockCloserThanBiome(char[] blockAndBiomeIdOutput, int color, int biomePriority) - Overrides:
getIsBlockCloserThanBiomein classTextureUtil
-
getBiomeMix
public int getBiomeMix(int[] biomeIdsOutput, int color) - Overrides:
getBiomeMixin classTextureUtil
-
getBiome
Description copied from class:TextureUtilGet theTextureUtil.BiomeColorentry from a biome's ID- Overrides:
getBiomein classTextureUtil- Parameters:
biome- biome id- Returns:
- the
TextureUtil.BiomeColorentry
-
getNearestBiome
Description copied from class:TextureUtilGet the biome most closely matching a color based on the block's average color- Overrides:
getNearestBiomein classTextureUtil- Parameters:
color- color to match- Returns:
- matching block
-
getFolder
- Overrides:
getFolderin classTextureUtil
-
calculateLayerArrays
public void calculateLayerArrays()- Overrides:
calculateLayerArraysin classTextureUtil
-
loadModTextures
- Overrides:
loadModTexturesin classTextureUtil- Throws:
IOException
-
getNearestBlock
- Overrides:
getNearestBlockin classTextureUtil
-
getNearestBlock
- Overrides:
getNearestBlockin classTextureUtil
-
hasAlpha
public boolean hasAlpha(int color) - Overrides:
hasAlphain classTextureUtil
-