Example of a directional block

assets\coreextensions\blockstates\direct_block.json

{
  "variants": {
    "facing=east": {
      "model": "coreextensions:block/direct_block",
      "y": 90
    },
    "facing=north": {
      "model": "coreextensions:block/direct_block"
    },
    "facing=south": {
      "model": "coreextensions:block/direct_block",
      "y": 180
    },
    "facing=west": {
      "model": "coreextensions:block/direct_block",
      "y": 270
    }
  }
}

assets\coreextensions\models\block\direct_block.json

{
  "parent": "minecraft:block/cube",
  "textures": {
    "down": "coreextensions:block/A",
    "east": "coreextensions:block/B",
    "north": "coreextensions:block/C",
    "particle": "coreextensions:block/A",
    "south": "coreextensions:block/E",
    "up": "coreextensions:block/F",
    "west": "coreextensions:block/D"
  }
}

assets\coreextensions\models\item\direct_block.json

{
  "parent": "coreextensions:block/direct_block"
}

These JSON files define the appearance and behavior of your directional block in the game. The "blockstates" JSON file defines different variants of your block based on its facing direction. The "models/block" JSON file defines the textures for each side of the block based on its facing direction. The "models/item" JSON file defines how the item form of the block appears in the player's inventory.

Additionally, the textures for the different sides of the block should be placed in the corresponding directories:

Texture Files:

  • assets\coreextensions\textures\block\A.png

  • assets\coreextensions\textures\block\B.png

  • assets\coreextensions\textures\block\C.png

  • assets\coreextensions\textures\block\D.png

  • assets\coreextensions\textures\block\E.png

  • assets\coreextensions\textures\block\F.png

Ensure that these files are placed in the appropriate directories within your resource pack to define the appearance of your directional block in the game.

Last updated