diff --git a/src/main/java/com/minelittlepony/unicopia/datagen/Datagen.java b/src/main/java/com/minelittlepony/unicopia/datagen/Datagen.java index a160bd7e..505bc54f 100644 --- a/src/main/java/com/minelittlepony/unicopia/datagen/Datagen.java +++ b/src/main/java/com/minelittlepony/unicopia/datagen/Datagen.java @@ -17,7 +17,9 @@ import com.minelittlepony.unicopia.datagen.providers.loot.UEntityLootTableProvid import com.minelittlepony.unicopia.datagen.providers.recipe.URecipeProvider; import com.minelittlepony.unicopia.datagen.providers.tag.UBlockTagProvider; import com.minelittlepony.unicopia.datagen.providers.tag.UDamageTypeProvider; +import com.minelittlepony.unicopia.datagen.providers.tag.UEntityTypeTagProvider; import com.minelittlepony.unicopia.datagen.providers.tag.UItemTagProvider; +import com.minelittlepony.unicopia.datagen.providers.tag.UStatusEffectTagProvider; import com.minelittlepony.unicopia.entity.damage.UDamageTypes; import com.minelittlepony.unicopia.server.world.UWorldGen; @@ -54,6 +56,8 @@ public class Datagen implements DataGeneratorEntrypoint { final var itemTags = pack.addProvider((output, registries) -> new UItemTagProvider(output, registries, blockTags)); pack.addProvider((output, registries) -> new DietsProvider(output, itemTags)); pack.addProvider(UDamageTypeProvider::new); + pack.addProvider(UEntityTypeTagProvider::new); + pack.addProvider(UStatusEffectTagProvider::new); pack.addProvider(UModelProvider::new); pack.addProvider(URecipeProvider::new); diff --git a/src/main/java/com/minelittlepony/unicopia/datagen/providers/tag/UEntityTypeTagProvider.java b/src/main/java/com/minelittlepony/unicopia/datagen/providers/tag/UEntityTypeTagProvider.java new file mode 100644 index 00000000..d86748cf --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/datagen/providers/tag/UEntityTypeTagProvider.java @@ -0,0 +1,44 @@ +package com.minelittlepony.unicopia.datagen.providers.tag; + +import java.util.concurrent.CompletableFuture; + +import com.minelittlepony.unicopia.UTags; +import com.minelittlepony.unicopia.entity.mob.UEntities; + +import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; +import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider; +import net.minecraft.entity.EntityType; +import net.minecraft.registry.RegistryKeys; +import net.minecraft.registry.RegistryWrapper.WrapperLookup; + +public class UEntityTypeTagProvider extends FabricTagProvider> { + public UEntityTypeTagProvider(FabricDataOutput output, CompletableFuture registriesFuture) { + super(output, RegistryKeys.ENTITY_TYPE, registriesFuture); + } + + @Override + protected void configure(WrapperLookup lookup) { + // TODO: Separate these into classes + getOrCreateTagBuilder(UTags.Entities.TRANSFORMABLE).add( + EntityType.SKELETON, EntityType.WITHER_SKELETON, + EntityType.ZOMBIE, EntityType.DROWNED, EntityType.HUSK, EntityType.ZOMBIE_VILLAGER, + EntityType.CREEPER, + EntityType.VILLAGER, EntityType.WANDERING_TRADER, EntityType.PILLAGER, EntityType.ILLUSIONER, EntityType.EVOKER, EntityType.WITCH, + EntityType.TURTLE, + EntityType.BLAZE, //TODO: 1.20.5 EntityType.BREEZE, + EntityType.SHEEP, EntityType.PIG, EntityType.GOAT, + EntityType.RABBIT, EntityType.POLAR_BEAR, EntityType.PANDA, + EntityType.COW, EntityType.MOOSHROOM, + EntityType.HORSE, EntityType.LLAMA, EntityType.DONKEY, EntityType.MULE, + EntityType.CHICKEN, EntityType.PARROT, + EntityType.SPIDER, EntityType.CAVE_SPIDER, EntityType.BEE, UEntities.BUTTERFLY, + EntityType.MAGMA_CUBE, EntityType.SLIME, + EntityType.ENDERMITE, UEntities.LOOT_BUG, + EntityType.SQUID, EntityType.GLOW_SQUID, + EntityType.OCELOT, EntityType.CAT, + EntityType.WOLF, EntityType.FOX, + EntityType.SALMON, EntityType.COD, EntityType.PUFFERFISH, + EntityType.FROG + ); + } +} diff --git a/src/main/java/com/minelittlepony/unicopia/datagen/providers/tag/UStatusEffectTagProvider.java b/src/main/java/com/minelittlepony/unicopia/datagen/providers/tag/UStatusEffectTagProvider.java new file mode 100644 index 00000000..6422d0e1 --- /dev/null +++ b/src/main/java/com/minelittlepony/unicopia/datagen/providers/tag/UStatusEffectTagProvider.java @@ -0,0 +1,22 @@ +package com.minelittlepony.unicopia.datagen.providers.tag; + +import java.util.concurrent.CompletableFuture; + +import com.minelittlepony.unicopia.UTags; +import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; +import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider; +import net.minecraft.entity.effect.StatusEffect; +import net.minecraft.entity.effect.StatusEffects; +import net.minecraft.registry.RegistryKeys; +import net.minecraft.registry.RegistryWrapper.WrapperLookup; + +public class UStatusEffectTagProvider extends FabricTagProvider { + public UStatusEffectTagProvider(FabricDataOutput output, CompletableFuture registriesFuture) { + super(output, RegistryKeys.STATUS_EFFECT, registriesFuture); + } + + @Override + protected void configure(WrapperLookup lookup) { + getOrCreateTagBuilder(UTags.StatusEffects.PINEAPPLE_EFFECTS).add(StatusEffects.REGENERATION, StatusEffects.ABSORPTION, StatusEffects.LUCK, StatusEffects.HASTE); + } +} diff --git a/src/main/resources/data/unicopia/tags/entity_types/transformable.json b/src/main/resources/data/unicopia/tags/entity_types/transformable.json deleted file mode 100644 index 978ad1bf..00000000 --- a/src/main/resources/data/unicopia/tags/entity_types/transformable.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "replace": false, - "values": [ - "minecraft:skeleton", - "minecraft:wither_skeleton", - "minecraft:zombie", - "minecraft:drowned", - "minecraft:husk", - "minecraft:creeper", - "minecraft:villager", - "minecraft:wandering_trader", - "minecraft:wither_skeleton", - "minecraft:witch", - "minecraft:turtle", - "minecraft:zombie_villager", - "minecraft:blaze", - "minecraft:sheep", - "minecraft:salmon", - "minecraft:rabbit", - "minecraft:pufferfish", - "minecraft:pillager", - "minecraft:polar_bear", - "minecraft:pig", - "minecraft:llama", - "minecraft:goat", - "minecraft:illusioner", - "minecraft:donkey", - "minecraft:cow", - "minecraft:cod", - "minecraft:mooshroom", - "minecraft:panda", - "minecraft:parrot", - "minecraft:chicken", - "minecraft:spider", - "minecraft:cave_spider", - "minecraft:mule", - "minecraft:magma_cube", - "minecraft:cat", - "minecraft:ocelot", - "minecraft:bee", - "minecraft:squid", - "minecraft:glow_squid", - "minecraft:fox", - "minecraft:wolf", - "minecraft:horse", - "unicopia:butterfly" - ] -} diff --git a/src/main/resources/data/unicopia/tags/status_effect/pineapple_effects.json b/src/main/resources/data/unicopia/tags/status_effect/pineapple_effects.json deleted file mode 100644 index 5f8e5576..00000000 --- a/src/main/resources/data/unicopia/tags/status_effect/pineapple_effects.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "replace": false, - "values": [ - "minecraft:regeneration", - "minecraft:absorption", - "minecraft:luck", - "minecraft:haste" - ] -}