import { ItemBehavior } from "../../modules/itemModule";
import {createScytheShockWave} from "./attacks/shockwave";
const scytheIncludeBlocks = {
    blockIds: [
        "minecraft:short_grass",
        "minecraft:tall_grass",
        "minecraft:fern"
    ],
    blockTags: ["cubed:grass"],
    blockStates: [
        {
            state: "growth",
            value: 7,
        },
        {
            state: "cubed:grow_state",
            value: 4,
        },
    ],
};
const scytheExcludeBlocks = {
    blockTags: ["cubed:stake"],
};
export function registerScythes() {
    ItemBehavior.register({
        id: "cubed:iron_sickle",
        multiBlockDestroy: {
            dropsLoot: true,
            range: 1,
            include: scytheIncludeBlocks,
            exclude: scytheExcludeBlocks,
            accuracy: {
                minAccuracyPct: 30,
                maxAccuracyPct: 60,
                enchantment: "minecraft:efficiency",
                maxLevel: 5,
            },
        },
        events: {
            onEntityHit(player, entity) {
                createScytheShockWave(player);
            },
            onBlockBreak(player, block) {
                createScytheShockWave(player);
            },
        },
    });
    ItemBehavior.register({
        id: "cubed:stone_sickle",
        multiBlockDestroy: {
            dropsLoot: true,
            range: 1,
            include: scytheIncludeBlocks,
            exclude: scytheExcludeBlocks,
            accuracy: {
                minAccuracyPct: 40,
                maxAccuracyPct: 70,
                enchantment: "minecraft:efficiency",
                maxLevel: 5,
            },
        },
        events: {
            onEntityHit(player, entity) {
                createScytheShockWave(player);
            },
            onBlockBreak(player, block) {
                createScytheShockWave(player);
            },
        },
    });
    ItemBehavior.register({
        id: "cubed:gold_sickle",
        multiBlockDestroy: {
            dropsLoot: true,
            range: 2,
            include: scytheIncludeBlocks,
            exclude: scytheExcludeBlocks,
            accuracy: {
                minAccuracyPct: 30,
                maxAccuracyPct: 60,
                enchantment: "minecraft:efficiency",
                maxLevel: 5,
            },
        },
        events: {
            onEntityHit(player, entity) {
                createScytheShockWave(player);
            },
            onBlockBreak(player, block) {
                createScytheShockWave(player);
            },
        },
    });
    ItemBehavior.register({
        id: "cubed:golden_scythe",
        multiBlockDestroy: {
            dropsLoot: true,
            range: 2,
            include: scytheIncludeBlocks,
            exclude: scytheExcludeBlocks,
            accuracy: {
                minAccuracyPct: 50,
                maxAccuracyPct: 90,
                enchantment: "minecraft:efficiency",
                maxLevel: 5,
            },
        },
        events: {
            onEntityHit(player, entity) {
                createScytheShockWave(player);
            },
            onBlockBreak(player, block) {
                createScytheShockWave(player);
            },
        },
    });
}
