{
  "format_version": "1.20.80",
  "minecraft:block": {
    "description": {
      "identifier": "fluffyalien_energistics:fluid_separator",
      "menu_category": {
        "category": "items"
      },
      "traits": {
        "minecraft:placement_direction": {
          "enabled_states": ["minecraft:cardinal_direction"],
          "y_rotation_offset": 180
        }
      },
      "states": {
        "fluffyalien_energistics:working": [false, true],
        "fluffyalien_energistics:fluid": ["none", "oil", "water"]
      }
    },
    "components": {
      "tag:minecraft:is_pickaxe_item_destructible": {},
"minecraft:custom_components": [
        "fluffyalien_energisticscore:machine",
        "fluffyalien_energistics:fluid_separator"
      ],
      "tag:fluffyalien_energisticscore:machine": {},
      "tag:fluffyalien_energisticscore:io.category.energy": {},
      "tag:fluffyalien_energisticscore:consumer.category.energy": {},
      "minecraft:display_name": "%tile.fluffyalien_energistics.fluid_separator.name\n§o§bBedrock §eEnergistics§r",

      "minecraft:geometry": "minecraft:geometry.full_block",

      "minecraft:destructible_by_explosion": false,
      "minecraft:destructible_by_mining": {
        "seconds_to_destroy": 1
      },
      "minecraft:tick": {
        "interval_range": [10, 10]
      }
    },
    "permutations": [
      {
        "condition": "q.block_state('fluffyalien_energistics:fluid') == 'none'",
        "components": {
          "tag:fluffyalien_energisticscore:io.type.oil": {},
          "tag:fluffyalien_energisticscore:io.type.water": {},
          "tag:fluffyalien_energisticscore:consumer.type.oil": {},
          "tag:fluffyalien_energisticscore:consumer.type.water": {}
        }
      },
      {
        "condition": "q.block_state('fluffyalien_energistics:fluid') == 'oil'",
        "components": {
          "tag:fluffyalien_energisticscore:io.type.oil": {},
          "tag:fluffyalien_energisticscore:consumer.type.oil": {},

          "tag:fluffyalien_energisticscore:io.type.hydrogen": {},
          "tag:fluffyalien_energisticscore:io.type.carbon": {}
        }
      },
      {
        "condition": "q.block_state('fluffyalien_energistics:fluid') == 'water'",
        "components": {
          "tag:fluffyalien_energisticscore:io.type.water": {},
          "tag:fluffyalien_energisticscore:consumer.type.water": {},

          "tag:fluffyalien_energisticscore:io.type.hydrogen": {},
          "tag:fluffyalien_energisticscore:io.type.oxygen": {}
        }
      },
      {
        "condition": "!q.block_state('fluffyalien_energistics:working') || q.block_state('fluffyalien_energistics:fluid') == 'none'",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "fluffyalien_energistics:machine_casing_side"
            },
            "north": {
              "texture": "fluffyalien_energistics:fluid_separator_front_off"
            },
            "up": {
              "texture": "fluffyalien_energistics:machine_casing_top"
            },
            "down": {
              "texture": "fluffyalien_energistics:machine_casing_top"
            }
          }
        }
      },
      {
        "condition": "q.block_state('fluffyalien_energistics:working') && q.block_state('fluffyalien_energistics:fluid') == 'oil'",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "fluffyalien_energistics:machine_casing_side"
            },
            "north": {
              "texture": "fluffyalien_energistics:fluid_separator_front_on_oil"
            },
            "up": {
              "texture": "fluffyalien_energistics:machine_casing_top"
            },
            "down": {
              "texture": "fluffyalien_energistics:machine_casing_top"
            }
          }
        }
      },
      {
        "condition": "q.block_state('fluffyalien_energistics:working') && q.block_state('fluffyalien_energistics:fluid') == 'water'",
        "components": {
          "minecraft:material_instances": {
            "*": {
              "texture": "fluffyalien_energistics:machine_casing_side"
            },
            "north": {
              "texture": "fluffyalien_energistics:fluid_separator_front_on_water"
            },
            "up": {
              "texture": "fluffyalien_energistics:machine_casing_top"
            },
            "down": {
              "texture": "fluffyalien_energistics:machine_casing_top"
            }
          }
        }
      },
      {
        "condition": "q.block_state('minecraft:cardinal_direction') == 'south'",
        "components": {
          "minecraft:transformation": {
            "rotation": [0, 180, 0]
          }
        }
      },
      {
        "condition": "q.block_state('minecraft:cardinal_direction') == 'west'",
        "components": {
          "minecraft:transformation": {
            "rotation": [0, 90, 0]
          }
        }
      },
      {
        "condition": "q.block_state('minecraft:cardinal_direction') == 'east'",
        "components": {
          "minecraft:transformation": {
            "rotation": [0, -90, 0]
          }
        }
      }
    ]
  }
}
