icons

A new update is now available, introducing seasons and more!
Latest hotfix: 0.8.0.1 (2024-12-20)
  • Yeah, this is indeed a bit tricky... the game renders these icons during runtime, so there is no way to get them through the API right now :/


    But maybe it would help if we add a new "getIcon()" method to the ItemDefinition/ObjectDefinition/ConstructionDefinition classes (which would return a TextureAsset)? If you wanted to get a block icon then (e.g. with texture id 200), the code could look like this, for example:

    Java
    //Get construction definition for block
    Constructions.ConstructionDefinition def = Definitions.getConstructionDefinition("block");
    //Get icon for this block (texture id 200)
    TextureAsset icon = def.getIcon(200);

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!