mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Merge branch '1.20.1' into 1.20.2
This commit is contained in:
commit
6812acb5f7
14 changed files with 95 additions and 105 deletions
|
@ -17,8 +17,10 @@ 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.UDimensionTypeTagProvider;
|
||||
import com.minelittlepony.unicopia.datagen.providers.tag.UEntityTypeTagProvider;
|
||||
import com.minelittlepony.unicopia.datagen.providers.tag.UItemTagProvider;
|
||||
import com.minelittlepony.unicopia.datagen.providers.tag.UPaintingVariantTagProvider;
|
||||
import com.minelittlepony.unicopia.datagen.providers.tag.UStatusEffectTagProvider;
|
||||
import com.minelittlepony.unicopia.entity.damage.UDamageTypes;
|
||||
import com.minelittlepony.unicopia.server.world.UWorldGen;
|
||||
|
@ -57,6 +59,8 @@ public class Datagen implements DataGeneratorEntrypoint {
|
|||
pack.addProvider(UDamageTypeProvider::new);
|
||||
pack.addProvider(UEntityTypeTagProvider::new);
|
||||
pack.addProvider(UStatusEffectTagProvider::new);
|
||||
pack.addProvider(UDimensionTypeTagProvider::new);
|
||||
pack.addProvider(UPaintingVariantTagProvider::new);
|
||||
|
||||
pack.addProvider(UModelProvider::new);
|
||||
pack.addProvider(URecipeProvider::new);
|
||||
|
|
|
@ -26,5 +26,29 @@ public class UDamageTypeProvider extends FabricTagProvider<DamageType> {
|
|||
getOrCreateTagBuilder(UTags.DamageTypes.FROM_ROCKS).add(UDamageTypes.ROCK);
|
||||
getOrCreateTagBuilder(UTags.DamageTypes.FROM_HORSESHOES).add(UDamageTypes.HORSESHOE);
|
||||
getOrCreateTagBuilder(UTags.DamageTypes.BREAKS_SUNGLASSES).add(UDamageTypes.BAT_SCREECH, UDamageTypes.RAINBOOM);
|
||||
|
||||
getOrCreateTagBuilder(DamageTypeTags.AVOIDS_GUARDIAN_THORNS).add(
|
||||
UDamageTypes.EXHAUSTION, UDamageTypes.ALICORN_AMULET, UDamageTypes.ZAP_APPLE, UDamageTypes.KICK, UDamageTypes.SMASH,
|
||||
UDamageTypes.BAT_SCREECH, UDamageTypes.LOVE_DRAINING, UDamageTypes.LIFE_DRAINING, UDamageTypes.RAINBOOM, UDamageTypes.STEAMROLLER
|
||||
);
|
||||
getOrCreateTagBuilder(DamageTypeTags.BYPASSES_ARMOR).add(
|
||||
UDamageTypes.EXHAUSTION, UDamageTypes.GAVITY_WELL_RECOIL, UDamageTypes.ALICORN_AMULET,
|
||||
UDamageTypes.ZAP_APPLE, UDamageTypes.KICK, UDamageTypes.SMASH, UDamageTypes.BAT_SCREECH,
|
||||
UDamageTypes.LOVE_DRAINING, UDamageTypes.LIFE_DRAINING, UDamageTypes.STEAMROLLER, UDamageTypes.RAINBOOM,
|
||||
UDamageTypes.SUN, UDamageTypes.SUNLIGHT, UDamageTypes.PETRIFIED
|
||||
);
|
||||
getOrCreateTagBuilder(DamageTypeTags.BYPASSES_INVULNERABILITY).add(UDamageTypes.TRIBE_SWAP);
|
||||
getOrCreateTagBuilder(DamageTypeTags.BYPASSES_SHIELD).add(
|
||||
UDamageTypes.EXHAUSTION, UDamageTypes.BAT_SCREECH, UDamageTypes.ALICORN_AMULET,
|
||||
UDamageTypes.LOVE_DRAINING, UDamageTypes.LIFE_DRAINING,
|
||||
UDamageTypes.RAINBOOM, UDamageTypes.TRIBE_SWAP
|
||||
);
|
||||
getOrCreateTagBuilder(DamageTypeTags.IS_FIRE).add(UDamageTypes.SUN, UDamageTypes.SUNLIGHT, UDamageTypes.PETRIFIED);
|
||||
getOrCreateTagBuilder(DamageTypeTags.IS_LIGHTNING).add(UDamageTypes.ZAP_APPLE);
|
||||
getOrCreateTagBuilder(DamageTypeTags.WITCH_RESISTANT_TO).add(
|
||||
UDamageTypes.EXHAUSTION, UDamageTypes.ALICORN_AMULET, UDamageTypes.ZAP_APPLE,
|
||||
UDamageTypes.LOVE_DRAINING, UDamageTypes.LIFE_DRAINING,
|
||||
UDamageTypes.KICK, UDamageTypes.SMASH, UDamageTypes.STEAMROLLER
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
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.registry.RegistryKeys;
|
||||
import net.minecraft.registry.RegistryWrapper.WrapperLookup;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.world.dimension.DimensionType;
|
||||
|
||||
public class UDimensionTypeTagProvider extends FabricTagProvider<DimensionType> {
|
||||
public UDimensionTypeTagProvider(FabricDataOutput output, CompletableFuture<WrapperLookup> registriesFuture) {
|
||||
super(output, RegistryKeys.DIMENSION_TYPE, registriesFuture);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configure(WrapperLookup lookup) {
|
||||
getOrCreateTagBuilder(UTags.DimensionTypes.HAS_NO_ATMOSPHERE)
|
||||
.addOptional(new Identifier("ad_astra", "earth_orbit"))
|
||||
.addOptional(new Identifier("ad_astra", "glacio_orbit"))
|
||||
.addOptional(new Identifier("ad_astra", "mars_orbit"))
|
||||
.addOptional(new Identifier("ad_astra", "mercury_orbit"))
|
||||
.addOptional(new Identifier("ad_astra", "moon")).addOptional(new Identifier("adastra", "moon_orbit"))
|
||||
.addOptional(new Identifier("ad_astra", "venus_orbit"))
|
||||
|
||||
.addOptional(new Identifier("adastra", "earth_orbit"))
|
||||
.addOptional(new Identifier("adastra", "glacio_orbit"))
|
||||
.addOptional(new Identifier("adastra", "mars_orbit"))
|
||||
.addOptional(new Identifier("adastra", "mercury_orbit"))
|
||||
.addOptional(new Identifier("adastra", "moon")).addOptional(new Identifier("adastra", "moon_orbit"))
|
||||
.addOptional(new Identifier("adastra", "venus_orbit"));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package com.minelittlepony.unicopia.datagen.providers.tag;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
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.decoration.painting.PaintingVariant;
|
||||
import net.minecraft.registry.RegistryKeys;
|
||||
import net.minecraft.registry.RegistryWrapper.WrapperLookup;
|
||||
import net.minecraft.registry.tag.PaintingVariantTags;
|
||||
|
||||
public class UPaintingVariantTagProvider extends FabricTagProvider<PaintingVariant> {
|
||||
public UPaintingVariantTagProvider(FabricDataOutput output, CompletableFuture<WrapperLookup> registriesFuture) {
|
||||
super(output, RegistryKeys.PAINTING_VARIANT, registriesFuture);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configure(WrapperLookup lookup) {
|
||||
getOrCreateTagBuilder(PaintingVariantTags.PLACEABLE).add(UEntities.Paintings.REGISTRY.toArray(PaintingVariant[]::new));
|
||||
}
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
package com.minelittlepony.unicopia.entity.mob;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import com.minelittlepony.unicopia.Unicopia;
|
||||
|
@ -134,8 +136,14 @@ public interface UEntities {
|
|||
}
|
||||
|
||||
interface Paintings {
|
||||
Set<PaintingVariant> REGISTRY = new HashSet<>();
|
||||
|
||||
private static void register(String id, int width, int height) {
|
||||
Registry.register(Registries.PAINTING_VARIANT, RegistryKey.of(RegistryKeys.PAINTING_VARIANT, Unicopia.id(id)), new PaintingVariant(16 * width, 16 * height));
|
||||
REGISTRY.add(Registry.register(
|
||||
Registries.PAINTING_VARIANT,
|
||||
RegistryKey.of(RegistryKeys.PAINTING_VARIANT, Unicopia.id(id)),
|
||||
new PaintingVariant(16 * width, 16 * height)
|
||||
));
|
||||
}
|
||||
|
||||
static void bootstrap() {
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
]
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"unicopia:magical_exhaustion",
|
||||
"unicopia:alicorn_amulet",
|
||||
"unicopia:zap",
|
||||
"unicopia:kick",
|
||||
"unicopia:smash",
|
||||
"unicopia:bat_screech",
|
||||
"unicopia:love_draining",
|
||||
"unicopia:life_draining",
|
||||
"unicopia:rainboom",
|
||||
"unicopia:steamroller"
|
||||
]
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"unicopia:magical_exhaustion",
|
||||
"unicopia:gravity_well_recoil",
|
||||
"unicopia:alicorn_amulet",
|
||||
"unicopia:zap",
|
||||
"unicopia:kick",
|
||||
"unicopia:smash",
|
||||
"unicopia:bat_screech",
|
||||
"unicopia:love_draining",
|
||||
"unicopia:life_draining",
|
||||
"unicopia:steamroller",
|
||||
"unicopia:rainboom",
|
||||
"unicopia:sun",
|
||||
"unicopia:sunlight",
|
||||
"unicopia:petrified"
|
||||
]
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"unicopia:tribe_swap"
|
||||
]
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"unicopia:magical_exhaustion",
|
||||
"unicopia:bat_screech",
|
||||
"unicopia:alicorn_amulet",
|
||||
"unicopia:love_draining",
|
||||
"unicopia:life_draining",
|
||||
"unicopia:rainboom",
|
||||
"unicopia:tribe_swap"
|
||||
]
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"unicopia:sun",
|
||||
"unicopia:sunlight",
|
||||
"unicopia:petrified"
|
||||
]
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"unicopia:zap"
|
||||
]
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"unicopia:magical_exhaustion",
|
||||
"unicopia:alicorn_amulet",
|
||||
"unicopia:zap",
|
||||
"unicopia:love_draining",
|
||||
"unicopia:life_draining",
|
||||
"unicopia:kick",
|
||||
"unicopia:smash",
|
||||
"unicopia:steamroller"
|
||||
]
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"unicopia:bloom",
|
||||
"unicopia:chicken",
|
||||
"unicopia:bells",
|
||||
"unicopia:crystal",
|
||||
"unicopia:harmony",
|
||||
"unicopia:equality",
|
||||
"unicopia:solar",
|
||||
"unicopia:lunar",
|
||||
"unicopia:platinum",
|
||||
"unicopia:hurricane",
|
||||
"unicopia:pudding",
|
||||
"unicopia:terra",
|
||||
"unicopia:equestria",
|
||||
"unicopia:blossom",
|
||||
"unicopia:shadow"
|
||||
]
|
||||
}
|
Loading…
Reference in a new issue