Images and drawing
If your mod shows images, put them in a folder next to your DLL and load them like this:
AetherResources.LoadTexture("my_mod", "textures/icon.png");To make your mod’s UI feel like part of the game, use Block Story’s original sprites (UIAtlas) instead of drawing flat boxes.
Rules that avoid trouble
- Do not create new things every frame when drawing the UI (textures, styles, fonts): create once and reuse. Otherwise the game stutters.
- Do not read blocks from areas that are not loaded. Use
SafeVoxels.GetBlockSafeorGetBlockFast, which do it safely. - If something has to wait, wait for the first frame (the client entrypoint), not for game boot.