package com.tiedup.remake.dispenser;

import com.tiedup.remake.entities.EntityRopeArrow;
import net.minecraft.core.Position;
import net.minecraft.core.dispenser.AbstractProjectileDispenseBehavior;
import net.minecraft.world.entity.projectile.Projectile;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;

/**
 * Dispenser behavior for shooting rope arrows.
 *
 * Based on original BehaviorDispenserRopeArrow from 1.12.2
 */
public class RopeArrowDispenseBehavior
    extends AbstractProjectileDispenseBehavior
{

    @Override
    protected Projectile getProjectile(
        Level level,
        Position position,
        ItemStack stack
    ) {
        return new EntityRopeArrow(
            level,
            position.x(),
            position.y(),
            position.z()
        );
    }
}
