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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
getBiome
(int biome) Get theTextureUtil.BiomeColor
entry from a biome's IDint
getBiomeMix
(int[] biomeIdsOutput, int color) int
Get the integer representation of a biomes's RGBA color when applied to grass.int
Get the integer representation of a block's RGBA color.getDarkerBlock
(int color) Get the next darkest blockgetDarkerBlock
(BlockType block) Get the next darkest blockboolean
getIsBlockCloserThanBiome
(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 colorboolean
hasAlpha
(int color) void
Methods 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
-
getNearestBlock
Description copied from class:TextureUtil
Get the block most closely matching a color based on the block's average color- Overrides:
getNearestBlock
in classTextureUtil
- Parameters:
color
- color to match- Returns:
- matching block
-
getNextNearestBlock
Description copied from class:TextureUtil
Get the block most closely matching a color, without matching the color, based on the block's average color- Overrides:
getNextNearestBlock
in classTextureUtil
- Parameters:
color
- color to match- Returns:
- matching block
-
getNearestLayer
Description copied from class:TextureUtil
Returns the block combined ids as an array.- Overrides:
getNearestLayer
in classTextureUtil
-
getLighterBlock
Description copied from class:TextureUtil
Get the next lightest block- Overrides:
getLighterBlock
in classTextureUtil
- Parameters:
block
- input block- Returns:
- next lightest block
-
getDarkerBlock
Description copied from class:TextureUtil
Get the next darkest block- Overrides:
getDarkerBlock
in classTextureUtil
- Parameters:
block
- input block- Returns:
- next darkest block
-
getLighterBlock
Description copied from class:TextureUtil
Get the next lightest block- Overrides:
getLighterBlock
in classTextureUtil
- Parameters:
color
- input color- Returns:
- next lightest block
-
getDarkerBlock
Description copied from class:TextureUtil
Get the next darkest block- Overrides:
getDarkerBlock
in classTextureUtil
- Parameters:
color
- input color- Returns:
- next darkest block
-
getColor
Description copied from class:TextureUtil
Get the integer representation of a block's RGBA color.- Overrides:
getColor
in classTextureUtil
- Parameters:
block
- input block- Returns:
- integer RGBA color
-
getColor
Description copied from class:TextureUtil
Get the integer representation of a biomes's RGBA color when applied to grass.- Overrides:
getColor
in classTextureUtil
- Parameters:
biome
- input biome- Returns:
- integer RGBA color
-
getIsBlockCloserThanBiome
public boolean getIsBlockCloserThanBiome(char[] blockAndBiomeIdOutput, int color, int biomePriority) - Overrides:
getIsBlockCloserThanBiome
in classTextureUtil
-
getBiomeMix
public int getBiomeMix(int[] biomeIdsOutput, int color) - Overrides:
getBiomeMix
in classTextureUtil
-
getBiome
Description copied from class:TextureUtil
Get theTextureUtil.BiomeColor
entry from a biome's ID- Overrides:
getBiome
in classTextureUtil
- Parameters:
biome
- biome id- Returns:
- the
TextureUtil.BiomeColor
entry
-
getNearestBiome
Description copied from class:TextureUtil
Get the biome most closely matching a color based on the block's average color- Overrides:
getNearestBiome
in classTextureUtil
- Parameters:
color
- color to match- Returns:
- matching block
-
getFolder
- Overrides:
getFolder
in classTextureUtil
-
calculateLayerArrays
public void calculateLayerArrays()- Overrides:
calculateLayerArrays
in classTextureUtil
-
loadModTextures
- Overrides:
loadModTextures
in classTextureUtil
- Throws:
IOException
-
getNearestBlock
- Overrides:
getNearestBlock
in classTextureUtil
-
getNearestBlock
- Overrides:
getNearestBlock
in classTextureUtil
-
hasAlpha
public boolean hasAlpha(int color) - Overrides:
hasAlpha
in classTextureUtil
-