Updated Texture Definition Files (markdown)

mikeprimm 2013-11-25 20:08:22 -08:00
parent 417a056d04
commit 6e231a98b2
1 changed files with 2 additions and 50 deletions

@ -108,54 +108,6 @@ Besides selecting the texture to be used, a texture reference can also specify o
## Block ID Numbers
The definition of textures for a specific block requires identifying which block ID is being used by the given block type. While built-in Minecraft standard blocks currently have fixed block ID values, the block IDs for all MinecraftForge mods are controlled through their configuration files. These IDs are loaded via the "cfgfile:" directive (see [[Common Features for Texture and Model Definition Files]] for details on this directive, and the mapping of settings from configuration files to usable symbol names). In all block definition directives, the block ID is specified via the 'id=' attribute. The values of the 'id=' attribute can be a number (a constant), a symbol name corresponding to a setting from the mod's configuration file, or a combination of a symbol name, a plus (\+), and a number. In all cases, if the value of the ID is zero or negative, the ID value will be ignored (allowing disabled blocks to be easily ignored).
## Defining a Simple Block
A simple block is a solid cubic block filling the whole cube where a block is placed. This is the most common kind of block, and is best used whenever possible (for both simplicity of implementation, and for performance). The block texture definition is defined via the 'block:' directive.
## Defining Block Texture Mappings
To define a simple, solid cube block, see [[Defining a Simple Block]]
A simple block has 6 faces, known by a number of equivalent attributes:
* *top* or *face1* or *patch4* (the top of the cube)
* *bottom* or *face0* or *patch1* (the bottom of the cube)
* *north* or *face4* or *patch0* (the side in the negative X direction - currently west: it was north before Minecraft GA)
* *south* or *face5* or *patch3* (the side in the positive X direction - currently east: it was south before Minecraft GA)
* *west* or *face3* or *patch5* (the side in the positive Z direction - currently south: it was west before Minecraft GA)
* *east* or *face2* or *patch2* (the side in the negative Z direction - currently north: it was east before Minecraft GA)
The texture for each side is set by providing a texture reference for the corresponding attribute, in addition to the required block ID attribute, 'id=':
block:id=<block-id>,<side>=<index-plus-function>:<texture-id>,<side>=<index-plus-function>:<texture-id>,...
There are also convenience attributes for common combinations of faces, allowing the same reference to be applied to multiple sides:
* *allfaces* (all six faces use the same texture reference)
* *allsides* (all four faces on the sides of the block - not the top or bottom - use the same texture reference)
* *topbottom* (the top and bottom faces use the same texture reference)
Due to legacy issues, standard simple blocks also need to have the attribute 'stdrot=true' set. This causes the rotation of the top and bottom textures to be correct - otherwise, those textures will be applied 90 degrees rotated from the in-game equivalent.
If the same texture mapping applies to all metadata values, the 'data=*' attribute should be specified (although this is also the default, when no other 'data=' settings are present). If only specific metadata values should use the given texture mapping, one or more 'data=<number>' settings should also be provided.
If more than one block ID uses the same set of texture mappings, additional 'id=' attributes can be specified on the same "block:" line.
Several other special attributes may be specified, if needed:
* *txtid* - described above, this allows specifying of a default texture ID to be used by any texture references in the given 'block:' definition that do not have the ':<texture-id>' suffix.
* *transparency* - this affects how lighting is calculated for the block. If OPAQUE (the default), the block's surfaces are lit based on the light levels of adjacent blocks. If TRANSPARENT, the block's surfaces are lit based on the light levels of the block itself. If SEMITRANSPARENT, the lighting of the block is a special case blend of the two (used by blocks that block light, but do not fill the cube - such as slabs and steps). If LEAVES, the lighting is a special case corresponding to how leaves are handled (generally the same as TRANSPARENT, except on some versions of Spout).
* *colorMult* - this affects any textures using the multiplier-tinting option (17000, 21000), and consists of a 6 digit hexadecimal value: RRGGBB, where RR is the red component (00-FF), GG is the green component, and BB is the blue component.
* *customColorMult" - this affects any textures using the multiplier-tinting option (17000, 21000), and consists of fully qualified classname of a tinting class. Currently defined values include:
+ org.dynmap.hdmap.colormult.TFBandedWoodColorMultiplier - special tinting function for banded wood in Twilight Forest mod
+ org.dynmap.hdmap.colormult.TFMagicLeafColorMultiplier - special tinting function used for magic tree leaves in Twilight Forest mod
+ org.dynmap.hdmap.colormult.TFSpecialLeafColorMultiplier - special tinting function used for special leaves in Twilight Forest mod
* *layer<M>* or *layer<M>-<N>* - this allows textures to be 'stacked' - if any part of the texture on a given side is transparent, the texture from the next layer is applied to those transparent portions. The value of the 'layer<M>' or 'layer<M>-<N>' attribute is the index of the corresponding 'patch<index>' definition to use for the next layer behind the texture for the side matching 'patch<M>' or all patches between 'patch<M>' and 'patch<N>', respectively. For standard simple cubes, the standard sides use patch0 through patch5, so any additional layer textures need to use patch6 or higher.
* *patch<M>* or *patch<M>-<N>' - these allow definition of additional texture references beyond the first 6 (patch0 through patch5, or the other aliases indicated earlier). For simple cubes, these are only needed for defining layered textures. The value is a texture reference, which is applied to the Mth patch, or to all patches between the Mth and Nth, respectively.