Package net.mcreator.workspace.resources
Class Texture
java.lang.Object
net.mcreator.workspace.resources.Texture
- Direct Known Subclasses:
CustomTexture
,ExternalTexture
,Texture.Dummy
Base class for texture resource implementations.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected final String
Name of the texture, ALWAYS without the final .png extension.protected final TextureType
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
static Texture
fromName
(Workspace workspace, TextureType textureType, String name) Searches in the provided workspace for a texture with matching name and type.abstract ImageIcon
getTextureIcon
(Workspace workspace) int
hashCode()
toString()
-
Field Details
-
textureType
-
textureName
Name of the texture, ALWAYS without the final .png extension. However, if the original texture name is textureName.png.png, this will be textureName.png
-
-
Method Details
-
getTextureName
-
equals
-
hashCode
public int hashCode() -
toString
-
getTextureIcon
-
fromName
Searches in the provided workspace for a texture with matching name and type.- Parameters:
workspace
- The workspace to search in.textureType
- The type of the textures to check.name
- The name of the texture to look for.- Returns:
- The texture with the provided name of the specified type.
-