{
  "format_version": "1.21.80",
  "minecraft:block": {
    "description": {
      "identifier": "mnp_ci:palm_fence_inv", // This block purpose is to show the correct display at inventory and add the missing size to the fence to make a total of 1.5
      "menu_category": {
        "category": "none"
      },
      "states": {
        "mnp_ci:post": [0, 1],
        "mnp_ci:north_picket": [0, 1],
        "mnp_ci:south_picket": [0, 1],
        "mnp_ci:east_picket": [0, 1],
        "mnp_ci:west_picket": [0, 1]
      }
    },
    "permutations": [
      {
        "condition": "q.block_state('mnp_ci:north_picket') && !q.block_state('mnp_ci:south_picket') && !q.block_state('mnp_ci:west_picket') && q.block_state('mnp_ci:east_picket')",
        "components": {
          "minecraft:collision_box": {
            "origin": [-8, 0, -8],
            "size": [10, 8, 10]
          },
          "minecraft:selection_box": false
        }
      },
      {
        "condition": "q.block_state('mnp_ci:north_picket') && !q.block_state('mnp_ci:south_picket') && q.block_state('mnp_ci:west_picket') && !q.block_state('mnp_ci:east_picket')",
        "components": {
          "minecraft:collision_box": {
            "origin": [-2, 0, -8],
            "size": [10, 8, 10]
          },
          "minecraft:selection_box": false
        }
      },
      {
        "condition": "!q.block_state('mnp_ci:north_picket') && q.block_state('mnp_ci:south_picket') && !q.block_state('mnp_ci:west_picket') && q.block_state('mnp_ci:east_picket')",
        "components": {
          "minecraft:collision_box": {
            "origin": [-8, 0, -2],
            "size": [10, 8, 10]
          },
          "minecraft:selection_box": false
        }
      },
      {
        "condition": "!q.block_state('mnp_ci:north_picket') && q.block_state('mnp_ci:south_picket') && q.block_state('mnp_ci:west_picket') && !q.block_state('mnp_ci:east_picket')",
        "components": {
          "minecraft:collision_box": {
            "origin": [-2, 0, -2],
            "size": [10, 8, 10]
          },
          "minecraft:selection_box": false
        }
      },
      {
        "condition": "q.block_state('mnp_ci:north_picket') && q.block_state('mnp_ci:south_picket') && q.block_state('mnp_ci:west_picket') && q.block_state('mnp_ci:east_picket')",
        "components": {
          "minecraft:collision_box": {
            "origin": [-2, 0, -2],
            "size": [8, 8, 8]
          },
          "minecraft:selection_box": false
        }
      },
      {
        "condition": "!q.block_state('mnp_ci:north_picket') && !q.block_state('mnp_ci:south_picket') && !q.block_state('mnp_ci:west_picket') && !q.block_state('mnp_ci:east_picket')",
        "components": {
          "minecraft:collision_box": {
            "origin": [-2, 0, -2],
            "size": [4, 8, 4]
          },
          "minecraft:selection_box": false
        }
      },
      {
        "condition": "q.block_state('mnp_ci:north_picket') && q.block_state('mnp_ci:south_picket') && q.block_state('mnp_ci:west_picket') && !q.block_state('mnp_ci:east_picket')",
        "components": {
          "minecraft:collision_box": {
            "origin": [-2, 0, -4],
            "size": [7, 8, 8]
          },
          "minecraft:selection_box": false
        }
      },
      {
        "condition": "q.block_state('mnp_ci:north_picket') && q.block_state('mnp_ci:south_picket') && !q.block_state('mnp_ci:west_picket') && q.block_state('mnp_ci:east_picket')",
        "components": {
          "minecraft:collision_box": {
            "origin": [-4, 0, -4],
            "size": [6, 8, 8]
          },
          "minecraft:selection_box": false
        }
      },
      {
        "condition": "q.block_state('mnp_ci:north_picket') && !q.block_state('mnp_ci:south_picket') && q.block_state('mnp_ci:west_picket') && q.block_state('mnp_ci:east_picket')",
        "components": {
          "minecraft:collision_box": {
            "origin": [-4, 0, -4],
            "size": [8, 8, 6]
          },
          "minecraft:selection_box": false
        }
      },
      {
        "condition": "!q.block_state('mnp_ci:north_picket') && q.block_state('mnp_ci:south_picket') && q.block_state('mnp_ci:west_picket') && q.block_state('mnp_ci:east_picket')",
        "components": {
          "minecraft:collision_box": {
            "origin": [-4, 0, -2],
            "size": [8, 8, 7]
          },
          "minecraft:selection_box": false
        }
      },
      {
        "condition": "q.block_state('mnp_ci:north_picket') && !q.block_state('mnp_ci:south_picket') && !q.block_state('mnp_ci:west_picket') && !q.block_state('mnp_ci:east_picket')",
        "components": {
          "minecraft:collision_box": {
            "origin": [-2, 0, -8],
            "size": [4, 8, 10]
          },
          "minecraft:selection_box": false
        }
      },
      {
        "condition": "q.block_state('mnp_ci:south_picket') && !q.block_state('mnp_ci:north_picket') && !q.block_state('mnp_ci:west_picket') && !q.block_state('mnp_ci:east_picket')",
        "components": {
          "minecraft:collision_box": {
            "origin": [-2, 0, -2],
            "size": [4, 8, 10]
          },
          "minecraft:selection_box": false
        }
      },
      {
        "condition": "q.block_state('mnp_ci:east_picket') && !q.block_state('mnp_ci:west_picket') && !q.block_state('mnp_ci:north_picket') && !q.block_state('mnp_ci:south_picket')",
        "components": {
          "minecraft:collision_box": {
            "origin": [-8, 0, -2],
            "size": [10, 8, 4]
          },
          "minecraft:selection_box": false
        }
      },
      {
        "condition": "q.block_state('mnp_ci:west_picket') && !q.block_state('mnp_ci:east_picket') && !q.block_state('mnp_ci:north_picket') && !q.block_state('mnp_ci:south_picket')",
        "components": {
          "minecraft:collision_box": {
            "origin": [-2, 0, -2],
            "size": [10, 8, 4]
          },
          "minecraft:selection_box": false
        }
      },
      {
        "condition": "q.block_state('mnp_ci:north_picket') && q.block_state('mnp_ci:south_picket') && !q.block_state('mnp_ci:west_picket') && !q.block_state('mnp_ci:east_picket')",
        "components": {
          "minecraft:collision_box": {
            "origin": [-2, 0, -8],
            "size": [4, 8, 16]
          },
          "minecraft:selection_box": false
        }
      },
      {
        "condition": "!q.block_state('mnp_ci:north_picket') && !q.block_state('mnp_ci:south_picket') && q.block_state('mnp_ci:west_picket') && q.block_state('mnp_ci:east_picket')",
        "components": {
          "minecraft:collision_box": {
            "origin": [-8, 0, -2],
            "size": [16, 8, 4]
          },
          "minecraft:selection_box": false
        }
      },
      {
        "condition": "q.block_state('mnp_ci:post')", // When mnp_ci:post block state value is 1, hides the geometry for this block in the world, not the inventory
        "components": {
          "minecraft:geometry": {
            "identifier": "geometry.mnp_ci.fence_inventory",
            "bone_visibility": {
              "fence": false
            }
          }
        }
      },
      {
        "condition": "!q.block_state('mnp_ci:post')",
        "components": {
          "minecraft:custom_components": ["mnp_ci:on_fence_player_placed"] // Custom component used for our block
        }
      }
    ],
    "components": {
      "minecraft:geometry": "geometry.mnp_ci.fence_inventory", // Geometry displayed at player's inventory
      "minecraft:tick": {
        "interval_range": [20, 20]
      },
      "minecraft:liquid_detection": {
        "detection_rules": [
          {
            "liquid_type": "water",
            "can_contain_liquid": true, // Waterloggable
            "on_liquid_touches": "no_reaction" // Water flows through the block like air
          }
        ]
      },
      "tag:inventory_fence": {}, // Tag used for inventory fences, which avoid this fence to connect with the real fences
      "minecraft:material_instances": {
        "*": {
          "texture": "mnp_ci:palm_tree_planks", // The name of your block texture
          "render_method": "opaque"
        }
      }
    }
  }
}
