content: package com.github.alexthe666.iceandfire.item;
  
  import com.github.alexthe666.iceandfire.IceAndFire;
  import com.github.alexthe666.iceandfire.entity.EntityDragonArrow;
  import com.github.alexthe666.iceandfire.entity.IafEntityRegistry;
  import net.minecraft.world.entity.LivingEntity;
  import net.minecraft.world.entity.projectile.AbstractArrow;
  import net.minecraft.world.item.ArrowItem;
  import net.minecraft.world.item.ItemStack;
  import net.minecraft.world.level.Level;
  import org.jetbrains.annotations.NotNull;
  
  public class ItemDragonArrow extends ArrowItem {
      public ItemDragonArrow() {
          super(new Properties().tab(IceAndFire.TAB_ITEMS));
      }
  
      @Override
      public @NotNull AbstractArrow createArrow(@NotNull Level worldIn, @NotNull ItemStack stack, @NotNull LivingEntity shooter) {
          EntityDragonArrow arrowentity = new EntityDragonArrow(IafEntityRegistry.DRAGON_ARROW.get(), shooter, worldIn);
          return arrowentity;
      }
  
      @Override
      public boolean isInfinite(@NotNull ItemStack stack, @NotNull ItemStack bow, net.minecraft.world.entity.player.@NotNull Player player) {
          int enchant = net.minecraft.world.item.enchantment.EnchantmentHelper.getItemEnchantmentLevel(net.minecraft.world.item.enchantment.Enchantments.INFINITY_ARROWS, bow);
          return enchant > 0 && this.getClass() == ItemDragonArrow.class;
      }
  }
  