From 58338090b2cacb492816bf8dba801bba6c8eb693 Mon Sep 17 00:00:00 2001 From: Sollace Date: Fri, 1 Nov 2024 14:19:28 +0000 Subject: [PATCH] Horseshoes and rocks now break pots. Closes #512 --- .../datagen/providers/tag/UEntityTypeTagProvider.java | 1 + .../unicopia/projectile/PhysicsBodyProjectileEntity.java | 5 +++++ 2 files changed, 6 insertions(+) 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 index 41be4587..22e8191b 100644 --- a/src/main/java/com/minelittlepony/unicopia/datagen/providers/tag/UEntityTypeTagProvider.java +++ b/src/main/java/com/minelittlepony/unicopia/datagen/providers/tag/UEntityTypeTagProvider.java @@ -42,5 +42,6 @@ public class UEntityTypeTagProvider extends FabricTagProvider> { EntityType.FROG ); getOrCreateTagBuilder(EntityTypeTags.CAN_BREATHE_UNDER_WATER).add(UEntities.MIMIC); + getOrCreateTagBuilder(EntityTypeTags.IMPACT_PROJECTILES).add(UEntities.MUFFIN); } } diff --git a/src/main/java/com/minelittlepony/unicopia/projectile/PhysicsBodyProjectileEntity.java b/src/main/java/com/minelittlepony/unicopia/projectile/PhysicsBodyProjectileEntity.java index 000b556c..f972fe01 100644 --- a/src/main/java/com/minelittlepony/unicopia/projectile/PhysicsBodyProjectileEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/projectile/PhysicsBodyProjectileEntity.java @@ -287,6 +287,11 @@ public class PhysicsBodyProjectileEntity extends PersistentProjectileEntity impl } } + @Override + public boolean canBreakBlocks(World world) { + return !isBouncy() && super.canBreakBlocks(world); + } + @Override protected SoundEvent getHitSound() { if (getStack().isIn(UTags.Items.HORSE_SHOES)) {