package fr.koka99cab.spiderman.registry;

import fr.koka99cab.spiderman.SpidermanMod;
import fr.koka99cab.spiderman.entity.GrapplingHookEntity;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.MobCategory;

public final class SpidermanEntityTypes {
	private static final ResourceKey<EntityType<?>> GRAPPLING_HOOK_KEY = ResourceKey.create(Registries.ENTITY_TYPE, SpidermanMod.id("grappling_hook"));

	public static final EntityType<GrapplingHookEntity> GRAPPLING_HOOK = Registry.register(
			BuiltInRegistries.ENTITY_TYPE,
			GRAPPLING_HOOK_KEY,
			EntityType.Builder.<GrapplingHookEntity>of(GrapplingHookEntity::new, MobCategory.MISC)
					.sized(0.25F, 0.25F)
					.clientTrackingRange(96)
					.updateInterval(1)
					.noSave()
					.build(GRAPPLING_HOOK_KEY)
	);

	private SpidermanEntityTypes() {
	}

	public static void register() {
		SpidermanMod.LOGGER.debug("Entites Spiderman enregistrees.");
	}
}
