mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Merge branch '1.20.2' into 1.20.4
This commit is contained in:
commit
f091521e1b
5 changed files with 70 additions and 57 deletions
|
@ -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);
|
||||
|
|
|
@ -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<EntityType<?>> {
|
||||
public UEntityTypeTagProvider(FabricDataOutput output, CompletableFuture<WrapperLookup> 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
|
||||
);
|
||||
}
|
||||
}
|
|
@ -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<StatusEffect> {
|
||||
public UStatusEffectTagProvider(FabricDataOutput output, CompletableFuture<WrapperLookup> 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);
|
||||
}
|
||||
}
|
|
@ -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"
|
||||
]
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:regeneration",
|
||||
"minecraft:absorption",
|
||||
"minecraft:luck",
|
||||
"minecraft:haste"
|
||||
]
|
||||
}
|
Loading…
Reference in a new issue