See textureFile for information on texturing in CS2!
|Custom Stuff 1
Information presented below this line is outdated syntax or information used for Custom Stuff 1. It will not work with Custom Stuff 2.
If you want to create a block or an item it needs a texture.Textures are stored on texturemaps. They look like the image at right. It's a 256x256 pixel image divided into 256, 16x16 textures. Texturemaps are always stored in .png format.
To be used by Minecraft, the texturemap must be placed inside of minecraft.jar or in the customStuff mod folder. Placing it in the .jar is recommended as it can then be altered with Texture Packs should someone desire to do so. Note that Armor texture files are different, and must be placed in minecraft.jar to work.
When you writing a new block or item in Custom Stuff you need to tell the mod in which file and at which position the texture lies. For example, this image is named customstuff.png and we want to use the dark gray brick texture on the fifth position for a new block. You would write
texturefile="customstuff.png"; textureindex=4;The number used for textureindex starts with "0" and goes from left to right, top to bottom. To put it another way, the top row is numbered from 0 to 15, the next row from 16 to 31, and so on and so forth. An example of this can be seen on the image at right which is the terrain.png file that comes with Minecraft overlaid with the textureindex numbers.
When creating an item you instead use the iconfile and iconindex variables. For example, when creating the blue ingot in the example texture file above you would write
The iconindex is selected in the same way the textureindex is, with the first position being 0. As shown in the example above icons and textures can be placed on the same texture map to save on the number of image files used by your creations.
The texturefile attribute will default to terrain.png if not set by the user. Likewise, iconfile will default to /GUI/items.png if not altered.
Both textureindex and iconindex will default to 0 if not set by the creator of the block or item.