Skip to content

Reference: JMX Specification

grondag edited this page Jun 11, 2019 · 34 revisions

NOTE: You should already be familiar with the un-modded Minecraft JSON model format before trying to create JMX model files. You can find more information on the Gamepedia Minecraft Wiki.

JMX Model Overrides

The jmx root-level tag defines textures and materials that should be used when JMX is loaded. It will not be used if a frex tag is present and a FREX renderer (i.e. Canvas) is active.

"jmx": {
    "textures": { },
    "materials": { }
}

FREX Model Overrides

The frex root-level tag defines textures and materials that should be used when a FREX renderer (i.e. Canvas) is active. When present and active, it overrides the jmx tag.

A frex block is useful mainly with models that use different textures and material properties when shaders are available. Such models can define a still-enhanced-but-without-shaders appearance in the jmx block that will be used when Canvas isn't available.

This "override" behavior only applies within the same JSON file. Texture and material names within the frex block can reference texture and material names provided via imx blocks in other JSON model files (or even vanilla models for texture names.)

"frex": {
    "textures": { },
    "materials": { }
}

Textures

Textures are included in the imx or frex elements via the textures tag. Usage of this tag is identical to textures for vanilla model JSON files. However, the textures are only available and applied only when JMX is loaded.

If imx and frex elements are both present, only one of them will be loaded. If a FREX-compliant renderer is active, the frex textures will be used. Otherwise the textures in the imx element will apply.

Note that a vanilla textures element at the root level is not overriden by the imx and frex blocks. This avoids compatibility problems with parent/child vanilla models that may still depend on the vanilla textures. For this reason, texture reference names within a block (names that are meant to be used with a # prefix) should be different from their vanilla counterparts.

Clone this wiki locally