package net.mattias.oceancritteria.entity;

import net.mattias.oceancritteria.OceanCritteria;
import net.mattias.oceancritteria.entity.custom.PenguinEntity;
import net.mattias.oceancritteria.entity.custom.projectile.IceArrow;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.MobCategory;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;

public class ModEntities {
    public static final DeferredRegister<EntityType<?>> ENTITY_TYPES =
            DeferredRegister.create(ForgeRegistries.ENTITY_TYPES, OceanCritteria.MOD_ID);

    public static final RegistryObject<EntityType<PenguinEntity>> PENGUIN =
            ENTITY_TYPES.register("penguin", () -> EntityType.Builder.of(PenguinEntity::new, MobCategory.CREATURE)
                    .sized(1f, 1f).build("penguin"));

    public static final RegistryObject<EntityType<?>> ICE_ARROW =
            ENTITY_TYPES.register("penguin", () -> EntityType.Builder.of(IceArrow::new, MobCategory.MISC)
                    .sized(1f, 1f).build("penguin"));

    public static void register(IEventBus eventBus) {
        ENTITY_TYPES.register(eventBus);
    }
}

Please make the ModEntities work 

also 

I tried making this class 

package net.mattias.oceancritteria.entity.custom.projectile;

import net.mattias.oceancritteria.item.ModItems;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.projectile.AbstractArrow;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;

public class IceArrow extends AbstractArrow {
    private final Item referenceitem;
    public IceArrow(EntityType<? extends AbstractArrow> type, Level level) {
        super(type, level);
        this.referenceitem = ModItems.ICE_ARROW.get();
    }

    public IceArrow(LivingEntity shooter, Level level, Item referenceitem) {
        super(type, shooter, level);
        this.referenceitem = referenceitem;
    }

    @Override
    protected ItemStack getPickupItem() {
        return new ItemStack(this.referenceitem);
    }
}

Do you already have it in 
package net.mattias.oceancritteria.item.custom;

import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.entity.projectile.AbstractArrow;
import net.minecraft.world.entity.projectile.Arrow;
import net.minecraft.world.item.ArrowItem;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.enchantment.EnchantmentHelper;
import net.minecraft.world.item.enchantment.Enchantments;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.EntityHitResult;

public class IceArrowItem extends ArrowItem {
    public final float damage;

    public IceArrowItem(Properties properties, float damage) {
        super(properties);
        this.damage = damage;
    }

    @Override
    public AbstractArrow createArrow(Level level, ItemStack stack, LivingEntity shooter) {
        IceArrow arrow = new IceArrow(level, shooter);
        arrow.setEffectsFromItem(stack);
        return arrow;
    }

    @Override
    public boolean isInfinite(ItemStack stack, ItemStack bow, Player player) {
        int infinityLevel = EnchantmentHelper.getItemEnchantmentLevel(Enchantments.INFINITY_ARROWS, bow);
        return infinityLevel > 0 && this.getClass() == ArrowItem.class;
    }

    public static class IceArrow extends Arrow {
        public IceArrow(Level level, LivingEntity shooter) {
            super(level, shooter);
        }

        @Override
        protected void onHitEntity(EntityHitResult pResult) {
            super.onHitEntity(pResult);
            Entity target = pResult.getEntity();

            if (target instanceof LivingEntity livingTarget) {
                int currentFreezeTicks = livingTarget.getTicksFrozen();
                int newFreezeTicks = Math.min(currentFreezeTicks + 40, 140);
                livingTarget.setTicksFrozen(newFreezeTicks);

                livingTarget.addEffect(new MobEffectInstance(
                        MobEffects.MOVEMENT_SLOWDOWN,
                        60,
                        1,
                        false,
                        false
                ));
            }
        }
    }
}