-
Notifications
You must be signed in to change notification settings - Fork 51
Home
Welcome to the ConnectedTexturesMod wiki!
ConnectedTexturesMod (CTM) is an overhaul of Chisel's fancy model system. It moves away from the .cf
and .ctx
file formats, however that API will remain functional in Chisel for the time being. The focus of this mod is to allow all of the rendering information to be put into the texture metadata (.mcmeta
) file. However, more advanced things require edits to the actual model .json
file.
There isn't much to explain, so all of the information will be on this one page for now.
See Vanilla's tag structure for Metadata files. We use the same metadata file and everything you do in there should be fully compatible with CTM, including animations.
We add some extra parsing to read additional data in Vanilla's tag structure. Below see the JSON
tree.
The root tag
└─ ctm : Contains data for CTM to use.
├─ ctm_version : Set this to 1. Just version checking.
├─ type : Sets the render type. See below for a list of possible render types.
├─ layer : Sets rendering layer for texture. Can be: SOLID, CUTOUT, CUTOUT_MIPPED, or TRANSLUCENT.
├─ textures : This is for extra textures needed by the render type.
│ └─ An array of extra textures used.
└─ extra : Used for any additional information the render, or specific render type, may require.
└─ light : Fullbright. Can be either an integer or tag compound. From 0 to 15 if integer.
│ See below for options if tag compound.
├─ block : Ranged from 0 to 15. Applies artificial lighting. (Light from torches, glowstone, etc)
└─ sky : Ranged from 0 to 15. Applies daylighting. (Light as if sun-lit in the Day cycle)
{
"ctm": {
"ctm_version": 1,
"type": "NORMAL",
"layer": "SOLID",
"textures": [],
"info": {},
"extra": {
"light": 0,
}
}
}
Another example file:
{
"ctm": {
"ctm_version": 1,
"type": "NORMAL",
"layer": "SOLID",
"textures": [],
"info": {},
"extra": {
"light": {
"block": 0,
"sky": 0
},
}
}
}
A render type is a definition of what advanced texture logic to apply to a texture. Mods can register their own render types. Below is a list of the render types CTM provides by default. Here is the directory that they are located at in CTM.
-
NORMAL
: Default. Plain texture without any special logic. This is assumed iftype
is not defined in the metadata file. Doesn't use anything in thetextures
array. -
CTM
: Connective Textures Map. Regular Connected Textures logic. Uses the first texture in thetextures
array as its CTM complement. -
CTMH
: Horizontal-only CTM. Doesn't use anything in thetextures
array. -
CTMV
: Vertical-only CTM. Doesn't use anything in thetextures
array. -
R
: Randomized textures. Declare thesize
in theextra
compound to define the diameter of the texture. Doesn't use anything in thetextures
array. -
V
: A multiblock texture. Declare thesize
in theextra
compound to define the diameter of the texture. Doesn't use anything in thetextures
array.
Here's a few more texturetypes that Chisel registers.
-
AR
: Stands for Alternating Random. Uses a 2x2 of textures, in a checkerboard. The checkerboard alternates between odds and evens. Numbers between 0 and 3 are decided on the spot. -
SCTM
: Simple Connective Texture Map. Uses a 2x2 of textures, in a simplistic CTM formation. Imitates the connection logic for AE Controllers.