package ru.dbotthepony.mc.otm.datagen.tags

import net.minecraft.tags.ItemTags
import net.minecraft.world.entity.EntityType
import net.minecraft.world.item.Items
import ru.dbotthepony.mc.otm.registry.game.MItems

fun addSuspiciousTags(tagsProvider: TagsProvider) {
	tagsProvider.entityTypes.Appender(MItems.SUSPICIOUS_FOODS.OWNED_MEAT_CONSUMERS)
		.add(MItems.SUSPICIOUS_FOODS.MEAT_CONSUMERS)

	tagsProvider.entityTypes.Appender(MItems.SUSPICIOUS_FOODS.OWNED_FISH_CONSUMERS)
		.add(MItems.SUSPICIOUS_FOODS.FISH_CONSUMERS)

	tagsProvider.entityTypes.Appender(MItems.SUSPICIOUS_FOODS.OWNED_COOKIE_CONSUMERS)
		.add(MItems.SUSPICIOUS_FOODS.COOKIE_CONSUMERS)

	tagsProvider.entityTypes.Appender(MItems.SUSPICIOUS_FOODS.OWNED_CARROT_CONSUMERS)
		.add(MItems.SUSPICIOUS_FOODS.CARROT_CONSUMERS)

	tagsProvider.entityTypes.Appender(MItems.SUSPICIOUS_FOODS.CARROT_CONSUMERS)
		.add(EntityType.RABBIT)

	tagsProvider.items.Appender(ItemTags.RABBIT_FOOD)
		.add(MItems.SUSPICIOUS_FOODS.CARROT)

	tagsProvider.items.Appender(ItemTags.WOLF_FOOD)
		.add(MItems.SUSPICIOUS_FOODS.MUTTON)
		.add(MItems.SUSPICIOUS_FOODS.CHICKEN)
		.add(MItems.SUSPICIOUS_FOODS.BEEF)
		.add(MItems.SUSPICIOUS_FOODS.RABBIT)
		.add(MItems.SUSPICIOUS_FOODS.PORKCHOP)
		.add(MItems.SUSPICIOUS_FOODS.COOKED_MUTTON)
		.add(MItems.SUSPICIOUS_FOODS.COOKED_BEEF)
		.add(MItems.SUSPICIOUS_FOODS.COOKED_CHICKEN)
		.add(MItems.SUSPICIOUS_FOODS.COOKED_RABBIT)
		.add(MItems.SUSPICIOUS_FOODS.COOKED_PORKCHOP)
		.add(MItems.SUSPICIOUS_FOODS.ROTTEN_FLESH)

	tagsProvider.entityTypes.Appender(MItems.SUSPICIOUS_FOODS.MEAT_CONSUMERS)
		.add(EntityType.WOLF)

	tagsProvider.entityTypes.Appender(MItems.SUSPICIOUS_FOODS.FISH_CONSUMERS)
		.add(EntityType.OCELOT)
		.add(EntityType.CAT)

	tagsProvider.entityTypes.Appender(MItems.SUSPICIOUS_FOODS.COOKIE_CONSUMERS)
		.add(EntityType.PARROT)

	// Cats easily can eat cooked food and a lot of cats even PREFER to eat fish cooked,
	// literally begging for fish when they smell it being cooked (and ignoring it while it lays raw)
	// What mojang were thinking?
	tagsProvider.items.Appender(ItemTags.OCELOT_FOOD)
		.add(Items.COOKED_COD)
		.add(Items.COOKED_SALMON)
		.add(MItems.SUSPICIOUS_FOODS.COD)
		.add(MItems.SUSPICIOUS_FOODS.COOKED_COD)
		.add(MItems.SUSPICIOUS_FOODS.SALMON)
		.add(MItems.SUSPICIOUS_FOODS.COOKED_SALMON)

	tagsProvider.items.Appender(ItemTags.CAT_FOOD)
		.add(Items.COOKED_COD)
		.add(Items.COOKED_SALMON)
		.add(MItems.SUSPICIOUS_FOODS.COD)
		.add(MItems.SUSPICIOUS_FOODS.COOKED_COD)
		.add(MItems.SUSPICIOUS_FOODS.SALMON)
		.add(MItems.SUSPICIOUS_FOODS.COOKED_SALMON)
}
