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
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final StringName of the texture, ALWAYS without the final .png extension.protected final TextureType -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanstatic TexturefromName(Workspace workspace, TextureType textureType, String name) Searches in the provided workspace for a texture with matching name and type.abstract ImageIcongetTextureIcon(Workspace workspace) inthashCode()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.
-