From a12ed2a5908324c56c1e32d9c88f935b983324bc Mon Sep 17 00:00:00 2001 From: Sollace Date: Wed, 18 Sep 2024 22:19:52 +0100 Subject: [PATCH] Sunglasses can now be broken by a warden's sonic boom, falling blocks, anvils, explosions, and flying into walls. Closes #423 --- .../datagen/providers/tag/UDamageTypeProvider.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/minelittlepony/unicopia/datagen/providers/tag/UDamageTypeProvider.java b/src/main/java/com/minelittlepony/unicopia/datagen/providers/tag/UDamageTypeProvider.java index 2c8779f3..1506283c 100644 --- a/src/main/java/com/minelittlepony/unicopia/datagen/providers/tag/UDamageTypeProvider.java +++ b/src/main/java/com/minelittlepony/unicopia/datagen/providers/tag/UDamageTypeProvider.java @@ -8,6 +8,7 @@ import com.minelittlepony.unicopia.entity.damage.UDamageTypes; import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; import net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider; import net.minecraft.entity.damage.DamageType; +import net.minecraft.entity.damage.DamageTypes; import net.minecraft.registry.RegistryKeys; import net.minecraft.registry.RegistryWrapper.WrapperLookup; import net.minecraft.registry.tag.DamageTypeTags; @@ -25,7 +26,11 @@ public class UDamageTypeProvider extends FabricTagProvider { ).forceAddTag(DamageTypeTags.IS_FALL).forceAddTag(DamageTypeTags.IS_FREEZING).forceAddTag(DamageTypeTags.IS_LIGHTNING).forceAddTag(DamageTypeTags.IS_PROJECTILE); 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(UTags.DamageTypes.BREAKS_SUNGLASSES).add( + UDamageTypes.BAT_SCREECH, UDamageTypes.RAINBOOM, + DamageTypes.FLY_INTO_WALL, DamageTypes.FALLING_ANVIL, DamageTypes.FALLING_BLOCK, + DamageTypes.SONIC_BOOM + ).forceAddTag(DamageTypeTags.IS_EXPLOSION); getOrCreateTagBuilder(DamageTypeTags.AVOIDS_GUARDIAN_THORNS).add( UDamageTypes.EXHAUSTION, UDamageTypes.ALICORN_AMULET, UDamageTypes.ZAP_APPLE, UDamageTypes.KICK, UDamageTypes.SMASH,