Variant ‐ Custom Data - DerFrZocker/Custom-Ore-Generator GitHub Wiki
Variant Custom Data
The VARIANT
custom data allows you to specify the numerical variant of a generated block. This is primarily used for older Minecraft versions (pre-1.13) where block data values were used to differentiate between different types of the same block (e.g., different colors of wool, different wood types for planks). In newer Minecraft versions, block states (see Block State) are generally used instead of numerical variants.
- Name:
VARIANT
- Type: Integer
- Applicable Materials: Blocks that supported numerical variants in older Minecraft versions (e.g.,
WOOL
,WOOD
,PLANKS
).
Usage
To set the VARIANT
custom data, you provide an integer value. The specific integer value corresponds to a particular block variant.
Important: The exact numerical variant values are highly dependent on the specific Minecraft version and the material. You must consult external resources, such as official Minecraft wikis or block data reference sites, to find the correct variant values for the material and Minecraft version you are targeting.
Example
To generate blue wool (assuming blue wool has a variant ID of 11
in your Minecraft version):
/oregen set customdata my_blue_wool VARIANT 11
To generate spruce wood planks (assuming spruce planks have a variant ID of 1
in your Minecraft version):
/oregen set customdata my_spruce_planks VARIANT 1