package net.minecraft.world.level.levelgen.structure.templatesystem;

import java.util.function.Function;
import net.minecraft.core.Registry;
import java.util.Random;
import net.minecraft.core.BlockPos;
import com.mojang.serialization.Codec;

public abstract class PosRuleTest {
    public static final Codec<PosRuleTest> CODEC;
    
    public abstract boolean test(final BlockPos fu1, final BlockPos fu2, final BlockPos fu3, final Random random);
    
    protected abstract PosRuleTestType<?> getType();
    
    static {
        CODEC = Registry.POS_RULE_TEST.dispatch("predicate_type", (Function)PosRuleTest::getType, (Function)PosRuleTestType::codec);
    }
}
