Hexal Wiki › Guides › Use Comparison Patterns to Sort Blocks and Entities
Use Comparison Patterns to Sort Blocks and Entities
What Comparison Patterns Do
Hexal's comparison patterns let you evaluate and distinguish between different block types, entity types, and other iotas (data units). This is essential for automation and conditional casting.
Basic Block Comparison
The block comparison pattern examines two blocks and returns information about whether they match, differ, or meet specific criteria. Use this to:
- Identify ore types for selective smelting
- Detect specific block states
- Route materials based on type
Entity Comparison
Similarly, you can compare entities to:
- Distinguish between mob types
- Identify specific creatures for targeted spells
- Trigger actions only when certain entities are present
Building Logic Chains
Combine comparison patterns with other spells to create conditional behavior:
1. Use a comparison pattern to check block/entity type
2. Feed the result into a conditional casting structure
3. Execute different spells based on the comparison outcome
Practical Applications
- Freeze only water blocks while leaving ice untouched
- Sort mobs by type for selective removal or processing
- Create intelligent automation that responds to its environment