package studio.halbear.hem_custom.registry;

import net.minecraft.entity.EntityClassification;
import net.minecraft.entity.EntityType;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.event.entity.EntityAttributeCreationEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import studio.halbear.hem_custom.vehicles.Entity.Aeroplane;
import studio.halbear.hem_custom.vehicles.Entity.Airboat;


@Mod.EventBusSubscriber(modid = "hem", bus = Mod.EventBusSubscriber.Bus.MOD)
public class ModEntities {

    public static EntityType<Aeroplane> AEROPLANE;
    public static EntityType<Airboat> AIRBOAT;

    @SubscribeEvent
    public static void registerEntities(final RegistryEvent.Register<EntityType<?>> event) {
        AEROPLANE = EntityType.Builder.create(Aeroplane::new, EntityClassification.MISC)
                .size(2, 1.5F).build(new ResourceLocation(ModStatics.MOD_ID, "aeroplane").toString());
        AEROPLANE.setRegistryName(new ResourceLocation("hem", "aeroplane"));
        event.getRegistry().register(AEROPLANE);

        AIRBOAT = EntityType.Builder.create(Airboat::new, EntityClassification.MISC)
                .size(7, 12F).build(new ResourceLocation(ModStatics.MOD_ID, "new_airboat").toString());
        AIRBOAT.setRegistryName(new ResourceLocation("hem", "new_airboat"));
        event.getRegistry().register(AIRBOAT);
    }

    @SubscribeEvent
    public static void registerAttributes(final EntityAttributeCreationEvent event) {
        //if an entity has attributes, register them here
    }
}
